azure.azcollection.azure_arc role – A role to Configure an Azure ARC Host.

Note

This role is part of the azure.azcollection collection (version 4.3.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it use: ansible-galaxy collection install azure.azcollection.

To use it in a playbook, specify: azure.azcollection.azure_arc.

Entry point main – A role to Configure an Azure ARC Host.

New in azure.azcollection 3.15.0

Synopsis

  • A role to Configure an Azure ARC host.

  • This role requires an resource_group, tenant id and subscription_id.

Parameters

Parameter

Comments

altdownload

string

Alternative download URL for the azcmagent package.

Takes precedence over the desired_version based download locations.

azure_arc_cloud

string

Which azure cloud to use.

Default: "AzureCloud"

azure_arc_force_local_only

boolean

added in azure.azcollection 4.3.0

Pass --force-local-only to azcmagent disconnect when azure_arc_state=absent, so the local agent is reset without deleting the server resource in Azure.

Useful when the Azure Arc-enabled server resource was already deleted in Azure.

Choices:

  • false ← (default)

  • true

azure_arc_location

string

Location where the Arc Host will reside.

Default will be location of azure_arc_resource_group

azure_arc_log_enabled

string

Enable or disable logging of signals to Azure

azure_arc_resource_group

string / required

Resource group on/from which the Arc Host will reside.

azure_arc_state

string

added in azure.azcollection 4.3.0

Whether the Azure Arc host should be present or absent.

present onboards the host, it installs and connects the agent.

absent offboards the host, it disconnects the agent from Azure and removes it from the host.

Choices:

  • "present" ← (default)

  • "absent"

azure_arc_subscription_id

string / required

An Azure subscription id.

azure_arc_tags

dictionary

Dictionary of tags to apply to the Arc Host entry in Azure.

Default: {"ArcSQLServerExtensionDeployment": "Disabled"}

azure_arc_tenant_id

string / required

An Azure tenant id.

desired_version

string

Desired version of the azcmagent to install.

If the agent is already installed at a different version, it is upgraded or downgraded to this version.

On Linux this can be a partial version, for example 1.56, or a full version, for example 1.56.03167.593.

On Windows this must be the major.minor version, for example 1.56, used by the versioned AzureConnectedMachineAgent.msi download links in the Azure Arc agent release notes.

When unset, the agent is only installed when absent and is never upgraded.

When the desired version is older than the installed agent, Debian/Ubuntu hosts have the agent package removed before the older version is installed (downgrades are not possible non-interactively with apt), Windows hosts have the agent uninstalled first (the MSI cannot install an older version over a newer one), and RPM based Linux hosts downgrade in place. The connection state is kept in all cases, so the host stays connected.

On Debian/Ubuntu the pre-downgrade package removal also removes the Guest Configuration agent directories (/opt/GC_Service and /opt/GC_Ext) via the package’s prerm; installing the older version restores and re-enables both agents from the package payload, and the extension payloads in /var/lib/GuestConfig are kept because the package is removed without purging.

proxy

string

Define proxy if your host needs to use a proxy to get to the Internet.

hostname

string

Hostname of the proxy server.

port

string

Port that the proxy is listening on.