code
stringlengths
2.5k
150k
kind
stringclasses
1 value
ansible community.azure.azure_rm_devtestlabvirtualmachine_info – Get Azure DevTest Lab Virtual Machine facts community.azure.azure\_rm\_devtestlabvirtualmachine\_info – Get Azure DevTest Lab Virtual Machine facts ======================================================================================================= Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_devtestlabvirtualmachine_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_devtestlabvirtualmachine\_info](../../azure/azcollection/azure_rm_devtestlabvirtualmachine_info_module#ansible-collections-azure-azcollection-azure-rm-devtestlabvirtualmachine-info-module) instead. Synopsis -------- * Get facts of Azure DevTest Lab Virtual Machine. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **lab\_name** string / required | | The name of the lab. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the virtual machine. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tags** list / elements=string | | Limit results by providing a list of tags. Format tags as 'key' or 'key:value'. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get instance of DTL Virtual Machine community.azure.azure_rm_devtestlabvirtualmachine_info: resource_group: myResourceGroup lab_name: myLab name: myVm ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **virtualmachines** complex | always | A list of dictionaries containing facts for DevTest Lab Virtual Machine. | | | **compute\_vm\_id** string | always | Resource id of compute virtual machine. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myLab-myVm-097933/providers/Microsoft.Compute/virtualMachines/myVm | | | **compute\_vm\_name** string | always | Name of compute virtual machine. **Sample:** myVm | | | **compute\_vm\_resource\_group** string | always | Resource group where compute virtual machine is created. **Sample:** myLab-myVm-097933 | | | **disallow\_public\_ip\_address** boolean | always | Whether public IP should be not allowed. | | | **expiration\_date** string | always | Virtual machine expiration date. **Sample:** 2029-02-22T01:49:12.117974Z | | | **fqdn** string | always | Fully qualified domain name. **Sample:** myvm.eastus.cloudapp.azure.com | | | **id** string | always | The identifier of the virtual machine. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/myResourceGroup/providers/microsoft.devtestlab/labs/myLab/virt ualmachines/myVm | | | **image** complex | always | Gallery image reference. | | | | **offer** string | when created from gallery image | The offer of the gallery image. **Sample:** UbuntuServer | | | | **os\_type** string | when created from gallery image | Operating system type. **Sample:** Linux | | | | **publisher** string | when created from gallery image | The publisher of the gallery image. **Sample:** Canonical | | | | **sku** string | when created from gallery image | The SKU of the gallery image. **Sample:** 16.04-LTS | | | | **version** string | when created from gallery image | The version of the gallery image. **Sample:** latest | | | **lab\_name** string | always | Name of the lab. **Sample:** myLab | | | **name** string | always | Name of the virtual machine. **Sample:** myVm | | | **notes** string | always | Notes of the virtual machine. **Sample:** My VM notes | | | **os\_type** string | always | Operating system type. **Sample:** linux | | | **provisioning\_state** string | always | Provisioning state of the virtual network. **Sample:** Succeeded | | | **resource\_group** string | always | Name of the resource group. **Sample:** myResourceGroup | | | **storage\_type** string | always | Storage type to use for virtual machine. **Sample:** standard | | | **tags** complex | always | The tags of the resource. **Sample:** { 'foo': 'bar' } | | | **user\_name** string | always | Admin user name. **Sample:** dtl\_admin | | | **vm\_size** string | always | Virtual machine size. **Sample:** Standard\_A2\_v2 | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino) ansible community.azure.azure_rm_functionapp_info – Get Azure Function App facts community.azure.azure\_rm\_functionapp\_info – Get Azure Function App facts =========================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_functionapp_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_functionapp\_info](../../azure/azcollection/azure_rm_functionapp_info_module#ansible-collections-azure-azcollection-azure-rm-functionapp-info-module) instead. Synopsis -------- * Get facts for one Azure Function App or all Function Apps within a resource group. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | Only show results for a specific Function App. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string | | Limit results to a resource group. Required when filtering by name. aliases: resource\_group\_name | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tags** string | | Limit results by providing a list of tags. Format tags as 'key' or 'key:value'. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get facts for one Function App community.azure.azure_rm_functionapp_info: resource_group: myResourceGroup name: myfunctionapp - name: Get facts for all Function Apps in a resource group community.azure.azure_rm_functionapp_info: resource_group: myResourceGroup - name: Get facts for all Function Apps by tags community.azure.azure_rm_functionapp_info: tags: - testing ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **azure\_functionapps** list / elements=string | always | List of Azure Function Apps dicts. **Sample:** {'availability\_state': 'Normal', 'client\_affinity\_enabled': True, 'client\_cert\_enabled': False, 'container\_size': 1536, 'daily\_memory\_time\_quota': 0, 'default\_host\_name': 'myfunctionapp.azurewebsites.net', 'enabled': True, 'enabled\_host\_names': ['myfunctionapp.azurewebsites.net', 'myfunctionapp.scm.azurewebsites.net'], 'host\_name\_ssl\_states': [{'host\_type': 'Standard', 'name': 'myfunctionapp.azurewebsites.net', 'ssl\_state': 'Disabled'}, {'host\_type': 'Repository', 'name': 'myfunctionapp.scm.azurewebsites.net', 'ssl\_state': 'Disabled'}], 'host\_names': ['myfunctionapp.azurewebsites.net'], 'host\_names\_disabled': False, 'id': '/subscriptions/.../resourceGroups/ansible-rg/providers/Microsoft.Web/sites/myfunctionapp', 'kind': 'functionapp', 'last\_modified\_time\_utc': '2017-08-22T18:54:01.190Z', 'location': 'East US', 'name': 'myfunctionapp', 'outbound\_ip\_addresses': '............', 'repository\_site\_name': 'myfunctionapp', 'reserved': False, 'resource\_group': 'myResourceGroup', 'scm\_site\_also\_stopped': False, 'server\_farm\_id': '/subscriptions/.../resourceGroups/ansible-rg/providers/Microsoft.Web/serverfarms/EastUSPlan', 'state': 'Running', 'type': 'Microsoft.Web/sites', 'usage\_state': 'Normal'} | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Thomas Stringer (@trstringer) ansible community.azure.azure_rm_availabilityset_info – Get Azure Availability Set facts community.azure.azure\_rm\_availabilityset\_info – Get Azure Availability Set facts =================================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_availabilityset_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_availabilityset\_info](../../azure/azcollection/azure_rm_availabilityset_info_module#ansible-collections-azure-azcollection-azure-rm-availabilityset-info-module) instead. Synopsis -------- * Get facts for a specific availability set or all availability sets. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | Limit results to a specific availability set. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string | | The resource group to search for the desired availability set. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tags** string | | List of tags to be matched. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get facts for one availability set community.azure.azure_rm_availabilityset_info: name: Testing resource_group: myResourceGroup - name: Get facts for all availability sets in a specific resource group community.azure.azure_rm_availabilityset_info: resource_group: myResourceGroup ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **azure\_availabilityset** complex | always | List of availability sets dicts. | | | **location** string | success | Location where the resource lives. **Sample:** eastus2 | | | **name** string | success | Resource name. **Sample:** myAvailabilitySet | | | **properties** dictionary | success | The properties of the resource. | | | | **platformFaultDomainCount** integer | success | Fault Domain count. **Sample:** 3 | | | | **platformUpdateDomainCount** integer | success | Update Domain count. **Sample:** 2 | | | | **virtualMachines** list / elements=string | success | A list of references to all virtualmachines in the availability set. | | | **sku** string | success | Location where the resource lives. **Sample:** Aligned | | | **tags** dictionary | success | Resource tags. **Sample:** {'env': 'sandbox'} | | | **type** string | success | Resource type. **Sample:** Microsoft.Compute/availabilitySets | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Julien Stroheker (@julienstroheker)
programming_docs
ansible community.azure.azure_rm_virtualnetwork_info – Get virtual network facts community.azure.azure\_rm\_virtualnetwork\_info – Get virtual network facts =========================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_virtualnetwork_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_virtualnetwork\_info](../../azure/azcollection/azure_rm_virtualnetwork_info_module#ansible-collections-azure-azcollection-azure-rm-virtualnetwork-info-module) instead. Synopsis -------- * Get facts for a specific virtual network or all virtual networks within a resource group. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | Only show results for a specific security group. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string | | Limit results by resource group. Required when filtering by name. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tags** string | | Limit results by providing a list of tags. Format tags as 'key' or 'key:value'. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get facts for one virtual network community.azure.azure_rm_virtualnetwork_info: resource_group: myResourceGroup name: secgroup001 - name: Get facts for all virtual networks community.azure.azure_rm_virtualnetwork_info: resource_group: myResourceGroup - name: Get facts by tags community.azure.azure_rm_virtualnetwork_info: tags: - testing ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **azure\_virtualnetworks** list / elements=string | always | List of virtual network dicts. **Sample:** [{'etag': 'W/"532ba1be-ae71-40f2-9232-3b1d9cf5e37e"', 'id': '/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroup/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet2001', 'location': 'eastus2', 'name': 'vnet2001', 'properties': {'addressSpace': {'addressPrefixes': ['10.10.0.0/16']}, 'provisioningState': 'Succeeded', 'resourceGuid': 'a7ba285f-f7e7-4e17-992a-de4d39f28612', 'subnets': []}, 'type': 'Microsoft.Network/virtualNetworks'}] | | **virtualnetworks** complex | always | List of virtual network dicts with same format as [community.azure.azure\_rm\_virtualnetwork](azure_rm_virtualnetwork_module) module parameters. | | | **address\_prefixes** list / elements=string | always | List of IPv4 address ranges where each is formatted using CIDR notation. **Sample:** ['10.10.0.0/16'] | | | **dns\_servers** list / elements=string | always | Custom list of DNS servers. **Sample:** ['www.azure.com'] | | | **id** string | always | Resource ID of the virtual network. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet2001 | | | **location** string | always | Valid Azure location. **Sample:** eastus | | | **name** string | always | Name of the virtual network. **Sample:** foo | | | **provisioning\_state** string | always | Provisioning state of the resource. **Sample:** Succeeded | | | **subnets** list / elements=string | always | Subnets associated with the virtual network. | | | | **address\_prefix** string | always | The address prefix for the subnet. **Sample:** 10.1.0.0/16 | | | | **id** string | always | Resource ID of the subnet. **Sample:** /subscriptions/f64d4ee8-be94-457d-ba26-3fa6b6506cef/resourceGroups/v-xisuRG/providers/ Microsoft.Network/virtualNetworks/vnetb57dc95232/subnets/vnetb57dc95232 | | | | **name** string | always | Name of the subnet. **Sample:** vnetb57dc95232 | | | | **network\_security\_group** string | always | Existing security group ID with which to associate the subnet. | | | | **provisioning\_state** string | always | Provisioning state of the subnet. **Sample:** Succeeded | | | | **route\_table** string | always | The reference of the RouteTable resource. | | | | **service\_endpoints** list / elements=string | always | An array of service endpoints. **Sample:** [{'locations': ['southeastasia', 'eastasia'], 'service': 'Microsoft.Storage'}] | | | **tags** dictionary | always | Tags assigned to the resource. Dictionary of string:string pairs. **Sample:** {'tag1': 'abc'} | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Chris Houseknecht (@chouseknecht) * Matt Davis (@nitzmahone) ansible community.azure.azure_rm_automationaccount_info – Get Azure automation account facts community.azure.azure\_rm\_automationaccount\_info – Get Azure automation account facts ======================================================================================= Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_automationaccount_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_automationaccount\_info](../../azure/azcollection/azure_rm_automationaccount_info_module#ansible-collections-azure-azcollection-azure-rm-automationaccount-info-module) instead. Synopsis -------- * Get facts of automation account. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **list\_keys** boolean | **Choices:*** no * yes | List keys for a automation account. Note this will cost network overhead, suggest only used when *name* set. | | **list\_statistics** boolean | **Choices:*** no * yes | List statistics details for a automation account. Note this will cost network overhead, suggest only used when *name* set. | | **list\_usages** boolean | **Choices:*** no * yes | List usage details for a automation account. Note this will cost network overhead, suggest only used when *name* set. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the automation account. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tags** list / elements=string | | Limit results by providing a list of tags. Format tags as 'key' or 'key:value'. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get details of an automation account community.azure.azure_rm_automationaccount_info: name: Testing resource_group: myResourceGroup list_statistics: yes list_usages: yes list_keys: yes - name: List automation account in a resource group community.azure.azure_rm_automationaccount_info: resource_group: myResourceGroup - name: List automation account in a resource group community.azure.azure_rm_automationaccount_info: ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **automation\_accounts** complex | always | List of automation account dicts. | | | **creation\_time** string | always | Resource creation date time. **Sample:** 2019-04-26T02:55:16.500Z | | | **id** string | always | Resource ID. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups /myResourceGroup/providers/Microsoft.Automation/automationAccounts/Testing | | | **keys** complex | always | Resource keys. | | | | **key\_name** string | always | Name of the key. **Sample:** Primary | | | | **permissions** string | always | Permission of the key. **Sample:** Full | | | | **value** string | always | Value of the key. **Sample:** MbepKTO6IyGwml0GaKBkKN | | | **last\_modified\_time** string | always | Resource last modified date time. **Sample:** 2019-04-26T02:55:16.500Z | | | **location** string | always | Resource location. **Sample:** eastus | | | **name** string | always | Resource name. **Sample:** Testing | | | **resource\_group** string | always | Resource group name. **Sample:** myResourceGroup | | | **state** string | always | Resource state. **Sample:** ok | | | **statistics** complex | always | Resource statistics. | | | | **counter\_property** string | always | Property value of the statistic. **Sample:** New | | | | **counter\_value** integer | always | Value of the statistic. | | | | **end\_time** string | always | EndTime of the statistic. **Sample:** 2019-04-26T06:29:43.587518Z | | | | **id** string | always | ID of the statistic. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups /myResourceGroup/providers/Microsoft.Automation/automationAccounts/Testing/statistics/New | | | | **start\_time** string | always | StartTime of the statistic. **Sample:** 2019-04-26T06:29:43.587518Z | | | **usages** complex | always | Resource usages. | | | | **current\_value** float | always | Current usage. | | | | **limit** integer | always | Max limit, `-1` for unlimited. **Sample:** -1 | | | | **name** complex | always | Usage counter name. | | | | | **localized\_value** string | always | Localized name. **Sample:** SubscriptionUsage | | | | | **value** string | always | Name value. **Sample:** SubscriptionUsage | | | | **throttle\_status** string | always | Usage throttle status. **Sample:** NotThrottled | | | | **unit** string | always | Usage unit name. **Sample:** Minute | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Yuwei Zhou (@yuwzho)
programming_docs
ansible community.azure.azure_rm_applicationsecuritygroup_info – Get Azure Application Security Group facts community.azure.azure\_rm\_applicationsecuritygroup\_info – Get Azure Application Security Group facts ====================================================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_applicationsecuritygroup_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_applicationsecuritygroup\_info](../../azure/azcollection/azure_rm_applicationsecuritygroup_info_module#ansible-collections-azure-azcollection-azure-rm-applicationsecuritygroup-info-module) instead. Synopsis -------- * Get facts of Azure Application Security Group. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the application security group. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string | | The name of the resource group. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tags** string | | Limit results by providing a list of tags. Format tags as 'key' or 'key:value'. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: List application security groups in specific resource group community.azure.azure_rm_applicationsecuritygroup_info: resource_group: myResourceGroup - name: List application security groups in specific subscription community.azure.azure_rm_applicationsecuritygroup_info: - name: Get application security group by name community.azure.azure_rm_applicationsecuritygroup_info: resource_group: myResourceGroup name: myApplicationSecurityGroup tags: - foo ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **applicationsecuritygroups** complex | always | List of application security groups. | | | **id** string | always | Id of the application security group. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationSecurityGroups/MyAsg | | | **location** string | always | Location of the application security group. **Sample:** eastus | | | **name** string | always | Name of the resource. **Sample:** myAsg | | | **provisioning\_state** string | always | Provisioning state of application security group. **Sample:** Succeeded | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Yunge Zhu (@yungezz) ansible community.azure.azure_rm_devtestlabartifact_info – Get Azure DevTest Lab Artifact facts community.azure.azure\_rm\_devtestlabartifact\_info – Get Azure DevTest Lab Artifact facts ========================================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_devtestlabartifact_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_devtestlabartifact\_info](../../azure/azcollection/azure_rm_devtestlabartifact_info_module#ansible-collections-azure-azcollection-azure-rm-devtestlabartifact-info-module) instead. Synopsis -------- * Get facts of Azure DevTest Lab Artifact. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **artifact\_source\_name** string / required | | The name of the artifact source. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **lab\_name** string / required | | The name of the lab. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the artifact. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get instance of DevTest Lab Artifact community.azure.azure_rm_devtestlabartifact_info: resource_group: myResourceGroup lab_name: myLab artifact_source_name: myArtifactSource name: myArtifact ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **artifacts** complex | always | A list of dictionaries containing facts for DevTest Lab Artifact. | | | **artifact\_source\_name** string | always | The name of the artifact source. **Sample:** myArtifactSource | | | **description** string | always | Description of the artifact. **Sample:** Installs My Software | | | **file\_path** string | always | Artifact's path in the repo. **Sample:** Artifacts/myArtifact | | | **id** string | always | The identifier of the artifact. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.DevTestLab/labs/myLab/ar tifactSources/myArtifactSource/artifacts/myArtifact | | | **lab\_name** string | always | Name of the lab. **Sample:** myLab | | | **name** string | always | The name of the artifact. **Sample:** myArtifact | | | **parameters** complex | always | A dictionary containing parameters definition of the artifact. | | | **publisher** string | always | Publisher name. **Sample:** MyPublisher | | | **resource\_group** string | always | Name of the resource group. **Sample:** myResourceGroup | | | **target\_os\_type** string | always | Target OS type. **Sample:** Linux | | | **title** string | always | Title of the artifact. **Sample:** My Software | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino) ansible community.azure.azure_rm_postgresqlconfiguration_info – Get Azure PostgreSQL Configuration facts community.azure.azure\_rm\_postgresqlconfiguration\_info – Get Azure PostgreSQL Configuration facts =================================================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_postgresqlconfiguration_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_postgresqlconfiguration\_info](../../azure/azcollection/azure_rm_postgresqlconfiguration_info_module#ansible-collections-azure-azcollection-azure-rm-postgresqlconfiguration-info-module) instead. Synopsis -------- * Get facts of Azure PostgreSQL Configuration. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | Setting name. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group that contains the resource. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **server\_name** string / required | | The name of the server. | | **subscription\_id** string | | Your Azure subscription Id. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get specific setting of PostgreSQL configuration community.azure.azure_rm_postgresqlconfiguration_info: resource_group: myResourceGroup server_name: testpostgresqlserver name: deadlock_timeout - name: Get all settings of PostgreSQL Configuration community.azure.azure_rm_postgresqlconfiguration_info: resource_group: myResourceGroup server_name: testpostgresqlserver ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **settings** complex | always | A list of dictionaries containing MySQL Server settings. | | | **description** string | always | Description of the configuration. **Sample:** Deadlock timeout. | | | **id** string | always | Setting resource ID. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/testpostgresqlser ver/configurations/deadlock\_timeout | | | **name** string | always | Setting name. **Sample:** deadlock\_timeout | | | **source** string | always | Source of the configuration. **Sample:** system-default | | | **value** any | always | Setting value. **Sample:** 1000 | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino)
programming_docs
ansible community.azure.azure_rm_sqlserver_info – Get SQL Server facts community.azure.azure\_rm\_sqlserver\_info – Get SQL Server facts ================================================================= Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_sqlserver_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_sqlserver\_info](../../azure/azcollection/azure_rm_sqlserver_info_module#ansible-collections-azure-azcollection-azure-rm-sqlserver-info-module) instead. Synopsis -------- * Get facts of SQL Server. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **append\_tags** boolean | **Choices:*** no * **yes** ← | Use to control if tags field is canonical or just appends to existing tags. When canonical, any tags not found in the tags parameter will be removed from the object's metadata. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **server\_name** string | | The name of the server. | | **subscription\_id** string | | Your Azure subscription Id. | | **tags** dictionary | | Dictionary of string:string pairs to assign as metadata to the object. Metadata tags on the object will be updated with any provided values. To remove tags set append\_tags option to false. Currently, Azure DNS zones and Traffic Manager services also don't allow the use of spaces in the tag. Azure Front Door doesn't support the use of Azure Automation and Azure CDN only support 15 tags on resources. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get instance of SQL Server community.azure.azure_rm_sqlserver_info: resource_group: myResourceGroup server_name: server_name - name: List instances of SQL Server community.azure.azure_rm_sqlserver_info: resource_group: myResourceGroup ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **servers** complex | always | A list of dict results where the key is the name of the SQL Server and the values are the facts for that SQL Server. | | | **sqlserver\_name** complex | success | The key is the name of the server that the values relate to. | | | | **fully\_qualified\_domain\_name** string | always | The fully qualified domain name of the server. **Sample:** fully\_qualified\_domain\_name | | | | **id** string | always | Resource ID. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Sql/servers/sqlcrudtest-4645 | | | | **kind** string | always | Kind of sql server. This is metadata used for the Azure portal experience. **Sample:** v12.0 | | | | **location** string | always | Resource location. **Sample:** japaneast | | | | **name** string | always | Resource name. **Sample:** sqlcrudtest-4645 | | | | **state** string | always | The state of the server. **Sample:** Ready | | | | **type** string | always | Resource type. **Sample:** Microsoft.Sql/servers | | | | **version** string | always | The version of the server. **Sample:** 12.0 | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino) ansible community.azure.azure_rm_mysqlfirewallrule_info – Get Azure MySQL Firewall Rule facts community.azure.azure\_rm\_mysqlfirewallrule\_info – Get Azure MySQL Firewall Rule facts ======================================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_mysqlfirewallrule_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_mysqlfirewallrule\_info](../../azure/azcollection/azure_rm_mysqlfirewallrule_info_module#ansible-collections-azure-azcollection-azure-rm-mysqlfirewallrule-info-module) instead. Synopsis -------- * Get facts of Azure MySQL Firewall Rule. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the server firewall rule. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **server\_name** string / required | | The name of the server. | | **subscription\_id** string | | Your Azure subscription Id. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get instance of MySQL Firewall Rule community.azure.azure_rm_mysqlfirewallrule_info: resource_group: myResourceGroup server_name: server_name name: firewall_rule_name - name: List instances of MySQL Firewall Rule community.azure.azure_rm_mysqlfirewallrule_info: resource_group: myResourceGroup server_name: server_name ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **rules** complex | always | A list of dictionaries containing facts for MySQL Firewall Rule. | | | **end\_ip\_address** string | always | The end IP address of the MySQL firewall rule. **Sample:** 10.0.0.18 | | | **id** string | always | Resource ID. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/fire wallRules/rule1 | | | **name** string | always | Resource name. **Sample:** rule1 | | | **server\_name** string | always | The name of the server. **Sample:** testserver | | | **start\_ip\_address** string | always | The start IP address of the MySQL firewall rule. **Sample:** 10.0.0.16 | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino) ansible community.azure.azure_rm_manageddisk_info – Get managed disk facts community.azure.azure\_rm\_manageddisk\_info – Get managed disk facts ===================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_manageddisk_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_manageddisk\_info](../../azure/azcollection/azure_rm_manageddisk_info_module#ansible-collections-azure-azcollection-azure-rm-manageddisk-info-module) instead. Synopsis -------- * Get facts for a specific managed disk or all managed disks. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **append\_tags** boolean | **Choices:*** no * **yes** ← | Use to control if tags field is canonical or just appends to existing tags. When canonical, any tags not found in the tags parameter will be removed from the object's metadata. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | Limit results to a specific managed disk. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string | | Limit results to a specific resource group. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tags** list / elements=string | | Limit results by providing a list of tags. Format tags as 'key' or 'key:value'. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * This module was called [community.azure.azure\_rm\_managed\_disk\_facts](azure_rm_managed_disk_facts_module#ansible-collections-community-azure-azure-rm-managed-disk-facts-module) before Ansible 2.8. The usage did not change. * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get facts for one managed disk community.azure.azure_rm_manageddisk_info: name: Testing resource_group: myResourceGroup - name: Get facts for all managed disks community.azure.azure_rm_manageddisk_info: - name: Get facts by tags community.azure.azure_rm_manageddisk_info: tags: - testing ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **azure\_managed\_disk** list / elements=string | always | List of managed disk dicts. | | | **create\_option** string | success | Create option of the disk. **Sample:** copy | | | **disk\_size\_gb** string | success | Size in GB of the managed disk to be created. | | | **id** string | success | Resource id. | | | **location** string | success | Valid Azure location. | | | **managed\_by** string | success | Name of an existing virtual machine with which the disk is or will be associated, this VM should be in the same resource group. | | | **name** string | success | Name of the managed disk. | | | **os\_type** string | success | Type of Operating System. **Can only return:** linux, windows | | | **source\_uri** string | success | URI to a valid VHD file to be used or the resource ID of the managed disk to copy. | | | **storage\_account\_type** string | success | Type of storage for the managed disk. See <https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-types> for more information about this type. **Sample:** Standard\_LRS | | | **tags** dictionary | success | Tags to assign to the managed disk. **Sample:** {'tag': 'value'} | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Bruno Medina (@brusMX)
programming_docs
ansible community.azure.azure_rm_virtualmachine_scaleset community.azure.azure\_rm\_virtualmachine\_scaleset =================================================== Note This redirect is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.0). * This redirect has been **deprecated**. Please update your tasks to use the new name `community.azure.azure_rm_virtualmachinescaleset` instead. It will be removed in version 2.0.0 of community.azure. * This is a redirect to the [community.azure.azure\_rm\_virtualmachinescaleset module](azure_rm_virtualmachinescaleset_module#ansible-collections-community-azure-azure-rm-virtualmachinescaleset-module). * This redirect also works with Ansible 2.9. * The collection contains the following information on this deprecation: Use azure.azcollection.azure\_rm\_virtualmachinescaleset instead. ansible community.azure.azure_rm_mariadbfirewallrule_info – Get Azure MariaDB Firewall Rule facts community.azure.azure\_rm\_mariadbfirewallrule\_info – Get Azure MariaDB Firewall Rule facts ============================================================================================ Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_mariadbfirewallrule_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_mariadbfirewallrule\_info](../../azure/azcollection/azure_rm_mariadbfirewallrule_info_module#ansible-collections-azure-azcollection-azure-rm-mariadbfirewallrule-info-module) instead. Synopsis -------- * Get facts of Azure MariaDB Firewall Rule. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the server firewall rule. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **server\_name** string / required | | The name of the server. | | **subscription\_id** string | | Your Azure subscription Id. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get instance of MariaDB Firewall Rule community.azure.azure_rm_mariadbfirewallrule_info: resource_group: myResourceGroup server_name: server_name name: firewall_rule_name - name: List instances of MariaDB Firewall Rule community.azure.azure_rm_mariadbfirewallrule_info: resource_group: myResourceGroup server_name: server_name ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **rules** complex | always | A list of dictionaries containing facts for MariaDB Firewall Rule. | | | **end\_ip\_address** string | always | The end IP address of the MariaDB firewall rule. **Sample:** 10.0.0.18 | | | **id** string | always | Resource ID. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/TestGroup/providers/Microsoft.DBforMariaDB/servers/testserver/fire wallRules/rule1 | | | **name** string | always | Resource name. **Sample:** rule1 | | | **server\_name** string | always | The name of the server. **Sample:** testserver | | | **start\_ip\_address** string | always | The start IP address of the MariaDB firewall rule. **Sample:** 10.0.0.16 | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino) * Matti Ranta (@techknowlogick) ansible community.azure.azure_rm_containerregistry_info – Get Azure Container Registry facts community.azure.azure\_rm\_containerregistry\_info – Get Azure Container Registry facts ======================================================================================= Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_containerregistry_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_containerregistry\_info](../../azure/azcollection/azure_rm_containerregistry_info_module#ansible-collections-azure-azcollection-azure-rm-containerregistry-info-module) instead. Synopsis -------- * Get facts for Container Registry. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the container registry. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group to which the container registry belongs. | | **retrieve\_credentials** boolean | **Choices:*** **no** ← * yes | Retrieve credentials for container registry. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tags** string | | Limit results by providing a list of tags. Format tags as 'key' or 'key:value'. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get instance of Registry community.azure.azure_rm_containerregistry_info: resource_group: myResourceGroup name: myRegistry - name: List instances of Registry community.azure.azure_rm_containerregistry_info: resource_group: myResourceGroup ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **registries** complex | always | A list of dictionaries containing facts for registries. | | | **admin\_user\_enabled** boolean | always | Is admin user enabled. **Sample:** True | | | **credentials** complex | when `retrieve_credentials` is set and `admin_user_enabled` is set on ACR | Credentials, fields will be empty if admin user is not enabled for ACR. | | | | **password** string | when registry exists and `admin_user_enabled` is set | password value. **Sample:** pass1value | | | | **password2** string | when registry exists and `admin_user_enabled` is set | password2 value. **Sample:** pass2value | | | | **username** string | when registry exists and `admin_user_enabled` is set | The user name for container registry. **Sample:** zim | | | **id** string | always | The resource ID. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registr ies/myRegistry | | | **location** string | always | The location of the resource. This cannot be changed after the resource is created. **Sample:** westus | | | **login\_server** string | always | Login server for the registry. **Sample:** acrd08521b.azurecr.io | | | **name** string | always | The name of the resource. **Sample:** myRegistry | | | **provisioning\_state** string | always | Provisioning state of the container registry. **Sample:** Succeeded | | | **sku** string | always | The SKU name of the container registry. **Sample:** Premium | | | **tags** dictionary | success | Tags assigned to the resource. Dictionary of string:string pairs. **Sample:** {'tag1': 'abc'} | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino) ansible community.azure.azure_rm_postgresqlfirewallrule_info – Get Azure PostgreSQL Firewall Rule facts community.azure.azure\_rm\_postgresqlfirewallrule\_info – Get Azure PostgreSQL Firewall Rule facts ================================================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_postgresqlfirewallrule_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_postgresqlfirewallrule\_info](../../azure/azcollection/azure_rm_postgresqlfirewallrule_info_module#ansible-collections-azure-azcollection-azure-rm-postgresqlfirewallrule-info-module) instead. Synopsis -------- * Get facts of Azure PostgreSQL Firewall Rule. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the server firewall rule. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **server\_name** string / required | | The name of the server. | | **subscription\_id** string | | Your Azure subscription Id. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get instance of PostgreSQL Firewall Rule community.azure.azure_rm_postgresqlfirewallrule_info: resource_group: myResourceGroup server_name: server_name name: firewall_rule_name - name: List instances of PostgreSQL Firewall Rule community.azure.azure_rm_postgresqlfirewallrule_info: resource_group: myResourceGroup server_name: server_name ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **rules** complex | always | A list of dictionaries containing facts for PostgreSQL Firewall Rule. | | | **end\_ip\_address** string | always | The end IP address of the PostgreSQL firewall rule. **Sample:** 10.0.0.18 | | | **id** string | always | Resource ID. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/fire wallRules/rule1 | | | **name** string | always | Resource name. **Sample:** rule1 | | | **server\_name** string | always | The name of the server. **Sample:** testserver | | | **start\_ip\_address** string | always | The start IP address of the PostgreSQL firewall rule. **Sample:** 10.0.0.16 | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino)
programming_docs
ansible community.azure.azure_rm_devtestlabschedule_info – Get Azure Schedule facts community.azure.azure\_rm\_devtestlabschedule\_info – Get Azure Schedule facts ============================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_devtestlabschedule_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_devtestlabschedule\_info](../../azure/azcollection/azure_rm_devtestlabschedule_info_module#ansible-collections-azure-azcollection-azure-rm-devtestlabschedule-info-module) instead. Synopsis -------- * Get facts of Azure Schedule. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **lab\_name** string / required | | The name of the lab. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the schedule. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tags** list / elements=string | | Limit results by providing a list of tags. Format tags as 'key' or 'key:value'. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get instance of Schedule community.azure.azure_rm_devtestlabschedule_info: resource_group: myResourceGroup lab_name: myLab name: mySchedule ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **schedules** complex | always | A list of dictionaries containing facts for Schedule. | | | **id** string | always | The identifier of the artifact source. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.DevTestLab/labs/myLab/sc hedules/labvmsshutdown | | | **lab\_name** string | always | Name of the lab. **Sample:** myLab | | | **name** string | always | The name of the environment. **Sample:** lab\_vms\_shutdown | | | **resource\_group** string | always | Name of the resource group. **Sample:** myResourceGroup | | | **tags** complex | always | The tags of the resource. **Sample:** { 'MyTag': 'MyValue' } | | | **time** string | always | Time of the schedule. **Sample:** lab\_vms\_shutdown | | | **time\_zone\_id** string | always | Time zone id. **Sample:** UTC+12 | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino) ansible community.azure.azure_rm_virtualnetworkpeering_info – Get facts of Azure Virtual Network Peering community.azure.azure\_rm\_virtualnetworkpeering\_info – Get facts of Azure Virtual Network Peering =================================================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_virtualnetworkpeering_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_virtualnetworkpeering\_info](../../azure/azcollection/azure_rm_virtualnetworkpeering_info_module#ansible-collections-azure-azcollection-azure-rm-virtualnetworkpeering-info-module) instead. Synopsis -------- * Get facts of Azure Virtual Network Peering. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | Name of the virtual network peering. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | Name of a resource group where the vnet exists. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | | **virtual\_network** string / required | | Name or resource ID of a virtual network. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get virtual network peering by name community.azure.azure_rm_virtualnetworkpeering_info: resource_group: myResourceGroup virtual_network: myVnet1 name: myVnetPeer - name: List virtual network peering of virtual network azure_rm_virtualnetworkpeering: resource_group: myResourceGroup virtual_network: myVnet1 ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **vnetpeerings** complex | always | A list of Virtual Network Peering facts. | | | **allow\_forwarded\_traffic** boolean | always | Whether forwarded traffic from the VMs in the remote Virtual Network will be allowed/disallowed. | | | **allow\_gateway\_transit** boolean | always | Whether gateway links can be used in remote Virtual Networking to link to this Virtual Network. | | | **allow\_virtual\_network\_access** boolean | always | Whether the VMs in the linked Virtual Network space can access all the VMs in local Virtual Network space. | | | **id** string | always | ID of current Virtual Network peering. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/virtualNetworkPeerings/peer1 | | | **name** string | always | Name of Virtual Network peering. **Sample:** myPeering | | | **peering\_state** string | always | The state of the virtual network peering. **Sample:** Connected | | | **provisioning\_state** string | always | The provisioning state of the resource. **Sample:** Succeeded | | | **remote\_address\_space** complex | always | The reference of the remote Virtual Network address space. | | | | **address\_prefixes** list / elements=string | always | A list of address blocks reserved for this Virtual Network in CIDR notation. **Sample:** 10.1.0.0/16 | | | **remote\_virtual\_network** string | always | ID of remote Virtual Network to be peered to. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet2 | | | **use\_remote\_gateways** boolean | always | Whether remote gateways can be used on this Virtual Network. | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Yunge Zhu (@yungezz) ansible community.azure.azure_rm_mariadbdatabase_info – Get Azure MariaDB Database facts community.azure.azure\_rm\_mariadbdatabase\_info – Get Azure MariaDB Database facts =================================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_mariadbdatabase_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_mariadbdatabase\_info](../../azure/azcollection/azure_rm_mariadbdatabase_info_module#ansible-collections-azure-azcollection-azure-rm-mariadbdatabase-info-module) instead. Synopsis -------- * Get facts of MariaDB Database. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the database. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **server\_name** string / required | | The name of the server. | | **subscription\_id** string | | Your Azure subscription Id. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get instance of MariaDB Database community.azure.azure_rm_mariadbdatabase_info: resource_group: myResourceGroup server_name: server_name name: database_name - name: List instances of MariaDB Database community.azure.azure_rm_mariadbdatabase_info: resource_group: myResourceGroup server_name: server_name ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **databases** complex | always | A list of dictionaries containing facts for MariaDB Databases. | | | **charset** string | always | The charset of the database. **Sample:** UTF8 | | | **collation** string | always | The collation of the database. **Sample:** English\_United States.1252 | | | **id** string | always | Resource ID. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.DBforMariaDB/servers/testser ver/databases/db1 | | | **name** string | always | Resource name. **Sample:** db1 | | | **resource\_group** string | always | Resource group name. **Sample:** testrg | | | **server\_name** string | always | Server name. **Sample:** testserver | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino) * Matti Ranta (@techknowlogick)
programming_docs
ansible community.azure.azure_rm_virtualmachinescalesetextension_info – Get Azure Virtual Machine Scale Set Extension facts community.azure.azure\_rm\_virtualmachinescalesetextension\_info – Get Azure Virtual Machine Scale Set Extension facts ====================================================================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_virtualmachinescalesetextension_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_virtualmachinescalesetextension\_info](../../azure/azcollection/azure_rm_virtualmachinescalesetextension_info_module#ansible-collections-azure-azcollection-azure-rm-virtualmachinescalesetextension-info-module) instead. Synopsis -------- * Get facts of Azure Virtual Machine Scale Set Extension. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the virtual machine extension. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | | **vmss\_name** string / required | | The name of VMSS containing the extension. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get information on specific Virtual Machine Scale Set Extension azure_rm_virtualmachineextension_info: resource_group: myResourceGroup vmss_name: myvmss name: myextension - name: List installed Virtual Machine Scale Set Extensions azure_rm_virtualmachineextension_info: resource_group: myrg vmss_name: myvmss ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **extensions** complex | always | A list of dictionaries containing facts for Virtual Machine Extension. | | | **auto\_upgrade\_minor\_version** boolean | always | Autoupgrade minor version flag. **Sample:** True | | | **id** string | always | Resource ID. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/ myvmss/extensions/myextension | | | **name** string | always | Virtual machine extension name. **Sample:** myextension | | | **provisioning\_state** string | always | Provisioning state of the extension. **Sample:** Succeeded | | | **publisher** string | always | Extension publisher. **Sample:** Microsoft.Azure.Extensions | | | **resource\_group** string | always | Resource group name. **Sample:** myrg | | | **settings** dictionary | always | Extension specific settings dictionary. **Sample:** {'commandToExecute': 'hostname'} | | | **type** string | always | Extension type. **Sample:** CustomScript | | | **vmss\_name** string | always | Virtual machine scale set name. **Sample:** myvmss | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino) ansible community.azure.azure_rm_sqldatabase_info – Get Azure SQL Database facts community.azure.azure\_rm\_sqldatabase\_info – Get Azure SQL Database facts =========================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_sqldatabase_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_sqldatabase\_info](../../azure/azcollection/azure_rm_sqldatabase_info_module#ansible-collections-azure-azcollection-azure-rm-sqldatabase-info-module) instead. Synopsis -------- * Get facts of Azure SQL Database. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **elastic\_pool\_name** string | | The name of the elastic pool. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the database. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **server\_name** string / required | | The name of the server. | | **subscription\_id** string | | Your Azure subscription Id. | | **tags** string | | Limit results by providing a list of tags. Format tags as 'key' or 'key:value'. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get instance of SQL Database community.azure.azure_rm_sqldatabase_info: resource_group: testrg server_name: testserver name: testdb - name: List instances of SQL Database community.azure.azure_rm_sqldatabase_info: resource_group: testrg server_name: testserver elastic_pool_name: testep - name: List instances of SQL Database community.azure.azure_rm_sqldatabase_info: resource_group: testrg server_name: testserver ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **databases** complex | always | A list of dictionaries containing facts for SQL Database. | | | **collation** string | always | The collation of the database. **Sample:** SQL\_Latin1\_General\_CP1\_CI\_AS | | | **id** string | always | Resource ID. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Sql/servers/testserver/databases/testdb | | | **kind** string | always | Kind of database. This is metadata used for the Azure portal experience. **Sample:** v12.0,user | | | **location** string | always | Resource location. **Sample:** southeastasia | | | **name** string | always | Database name. **Sample:** testdb | | | **sku** complex | always | The name and tier of the SKU. | | | | **capacity** integer | always | The SKU capacity. **Sample:** 2 | | | | **name** string | always | The name of the SKU. **Sample:** BC\_Gen4\_2 | | | | **tier** string | always | The SKU tier. **Sample:** BusinessCritical | | | **status** string | always | The status of the database. **Sample:** Online | | | **tags** dictionary | always | Resource tags. **Sample:** {'taga': 'aaa', 'tagb': 'bbb'} | | | **zone\_redundant** boolean | always | Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. **Sample:** True | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino) ansible community.azure.azure_rm_sqlfirewallrule_info – Get Azure SQL Firewall Rule facts community.azure.azure\_rm\_sqlfirewallrule\_info – Get Azure SQL Firewall Rule facts ==================================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_sqlfirewallrule_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_sqlfirewallrule\_info](../../azure/azcollection/azure_rm_sqlfirewallrule_info_module#ansible-collections-azure-azcollection-azure-rm-sqlfirewallrule-info-module) instead. Synopsis -------- * Get facts of SQL Firewall Rule. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the firewall rule. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group that contains the server. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **server\_name** string / required | | The name of the server. | | **subscription\_id** string | | Your Azure subscription Id. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get instance of SQL Firewall Rule community.azure.azure_rm_sqlfirewallrule_info: resource_group: myResourceGroup server_name: testserver name: testrule - name: List instances of SQL Firewall Rule community.azure.azure_rm_sqlfirewallrule_info: resource_group: myResourceGroup server_name: testserver ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **rules** complex | always | A list of dict results containing the facts for matching SQL firewall rules. | | | **end\_ip\_address** string | always | The end IP address of the firewall rule. **Sample:** 10.0.0.5 | | | **id** string | always | Resource ID. **Sample:** /subscriptions/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Sql/servers/testser ver/firewallRules/testrule | | | **name** string | always | Firewall rule name. **Sample:** testrule | | | **resource\_group** string | always | Resource group name. **Sample:** testgroup | | | **server\_name** string | always | SQL server name. **Sample:** testserver | | | **start\_ip\_address** string | always | The start IP address of the firewall rule. **Sample:** 10.0.0.1 | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino)
programming_docs
ansible community.azure.azure_rm_autoscale_info – Get Azure Auto Scale Setting facts community.azure.azure\_rm\_autoscale\_info – Get Azure Auto Scale Setting facts =============================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_autoscale_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_autoscale\_info](../../azure/azcollection/azure_rm_autoscale_info_module#ansible-collections-azure-azcollection-azure-rm-autoscale-info-module) instead. Synopsis -------- * Get facts of Auto Scale Setting. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the Auto Scale Setting. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tags** string | | Limit results by providing a list of tags. Format tags as 'key' or 'key:value'. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get instance of Auto Scale Setting community.azure.azure_rm_autoscale_info: resource_group: myResourceGroup name: auto_scale_name - name: List instances of Auto Scale Setting community.azure.azure_rm_autoscale_info: resource_group: myResourceGroup ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **autoscales** list / elements=string | always | List of Azure Scale Settings dicts. **Sample:** [{'enabled': True, 'id': '/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/microsoft.insights/autoscalesettings/scale', 'location': 'eastus', 'name': 'scale', 'notifications': [{'custom\_emails': ['[email protected]'], 'send\_to\_subscription\_administrator': True, 'send\_to\_subscription\_co\_administrators': False, 'webhooks': []}], 'profiles': [{'count': '1', 'max\_count': '1', 'min\_count': '1', 'name': 'Auto created scale condition 0', 'recurrence\_days': ['Monday'], 'recurrence\_frequency': 'Week', 'recurrence\_hours': ['6'], 'recurrence\_mins': ['0'], 'recurrence\_timezone': 'China Standard Time', 'rules': [{'cooldown': 5.0, 'direction': 'Increase', 'metric\_name': 'Percentage CPU', 'metric\_resource\_uri': '/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsof t.Compute/virtualMachineScaleSets/myVmss', 'operator': 'GreaterThan', 'statistic': 'Average', 'threshold': 70.0, 'time\_aggregation': 'Average', 'time\_grain': 1.0, 'time\_window': 10.0, 'type': 'ChangeCount', 'value': '1'}]}], 'target': '/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScale Sets/myVmss'}] | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Yuwei Zhou (@yuwzho) ansible community.azure.azure_rm_loadbalancer_info – Get load balancer facts community.azure.azure\_rm\_loadbalancer\_info – Get load balancer facts ======================================================================= Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_loadbalancer_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_loadbalancer\_info](../../azure/azcollection/azure_rm_loadbalancer_info_module#ansible-collections-azure-azcollection-azure-rm-loadbalancer-info-module) instead. Synopsis -------- * Get facts for a specific load balancer or all load balancers. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | Limit results to a specific resource group. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string | | The resource group to search for the desired load balancer. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tags** string | | Limit results by providing a list of tags. Format tags as 'key' or 'key:value'. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get facts for one load balancer community.azure.azure_rm_loadbalancer_info: name: Testing resource_group: myResourceGroup - name: Get facts for all load balancers community.azure.azure_rm_loadbalancer_info: - name: Get facts for all load balancers in a specific resource group community.azure.azure_rm_loadbalancer_info: resource_group: myResourceGroup - name: Get facts by tags community.azure.azure_rm_loadbalancer_info: tags: - testing ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **azure\_loadbalancers** list / elements=string | always | List of load balancer dicts. | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Thomas Stringer (@trstringer) ansible community.azure.azure_rm_lock_info – Manage Azure locks community.azure.azure\_rm\_lock\_info – Manage Azure locks ========================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_lock_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_lock\_info](../../azure/azcollection/azure_rm_lock_info_module#ansible-collections-azure-azcollection-azure-rm-lock-info-module) instead. Synopsis -------- * Create, delete an Azure lock. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **managed\_resource\_id** string | | ID of the resource where need to manage the lock. Get this via facts module. Cannot be set mutual with *resource\_group*. Manage subscription if both *managed\_resource\_id* and *resource\_group* not defined. '/subscriptions/{subscriptionId}' for subscriptions. '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups. '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{namespace}/{resourceType}/{resourceName}' for resources. Can get all locks with 'child scope' for this resource, use *managed\_resource\_id* in response for further management. | | **name** string / required | | Name of the lock. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string | | Resource group name where need to manage the lock. The lock is in the resource group level. Cannot be set mutual with *managed\_resource\_id*. Query subscription if both *managed\_resource\_id* and *resource\_group* not defined. Can get all locks with 'child scope' in this resource group, use the *managed\_resource\_id* in response for further management. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get myLock details of myVM community.azure.azure_rm_lock_info: name: myLock managed_resource_id: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM - name: List locks of myVM community.azure.azure_rm_lock_info: managed_resource_id: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM - name: List locks of myResourceGroup community.azure.azure_rm_lock_info: resource_group: myResourceGroup - name: List locks of myResourceGroup community.azure.azure_rm_lock_info: managed_resource_id: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/myResourceGroup - name: List locks of mySubscription community.azure.azure_rm_lock_info: - name: List locks of mySubscription community.azure.azure_rm_lock_info: managed_resource_id: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **locks** complex | always | List of locks dicts. | | | **id** string | always | ID of the Lock. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/locks/myLock | | | **level** string | always | Type level of the lock. **Sample:** can\_not\_delete | | | **name** string | always | Name of the lock. **Sample:** myLock | | | **notes** string | always | Notes of the lock added by creator. **Sample:** This is a lock | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Yuwei Zhou (@yuwzho)
programming_docs
ansible community.azure.azure_rm_rediscache_info – Get Azure Cache for Redis instance facts community.azure.azure\_rm\_rediscache\_info – Get Azure Cache for Redis instance facts ====================================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_rediscache_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_rediscache\_info](../../azure/azcollection/azure_rm_rediscache_info_module#ansible-collections-azure-azcollection-azure-rm-rediscache-info-module) instead. Synopsis -------- * Get facts for Azure Cache for Redis instance. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | Limit results to a specific Azure Cache for Redis. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The resource group to search for the desired Azure Cache for Redis. | | **return\_access\_keys** boolean | **Choices:*** **no** ← * yes | Indicate weather to return access keys of the Azure Cache for Redis. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tags** string | | Limit results by providing a list of tags. Format tags as 'key' or 'key:value'. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get Azure Cache for Redis by name community.azure.azure_rm_rediscache_info: resource_group: myResourceGroup name: myRedis - name: Get Azure Cache for Redis with access keys by name community.azure.azure_rm_rediscache_info: resource_group: myResourceGroup name: myRedis return_access_keys: true - name: Get Azure Cache for Redis in specific resource group community.azure.azure_rm_rediscache_info: resource_group: myResourceGroup ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **rediscaches** complex | always | List of Azure Cache for Redis instances. | | | **access\_keys** dictionary | when *return\_access\_keys=true* | Azure Cache for Redis access keys. | | | | **primary** string | always | The current primary key that clients can use to authenticate the Redis cahce. **Sample:** X2xXXxx7xxxxxx5xxxx0xxxxx75xxxxxxxxXXXxxxxx= | | | | **secondary** string | always | The current secondary key that clients can use to authenticate the Redis cahce. **Sample:** X2xXXxx7xxxxxx5xxxx0xxxxx75xxxxxxxxXXXxxxxx= | | | **configuration** dictionary | always | Dict of Redis configuration. **Sample:** maxmeory\_reserved | | | **enable\_non\_ssl\_port** boolean | always | Specifies whether the non-ssl Redis server port (6379) is enabled. | | | **host\_name** string | always | Redis host name. **Sample:** testRedis.redis.cache.windows.net | | | **id** string | always | Id of the Azure Cache for Redis. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Cache/Redis/myRedis | | | **location** string | always | Location of the Azure Cache for Redis. **Sample:** WestUS | | | **name** string | always | Name of the Azure Cache for Redis. **Sample:** myRedis | | | **provisioning\_state** string | always | Provisioning state of the Redis cache. **Sample:** Creating | | | **resource\_group** string | always | Name of a resource group where the Azure Cache for Redis belongs to. **Sample:** myResourceGroup | | | **shard\_count** integer | always | The number of shards on a Premium Cluster Cache. **Sample:** 1 | | | **sku** dictionary | always | Dict of SKU information. | | | | **name** string | always | Name of the SKU. **Sample:** standard | | | | **size** string | always | Size of the Azure Cache for Redis. **Sample:** C1 | | | **static\_ip** string | always | Static IP address. **Sample:** 10.75.0.11 | | | **subnet** string | always | The full resource ID of a subnet in a virtual network to deploy the Azure Cache for Redis in. **Sample:** ['/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/Microsoft.Network/VirtualNetworks/myVirtualNetwo rk/subnets/mySubnet'] | | | **tags** dictionary | always | Resource tags. **Sample:** {'key1': 'value1'} | | | **tenant\_settings** dictionary | always | Dict of tenant settings. **Sample:** {'key1': 'value1'} | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Yunge Zhu (@yungezz) ansible community.azure.azure_rm_deployment_info – Get Azure Deployment facts community.azure.azure\_rm\_deployment\_info – Get Azure Deployment facts ======================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_deployment_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_deployment\_info](../../azure/azcollection/azure_rm_deployment_info_module#ansible-collections-azure-azcollection-azure-rm-deployment-info-module) instead. Synopsis -------- * Get facts of Azure Deployment. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the deployment. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get instance of Deployment community.azure.azure_rm_deployment_info: resource_group: myResourceGroup name: myDeployment ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **deployments** complex | always | A list of dictionaries containing facts for deployments. | | | **id** string | always | The identifier of the resource. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Resources/deployments/myDeployment | | | **name** string | always | Deployment name. **Sample:** myDeployment | | | **output\_resources** complex | always | List of resources. | | | | **depends\_on** list / elements=string | always | List of resource ids. **Sample:** ['/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGropup/providers/Microsoft.Network/virtualNet works/myVirtualNetwork'] | | | | **id** string | always | Resource id. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkI nterfaces/myNetworkInterface | | | | **name** string | always | Resource name. **Sample:** myNetworkInterface | | | | **type** string | always | Resource type. **Sample:** Microsoft.Network/networkInterfaces | | | **outputs** string | always | Dictionary containing deployment outputs. | | | **parameters** complex | always | Dictionary containing deployment parameters. | | | **provisioning\_state** string | always | Provisioning state of the deployment. **Sample:** Succeeded | | | **resource\_group** string | always | Resource group name. **Sample:** myResourceGroup | | | **template\_link** string | always | Link to the template. **Sample:** https://raw.githubusercontent.com/Azure/azure-quickstart-templates/d01a5c06f4f1bc03a049ca17bbbd6e06d62657b3/101-vm-simple-linux/ azuredeploy.json | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino) ansible community.azure.azure_rm_subnet_info – Get Azure Subnet facts community.azure.azure\_rm\_subnet\_info – Get Azure Subnet facts ================================================================ Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_subnet_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_subnet\_info](../../azure/azcollection/azure_rm_subnet_info_module#ansible-collections-azure-azcollection-azure-rm-subnet-info-module) instead. Synopsis -------- * Get facts of Azure Subnet. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the subnet. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | | **virtual\_network\_name** string / required | | The name of the virtual network. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get facts of specific subnet community.azure.azure_rm_subnet_info: resource_group: myResourceGroup virtual_network_name: myVirtualNetwork name: mySubnet - name: List facts for all subnets in virtual network community.azure.azure_rm_subnet_info: resource_group: myResourceGroup virtual_network_name: myVirtualNetwork name: mySubnet ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **subnets** complex | always | A list of dictionaries containing facts for subnet. | | | **address\_prefix\_cidr** string | always | CIDR defining the IPv4 address space of the subnet. **Sample:** 10.1.0.0/16 | | | **id** string | always | Subnet resource ID. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/my VirtualNetwork/subnets/mySubnet | | | **name** string | always | Name of the subnet. **Sample:** mySubnet | | | **provisioning\_state** string | always | Provisioning state. **Sample:** Succeeded | | | **resource\_group** string | always | Name of resource group. **Sample:** myResourceGroup | | | **route\_table** string | always | Associated route table ID. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/routeTables/myRouteTable | | | **security\_group** string | always | Associated security group ID. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkSecurityGr oups/myNsg | | | **service\_endpoints** list / elements=string | when available | List of service endpoints. | | | | **locations** list / elements=string | always | A list of location names. **Sample:** ['eastus', 'westus'] | | | | **provisioning\_state** string | always | Provisioning state. **Sample:** Succeeded | | | | **service** string | always | The type of the endpoint service. **Sample:** Microsoft.Sql | | | **virtual\_network\_name** string | always | Name of the containing virtual network. **Sample:** myVirtualNetwork | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino)
programming_docs
ansible community.azure.azure_rm_mysqldatabase_info – Get Azure MySQL Database facts community.azure.azure\_rm\_mysqldatabase\_info – Get Azure MySQL Database facts =============================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_mysqldatabase_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_mysqldatabase\_info](../../azure/azcollection/azure_rm_mysqldatabase_info_module#ansible-collections-azure-azcollection-azure-rm-mysqldatabase-info-module) instead. Synopsis -------- * Get facts of MySQL Database. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the database. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **server\_name** string / required | | The name of the server. | | **subscription\_id** string | | Your Azure subscription Id. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get instance of MySQL Database community.azure.azure_rm_mysqldatabase_info: resource_group: myResourceGroup server_name: server_name name: database_name - name: List instances of MySQL Database community.azure.azure_rm_mysqldatabase_info: resource_group: myResourceGroup server_name: server_name ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **databases** complex | always | A list of dictionaries containing facts for MySQL Databases. | | | **charset** string | always | The charset of the database. **Sample:** utf8 | | | **collation** string | always | The collation of the database. **Sample:** English\_United States.1252 | | | **id** string | always | Resource ID. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.DBforMySQL/servers/testser ver/databases/db1 | | | **name** string | always | Resource name. **Sample:** db1 | | | **resource\_group** string | always | Resource group name. **Sample:** testrg | | | **server\_name** string | always | Server name. **Sample:** testserver | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino) ansible community.azure.azure_rm_devtestlabartifactsource_info – Get Azure DevTest Lab Artifact Source facts community.azure.azure\_rm\_devtestlabartifactsource\_info – Get Azure DevTest Lab Artifact Source facts ======================================================================================================= Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_devtestlabartifactsource_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_devtestlabartifactsource\_info](../../azure/azcollection/azure_rm_devtestlabartifactsource_info_module#ansible-collections-azure-azcollection-azure-rm-devtestlabartifactsource-info-module) instead. Synopsis -------- * Get facts of Azure DevTest Lab Artifact Source. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **lab\_name** string / required | | The name of DevTest Lab. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of DevTest Lab Artifact Source. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tags** list / elements=string | | Limit results by providing a list of tags. Format tags as 'key' or 'key:value'. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get instance of DevTest Lab Artifact Source community.azure.azure_rm_devtestlabartifactsource_info: resource_group: myResourceGroup lab_name: myLab name: myArtifactSource ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **artifactsources** complex | always | A list of dictionaries containing facts for DevTest Lab Artifact Source. | | | **arm\_template\_folder\_path** string | always | The folder containing Azure Resource Manager templates. **Sample:** /Environments | | | **display\_name** string | always | The artifact source's display name. **Sample:** Public Artifact Repo | | | **folder\_path** string | always | The folder containing artifacts. **Sample:** /Artifacts | | | **id** string | always | The identifier of the artifact source. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.DevTestLab/labs/myLab/ar tifactSources/myArtifactSource | | | **is\_enabled** string | always | Is the artifact source enabled. **Sample:** True | | | **lab\_name** string | always | Name of the lab. **Sample:** myLab | | | **name** string | always | The name of the artifact source. **Sample:** myArtifactSource | | | **provisioning\_state** string | always | Provisioning state of artifact source. **Sample:** Succeeded | | | **resource\_group** string | always | Name of the resource group. **Sample:** myResourceGroup | | | **source\_type** string | always | The artifact source's type. **Sample:** github | | | **tags** complex | always | The tags of the resource. **Sample:** { 'MyTag': 'MyValue' } | | | **uri** string | always | URI of the artifact source. **Sample:** https://github.com/Azure/azure-devtestlab.git | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino) ansible community.azure.azure_rm_virtualmachinescalesetinstance_info – Get Azure Virtual Machine Scale Set Instance facts community.azure.azure\_rm\_virtualmachinescalesetinstance\_info – Get Azure Virtual Machine Scale Set Instance facts ==================================================================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_virtualmachinescalesetinstance_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_virtualmachinescalesetinstance\_info](../../azure/azcollection/azure_rm_virtualmachinescalesetinstance_info_module#ansible-collections-azure-azcollection-azure-rm-virtualmachinescalesetinstance-info-module) instead. Synopsis -------- * Get facts of Azure Virtual Machine Scale Set VMs. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **instance\_id** string | | The instance ID of the virtual machine. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tags** string | | Limit results by providing a list of tags. Format tags as 'key' or 'key:value'. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | | **vmss\_name** string / required | | The name of the VM scale set. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: List VM instances in Virtual Machine ScaleSet community.azure.azure_rm_virtualmachinescalesetinstance_info: resource_group: myResourceGroup vmss_name: myVMSS ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **instances** complex | always | A list of dictionaries containing facts for Virtual Machine Scale Set VM. | | | **id** string | always | Resource ID. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/my VMSS/virtualMachines/2 | | | **image\_reference** dictionary | always | Image reference **Sample:** {'id': '/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myGroup/providers/Microsoft.Compute/galleries/ myGallery/images/myImage/versions/10.1.3'} | | | **instance\_id** string | always | Virtual Machine instance ID. | | | **latest\_model** boolean | always | Whether applied latest model. **Sample:** True | | | **name** string | always | Virtual Machine name. **Sample:** myVMSS\_2 | | | **power\_state** string | always | Provisioning state of the Virtual Machine's power. **Sample:** running | | | **provisioning\_state** string | always | Provisioning state of the Virtual Machine. **Sample:** Succeeded | | | **tags** dictionary | always | Resource tags. **Sample:** {'tag1': 'abc'} | | | **vm\_id** string | always | Virtual Machine ID **Sample:** 94a141a9-4530-46ac-b151-2c7ff09aa823 | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino)
programming_docs
ansible community.azure.azure_rm_mariadbserver_info – Get Azure MariaDB Server facts community.azure.azure\_rm\_mariadbserver\_info – Get Azure MariaDB Server facts =============================================================================== Note This plugin is part of the [community.azure collection](https://galaxy.ansible.com/community/azure) (version 1.1.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 community.azure`. To use it in a playbook, specify: `community.azure.azure_rm_mariadbserver_info`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 2.0.0 Why The Ansible collection community.azure is deprecated. Use azure.azcollection instead. Alternative Use [azure.azcollection.azure\_rm\_mariadbserver\_info](../../azure/azcollection/azure_rm_mariadbserver_info_module#ansible-collections-azure-azcollection-azure-rm-mariadbserver-info-module) instead. Synopsis -------- * Get facts of MariaDB Server. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * The host that executes this module must have the azure.azcollection collection installed via galaxy * All python packages listed in collection’s requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection * Full installation instructions may be found <https://galaxy.ansible.com/azure/azcollection> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ad\_user** string | | Active Directory username. Use when authenticating with an Active Directory user rather than service principal. | | **adfs\_authority\_url** string added in 0.0.1 of azure.azcollection | | Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority. | | **api\_profile** string added in 0.0.1 of azure.azcollection | **Default:**"latest" | Selects an API profile to use when communicating with Azure services. Default value of `latest` is appropriate for public clouds; future values will allow use with Azure Stack. | | **auth\_source** string added in 0.0.1 of azure.azcollection | **Choices:*** **auto** ← * cli * credential\_file * env * msi | Controls the source of the credentials to use for authentication. Can also be set via the `ANSIBLE_AZURE_AUTH_SOURCE` environment variable. When set to `auto` (the default) the precedence is module parameters -> `env` -> `credential_file` -> `cli`. When set to `env`, the credentials will be read from the environment variables When set to `credential_file`, it will read the profile from `~/.azure/credentials`. When set to `cli`, the credentials will be sources from the Azure CLI profile. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if more than one is present otherwise the default az cli subscription is used. When set to `msi`, the host machine must be an azure resource with an enabled MSI extension. `subscription_id` or the environment variable `AZURE_SUBSCRIPTION_ID` can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen. The `msi` was added in Ansible 2.6. | | **cert\_validation\_mode** string added in 0.0.1 of azure.azcollection | **Choices:*** ignore * validate | Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing `ignore`. Can also be set via credential file profile or the `AZURE_CERT_VALIDATION` environment variable. | | **client\_id** string | | Azure client ID. Use when authenticating with a Service Principal. | | **cloud\_environment** string added in 0.0.1 of azure.azcollection | **Default:**"AzureCloud" | For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, `AzureChinaCloud`, `AzureUSGovernment`), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the `AZURE_CLOUD_ENVIRONMENT` environment variable. | | **log\_mode** string | | Parent argument. | | **log\_path** string | | Parent argument. | | **name** string | | The name of the server. | | **password** string | | Active Directory user password. Use when authenticating with an Active Directory user rather than service principal. | | **profile** string | | Security profile found in ~/.azure/credentials file. | | **resource\_group** string / required | | The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. | | **secret** string | | Azure client secret. Use when authenticating with a Service Principal. | | **subscription\_id** string | | Your Azure subscription Id. | | **tags** list / elements=string | | Limit results by providing a list of tags. Format tags as 'key' or 'key:value'. | | **tenant** string | | Azure tenant ID. Use when authenticating with a Service Principal. | Notes ----- Note * For authentication with Azure you can pass parameters, set environment variables, use a profile stored in ~/.azure/credentials, or log in before you run your tasks or playbook with `az login`. * Authentication is also possible using a service principal or Active Directory user. * To authenticate via service principal, pass subscription\_id, client\_id, secret and tenant or set environment variables AZURE\_SUBSCRIPTION\_ID, AZURE\_CLIENT\_ID, AZURE\_SECRET and AZURE\_TENANT. * To authenticate via Active Directory user, pass ad\_user and password, or set AZURE\_AD\_USER and AZURE\_PASSWORD in the environment. * Alternatively, credentials can be stored in ~/.azure/credentials. This is an ini file containing a [default] section and the following keys: subscription\_id, client\_id, secret and tenant or subscription\_id, ad\_user and password. It is also possible to add additional profiles. Specify the profile by passing profile or setting AZURE\_PROFILE in the environment. See Also -------- See also [Sign in with Azure CLI](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) How to authenticate using the `az login` command. Examples -------- ``` - name: Get instance of MariaDB Server community.azure.azure_rm_mariadbserver_info: resource_group: myResourceGroup name: server_name - name: List instances of MariaDB Server community.azure.azure_rm_mariadbserver_info: resource_group: myResourceGroup ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **servers** complex | always | A list of dictionaries containing facts for MariaDB servers. | | | **admin\_username** string | always | The administrator's login name of a server. **Sample:** serveradmin | | | **enforce\_ssl** boolean | always | Enable SSL enforcement. | | | **fully\_qualified\_domain\_name** string | always | The fully qualified domain name of a server. **Sample:** myabdud1223.mys.database.azure.com | | | **id** string | always | Resource ID. **Sample:** /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.DBforMariaDB/servers/myabdud1223 | | | **location** string | always | The location the resource resides in. **Sample:** eastus | | | **name** string | always | Resource name. **Sample:** myabdud1223 | | | **resource\_group** string | always | Resource group name. **Sample:** myResourceGroup | | | **sku** complex | always | The SKU of the server. | | | | **capacity** integer | always | The scale capacity. **Sample:** 2 | | | | **name** string | always | The name of the SKU. **Sample:** GP\_Gen4\_2 | | | | **tier** string | always | The tier of the particular SKU. **Sample:** GeneralPurpose | | | **storage\_mb** integer | always | The maximum storage allowed for a server. **Sample:** 128000 | | | **tags** dictionary | success | Tags assigned to the resource. Dictionary of string:string pairs. **Sample:** {'tag1': 'abc'} | | | **user\_visible\_state** string | always | A state of a server that is visible to user. **Sample:** Ready | | | **version** string | always | Server version. **Sample:** 9.6 | Status ------ * This module will be removed in version 2.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Zim Kalinowski (@zikalino) * Matti Ranta (@techknowlogick) ansible community.general.rax_cdb_user – create / delete a Rackspace Cloud Database community.general.rax\_cdb\_user – create / delete a Rackspace Cloud Database ============================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rax_cdb_user`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * create / delete a database in the Cloud Databases. Requirements ------------ The below requirements are needed on the host that executes this module. * pyrax * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string | | Rackspace API key, overrides *credentials*. aliases: password | | **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/> | | **cdb\_id** string / required | | The databases server UUID | | **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided. aliases: creds\_file | | **databases** list / elements=string | **Default:**[] | Name of the databases that the user can access | | **db\_password** string / required | | Database user password | | **db\_username** string / required | | Name of the database user | | **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. | | **host** string | **Default:**"%" | Specifies the host from which a user is allowed to connect to the database. Possible values are a string containing an IPv4 address or "%" to allow connecting from any host | | **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. | | **region** string | | Region to create an instance in. | | **state** string | **Choices:*** **present** ← * absent | Indicate desired state of the resource | | **tenant\_id** string | | The tenant ID used for authentication. | | **tenant\_name** string | | The tenant name used for authentication. | | **username** string | | Rackspace username, overrides *credentials*. | | **validate\_certs** boolean | **Choices:*** no * yes | Whether or not to require SSL validation of API endpoints. aliases: verify\_ssl | Notes ----- Note * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) Examples -------- ``` - name: Build a user in Cloud Databases tasks: - name: User build request local_action: module: rax_cdb_user credentials: ~/.raxpub region: IAD cdb_id: 323e7ce0-9cb0-11e3-a5e2-0800200c9a66 db_username: user1 db_password: user1 databases: ['db1'] state: present register: rax_db_user ``` ### Authors * Simon JAILLET (@jails) ansible community.general.gitlab_project_variable – Creates/updates/deletes GitLab Projects Variables community.general.gitlab\_project\_variable – Creates/updates/deletes GitLab Projects Variables =============================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.gitlab_project_variable`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * When a project variable does not exist, it will be created. * When a project variable does exist, its value will be updated when the values are different. * Variables which are untouched in the playbook, but are not untouched in the GitLab project, they stay untouched (*purge* is `false`) or will be deleted (*purge* is `true`). Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * python-gitlab python module Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_password** string | | The password to use for authentication against the API | | **api\_token** string / required | | GitLab access token with API permissions. | | **api\_url** string | | The resolvable endpoint for the API | | **api\_username** string | | The username to use for authentication against the API | | **project** string / required | | The path and name of the project. | | **purge** boolean | **Choices:*** **no** ← * yes | When set to true, all variables which are not untouched in the task will be deleted. | | **state** string | **Choices:*** **present** ← * absent | Create or delete project variable. Possible values are present and absent. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether or not to validate SSL certs when supplying a https endpoint. | | **vars** dictionary | **Default:**{} | When the list element is a simple key-value pair, masked and protected will be set to false. When the list element is a dict with the keys *value*, *masked* and *protected*, the user can have full control about whether a value should be masked, protected or both. Support for protected values requires GitLab >= 9.3. Support for masked values requires GitLab >= 11.10. A *value* must be a string or a number. Field *variable\_type* must be a string with either `env_var`, which is the default, or `file`. Field *environment\_scope* must be a string defined by scope environment. When a value is masked, it must be in Base64 and have a length of at least 8 characters. See GitLab documentation on acceptable values for a masked variable (https://docs.gitlab.com/ce/ci/variables/#masked-variables). | Examples -------- ``` - name: Set or update some CI/CD variables community.general.gitlab_project_variable: api_url: https://gitlab.com api_token: secret_access_token project: markuman/dotfiles purge: false vars: ACCESS_KEY_ID: abc123 SECRET_ACCESS_KEY: 321cba - name: Set or update some CI/CD variables community.general.gitlab_project_variable: api_url: https://gitlab.com api_token: secret_access_token project: markuman/dotfiles purge: false vars: ACCESS_KEY_ID: abc123 SECRET_ACCESS_KEY: value: 3214cbad masked: true protected: true variable_type: env_var environment_scope: '*' - name: Delete one variable community.general.gitlab_project_variable: api_url: https://gitlab.com api_token: secret_access_token project: markuman/dotfiles state: absent vars: ACCESS_KEY_ID: abc123 ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **project\_variable** dictionary | always | Four lists of the variablenames which were added, updated, removed or exist. | | | **added** list / elements=string | always | A list of variables which were created. **Sample:** ['ACCESS\_KEY\_ID', 'SECRET\_ACCESS\_KEY'] | | | **removed** list / elements=string | always | A list of variables which were deleted. **Sample:** ['ACCESS\_KEY\_ID', 'SECRET\_ACCESS\_KEY'] | | | **untouched** list / elements=string | always | A list of variables which exist. **Sample:** ['ACCESS\_KEY\_ID', 'SECRET\_ACCESS\_KEY'] | | | **updated** list / elements=string | always | A list of variables whose values were changed. **Sample:** ['ACCESS\_KEY\_ID', 'SECRET\_ACCESS\_KEY'] | ### Authors * Markus Bergholz (@markuman) ansible community.general.osx_defaults – Manage macOS user defaults community.general.osx\_defaults – Manage macOS user defaults ============================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.osx_defaults`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * osx\_defaults allows users to read, write, and delete macOS user defaults from Ansible scripts. * macOS applications and other programs use the defaults system to record user preferences and other information that must be maintained when the applications are not running (such as default font for new documents, or the position of an Info panel). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **array\_add** boolean | **Choices:*** **no** ← * yes | Add new elements to the array for a key which has an array as its value. | | **domain** string | **Default:**"NSGlobalDomain" | The domain is a domain name of the form `com.companyname.appname`. | | **host** string | | The host on which the preference should apply. The special value `currentHost` corresponds to the `-currentHost` switch of the defaults commandline tool. | | **key** string | | The key of the user preference. | | **path** string | **Default:**"/usr/bin:/usr/local/bin" | The path in which to search for `defaults`. | | **state** string | **Choices:*** absent * list * **present** ← | The state of the user defaults. If set to `list` will query the given parameter specified by `key`. Returns 'null' is nothing found or mis-spelled. `list` added in version 2.8. | | **type** string | **Choices:*** array * bool * boolean * date * float * int * integer * **string** ← | The type of value to write. | | **value** raw | | The value to write. Only required when `state=present`. | Notes ----- Note * Apple Mac caches defaults. You may need to logout and login to apply the changes. Examples -------- ``` # TODO: Describe what happens in each example - community.general.osx_defaults: domain: com.apple.Safari key: IncludeInternalDebugMenu type: bool value: true state: present - community.general.osx_defaults: domain: NSGlobalDomain key: AppleMeasurementUnits type: string value: Centimeters state: present - community.general.osx_defaults: domain: /Library/Preferences/com.apple.SoftwareUpdate key: AutomaticCheckEnabled type: int value: 1 become: yes - community.general.osx_defaults: domain: com.apple.screensaver host: currentHost key: showClock type: int value: 1 - community.general.osx_defaults: key: AppleMeasurementUnits type: string value: Centimeters - community.general.osx_defaults: key: AppleLanguages type: array value: - en - nl - community.general.osx_defaults: domain: com.geekchimp.macable key: ExampleKeyToRemove state: absent ``` ### Authors * Franck Nijhof (!UNKNOWN)
programming_docs
ansible community.general.proxmox_tasks_info – Retrieve information about one or more Proxmox VE tasks community.general.proxmox\_tasks\_info – Retrieve information about one or more Proxmox VE tasks ================================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.proxmox_tasks_info`. New in version 3.8.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Retrieve information about one or more Proxmox VE tasks. Requirements ------------ The below requirements are needed on the host that executes this module. * proxmoxer * requests Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_host** string / required | | Specify the target host of the Proxmox VE cluster. | | **api\_password** string | | Specify the password to authenticate with. You can use `PROXMOX_PASSWORD` environment variable. | | **api\_token\_id** string added in 1.3.0 of community.general | | Specify the token ID. | | **api\_token\_secret** string added in 1.3.0 of community.general | | Specify the token secret. | | **api\_user** string / required | | Specify the user to authenticate with. | | **node** string / required | | Node where to get tasks. | | **task** string | | Return specific task. aliases: upid, name | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: List tasks on node01 community.general.proxmox_task_info: api_host: proxmoxhost api_user: root@pam api_password: '{{ password | default(omit) }}' api_token_id: '{{ token_id | default(omit) }}' api_token_secret: '{{ token_secret | default(omit) }}' node: node01 register: result - name: Retrieve information about specific tasks on node01 community.general.proxmox_task_info: api_host: proxmoxhost api_user: root@pam api_password: '{{ password | default(omit) }}' api_token_id: '{{ token_id | default(omit) }}' api_token_secret: '{{ token_secret | default(omit) }}' task: 'UPID:node01:00003263:16167ACE:621EE230:srvreload:networking:root@pam:' node: node01 register: proxmox_tasks ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **msg** string | on failure | Short message. **Sample:** Task: UPID:xyz:xyz does not exist on node: proxmoxnode | | **proxmox\_tasks** list / elements=dictionary | on success | List of tasks. | | | **endtime** integer | on success, can be absent | Endtime of the task. | | | **failed** boolean | when status is defined | If the task failed. | | | **id** string | on success | ID of the task. | | | **node** string | on success | Node name. | | | **pid** integer | on success | PID of the task. | | | **pstart** integer | on success | pastart of the task. | | | **starttime** integer | on success | Starting time of the task. | | | **status** string | on success, can be absent | Status of the task. | | | **type** string | on success | Type of the task. | | | **upid** string | on success | UPID of the task. | | | **user** string | on success | User that owns the task. | ### Authors * Andreas Botzner (@paginabianca) <andreas at botzner dot com> ansible community.general.lxca_nodes – Custom module for lxca nodes inventory utility community.general.lxca\_nodes – Custom module for lxca nodes inventory utility ============================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.lxca_nodes`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module returns/displays a inventory details of nodes Requirements ------------ The below requirements are needed on the host that executes this module. * pylxca Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auth\_url** string / required | | lxca https full web address | | **chassis** string | | uuid of chassis, this is string with length greater than 16. | | **command\_options** string | **Choices:*** **nodes** ← * nodes\_by\_uuid * nodes\_by\_chassis\_uuid * nodes\_status\_managed * nodes\_status\_unmanaged | options to filter nodes information | | **login\_password** string / required | | The password for use in HTTP basic authentication. | | **login\_user** string / required | | The username for use in HTTP basic authentication. | | **uuid** string | | uuid of device, this is string with length greater than 16. | Notes ----- Note * Additional detail about pylxca can be found at <https://github.com/lenovo/pylxca> * Playbooks using these modules can be found at <https://github.com/lenovo/ansible.lenovo-lxca> * Check mode is not supported. Examples -------- ``` # get all nodes info - name: Get nodes data from LXCA community.general.lxca_nodes: login_user: USERID login_password: Password auth_url: "https://10.243.15.168" command_options: nodes # get specific nodes info by uuid - name: Get nodes data from LXCA community.general.lxca_nodes: login_user: USERID login_password: Password auth_url: "https://10.243.15.168" uuid: "3C737AA5E31640CE949B10C129A8B01F" command_options: nodes_by_uuid # get specific nodes info by chassis uuid - name: Get nodes data from LXCA community.general.lxca_nodes: login_user: USERID login_password: Password auth_url: "https://10.243.15.168" chassis: "3C737AA5E31640CE949B10C129A8B01F" command_options: nodes_by_chassis_uuid # get managed nodes - name: Get nodes data from LXCA community.general.lxca_nodes: login_user: USERID login_password: Password auth_url: "https://10.243.15.168" command_options: nodes_status_managed # get unmanaged nodes - name: Get nodes data from LXCA community.general.lxca_nodes: login_user: USERID login_password: Password auth_url: "https://10.243.15.168" command_options: nodes_status_unmanaged ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **result** dictionary | always | nodes detail from lxca **Sample:** {'nodeList': [{'machineType': '6241', 'model': 'AC1', 'type': 'Rack-TowerServer', 'uuid': '118D2C88C8FD11E4947B6EAE8B4BDCDF'}, {'machineType': '8871', 'model': 'AC1', 'type': 'Rack-TowerServer', 'uuid': '223D2C88C8FD11E4947B6EAE8B4BDCDF'}]} | ### Authors * Naval Patel (@navalkp) * Prashant Bhosale (@prabhosa) ansible community.general.runit – Manage runit services community.general.runit – Manage runit services =============================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.runit`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Controls runit services on remote hosts using the sv utility. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **enabled** boolean | **Choices:*** no * yes | Whether the service is enabled or not, if disabled it also implies stopped. | | **name** string / required | | Name of the service to manage. | | **service\_dir** string | **Default:**"/var/service" | directory runsv watches for services | | **service\_src** string | **Default:**"/etc/sv" | directory where services are defined, the source of symlinks to service\_dir. | | **state** string | **Choices:*** killed * once * reloaded * restarted * started * stopped | `started`/`stopped` are idempotent actions that will not run commands unless necessary. `restarted` will always bounce the service (sv restart) and `killed` will always bounce the service (sv force-stop). `reloaded` will send a HUP (sv reload). `once` will run a normally downed sv once (sv once), not really an idempotent operation. | Examples -------- ``` - name: Start sv dnscache, if not running community.general.runit: name: dnscache state: started - name: Stop sv dnscache, if running community.general.runit: name: dnscache state: stopped - name: Kill sv dnscache, in all cases community.general.runit: name: dnscache state: killed - name: Restart sv dnscache, in all cases community.general.runit: name: dnscache state: restarted - name: Reload sv dnscache, in all cases community.general.runit: name: dnscache state: reloaded - name: Use alternative sv directory location community.general.runit: name: dnscache state: reloaded service_dir: /run/service ``` ### Authors * James Sumners (@jsumners) ansible community.general.timezone – Configure timezone setting community.general.timezone – Configure timezone setting ======================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.timezone`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module configures the timezone setting, both of the system clock and of the hardware clock. If you want to set up the NTP, use [ansible.builtin.service](../../ansible/builtin/service_module#ansible-collections-ansible-builtin-service-module) module. * It is recommended to restart `crond` after changing the timezone, otherwise the jobs may run at the wrong time. * Several different tools are used depending on the OS/Distribution involved. For Linux it can use `timedatectl` or edit `/etc/sysconfig/clock` or `/etc/timezone` and `hwclock`. On SmartOS, `sm-set-timezone`, for macOS, `systemsetup`, for BSD, `/etc/localtime` is modified. On AIX, `chtz` is used. * As of Ansible 2.3 support was added for SmartOS and BSDs. * As of Ansible 2.4 support was added for macOS. * As of Ansible 2.9 support was added for AIX 6.1+ * Windows and HPUX are not supported, please let us know if you find any other OS/distro in which this fails. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **hwclock** string | **Choices:*** local * UTC | Whether the hardware clock is in UTC or in local timezone. Default is to keep current setting. Note that this option is recommended not to change and may fail to configure, especially on virtual environments such as AWS. **At least one of name and hwclock are required.** *Only used on Linux.* aliases: rtc | | **name** string | | Name of the timezone for the system clock. Default is to keep current setting. **At least one of name and hwclock are required.** | Notes ----- Note * On SmartOS the `sm-set-timezone` utility (part of the smtools package) is required to set the zone timezone * On AIX only Olson/tz database timezones are useable (POSIX is not supported). - An OS reboot is also required on AIX for the new timezone setting to take effect. Examples -------- ``` - name: Set timezone to Asia/Tokyo community.general.timezone: name: Asia/Tokyo ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **diff** complex | success | The differences about the given arguments. | | | **after** dictionary | success | The values after change | | | **before** dictionary | success | The values before change | ### Authors * Shinichi TAMURA (@tmshn) * Jasper Lievisse Adriaanse (@jasperla) * Indrajit Raychaudhuri (@indrajitr) ansible community.general.logstash_plugin – Manage Logstash plugins community.general.logstash\_plugin – Manage Logstash plugins ============================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.logstash_plugin`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manages Logstash plugins. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **name** string / required | | Install plugin with that name. | | **plugin\_bin** path | **Default:**"/usr/share/logstash/bin/logstash-plugin" | Specify logstash-plugin to use for plugin management. | | **proxy\_host** string | | Proxy host to use during plugin installation. | | **proxy\_port** string | | Proxy port to use during plugin installation. | | **state** string | **Choices:*** **present** ← * absent | Apply plugin state. | | **version** string | | Specify plugin Version of the plugin to install. If plugin exists with previous version, it will NOT be updated. | Examples -------- ``` - name: Install Logstash beats input plugin community.general.logstash_plugin: state: present name: logstash-input-beats - name: Install specific version of a plugin community.general.logstash_plugin: state: present name: logstash-input-syslog version: '3.2.0' - name: Uninstall Logstash plugin community.general.logstash_plugin: state: absent name: logstash-filter-multiline - name: Install Logstash plugin with alternate heap size community.general.logstash_plugin: state: present name: logstash-input-beats environment: LS_JAVA_OPTS: "-Xms256m -Xmx256m" ``` ### Authors * Loic Blot (@nerzhul) ansible community.general.hwc_smn_topic – Creates a resource of SMNTopic in Huaweicloud Cloud community.general.hwc\_smn\_topic – Creates a resource of SMNTopic in Huaweicloud Cloud ======================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.hwc_smn_topic`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Represents a SMN notification topic resource. Requirements ------------ The below requirements are needed on the host that executes this module. * requests >= 2.18.4 * keystoneauth1 >= 3.6.0 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **display\_name** string | | Topic display name, which is presented as the name of the email sender in an email message. The topic display name contains a maximum of 192 bytes. | | **domain** string / required | | The name of the Domain to scope to (Identity v3). (currently only domain names are supported, and not domain IDs). | | **id** string | | The id of resource to be managed. | | **identity\_endpoint** string / required | | The Identity authentication URL. | | **name** string / required | | Name of the topic to be created. The topic name is a string of 1 to 256 characters. It must contain upper- or lower-case letters, digits, hyphens (-), and underscores `_`, and must start with a letter or digit. | | **password** string / required | | The password to login with. | | **project** string / required | | The name of the Tenant (Identity v2) or Project (Identity v3). (currently only project names are supported, and not project IDs). | | **region** string | | The region to which the project belongs. | | **state** string | **Choices:*** **present** ← * absent | Whether the given object should exist in Huaweicloud Cloud. | | **user** string / required | | The user name to login with (currently only user names are supported, and not user IDs). | Notes ----- Note * For authentication, you can set identity\_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT` env variable. * For authentication, you can set user using the `ANSIBLE_HWC_USER` env variable. * For authentication, you can set password using the `ANSIBLE_HWC_PASSWORD` env variable. * For authentication, you can set domain using the `ANSIBLE_HWC_DOMAIN` env variable. * For authentication, you can set project using the `ANSIBLE_HWC_PROJECT` env variable. * For authentication, you can set region using the `ANSIBLE_HWC_REGION` env variable. * Environment variables values will only be used if the playbook values are not set. Examples -------- ``` - name: Create a smn topic community.general.hwc_smn_topic: identity_endpoint: "{{ identity_endpoint }}" user_name: "{{ user_name }}" password: "{{ password }}" domain_name: "{{ domain_name }}" project_name: "{{ project_name }}" region: "{{ region }}" name: "ansible_smn_topic_test" state: present ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **create\_time** string | success | Time when the topic was created. | | **display\_name** string | success | Topic display name, which is presented as the name of the email sender in an email message. The topic display name contains a maximum of 192 bytes. | | **name** string | success | Name of the topic to be created. The topic name is a string of 1 to 256 characters. It must contain upper- or lower-case letters, digits, hyphens (-), and underscores `_`, and must start with a letter or digit. | | **push\_policy** integer | success | Message pushing policy. 0 indicates that the message sending fails and the message is cached in the queue. 1 indicates that the failed message is discarded. | | **topic\_urn** string | success | Resource identifier of a topic, which is unique. | | **update\_time** string | success | Time when the topic was updated. | ### Authors * Huawei Inc. (@huaweicloud)
programming_docs
ansible community.general.facter – Runs the discovery program facter on the remote system community.general.facter – Runs the discovery program facter on the remote system ================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.facter`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Runs the `facter` discovery program (<https://github.com/puppetlabs/facter>) on the remote system, returning JSON data that can be useful for inventory purposes. Requirements ------------ The below requirements are needed on the host that executes this module. * facter * ruby-json Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **arguments** list / elements=string | | Specifies arguments for facter. | Examples -------- ``` # Example command-line invocation # ansible www.example.net -m facter - name: Execute facter no arguments community.general.facter: - name: Execute facter with arguments community.general.facter: arguments: - -p - system_uptime - timezone - is_virtual ``` ### Authors * Ansible Core Team * Michael DeHaan ansible community.general.rhevm – RHEV/oVirt automation community.general.rhevm – RHEV/oVirt automation =============================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rhevm`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module only supports oVirt/RHEV version 3. * A newer module [ovirt.ovirt.ovirt\_vm](../../ovirt/ovirt/ovirt_vm_module#ansible-collections-ovirt-ovirt-ovirt-vm-module) supports oVirt/RHV version 4. * Allows you to create/remove/update or powermanage virtual machines on a RHEV/oVirt platform. Requirements ------------ The below requirements are needed on the host that executes this module. * ovirtsdk Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **boot\_order** list / elements=string | **Default:**["hd", "network"] | This option uses complex arguments and is a list of items that specify the bootorder. | | **cd\_drive** string | | The CD you wish to have mounted on the VM when *state = 'CD'*. | | **cluster** string | | The RHEV/oVirt cluster in which you want you VM to start. | | **cpu\_share** integer | **Default:**0 | This parameter is used to configure the CPU share. | | **datacenter** string | **Default:**"Default" | The RHEV/oVirt datacenter in which you want you VM to start. | | **del\_prot** boolean | **Choices:*** no * **yes** ← | This option sets the delete protection checkbox. | | **disks** list / elements=string | | This option uses complex arguments and is a list of disks with the options name, size and domain. | | **ifaces** list / elements=string | | This option uses complex arguments and is a list of interfaces with the options name and vlan. aliases: interfaces, nics | | **image** string | | The template to use for the VM. | | **insecure\_api** boolean | **Choices:*** **no** ← * yes | A boolean switch to make a secure or insecure connection to the server. | | **mempol** integer | **Default:**1 | The minimum amount of memory you wish to reserve for this system. | | **name** string | | The name of the VM. | | **osver** string | **Default:**"rhel\_6x64" | The operating system option in RHEV/oVirt. | | **password** string / required | | The password for user authentication. | | **port** integer | **Default:**443 | The port on which the API is reachable. | | **server** string | **Default:**"127.0.0.1" | The name/IP of your RHEV-m/oVirt instance. | | **state** string | **Choices:*** absent * cd * down * info * ping * **present** ← * restarted * up | This serves to create/remove/update or powermanage your VM. | | **timeout** integer | | The timeout you wish to define for power actions. When *state = 'up'*. When *state = 'down'*. When *state = 'restarted'*. | | **type** string | **Choices:*** desktop * host * **server** ← | To define if the VM is a server or desktop. | | **user** string | **Default:**"admin@internal" | The user to authenticate with. | | **vm\_ha** boolean | **Choices:*** no * **yes** ← | To make your VM High Available. | | **vmcpu** integer | **Default:**2 | The number of CPUs you want in your VM. | | **vmhost** string | | The host you wish your VM to run on. | | **vmmem** integer | **Default:**1 | The amount of memory you want your VM to use (in GB). | Examples -------- ``` - name: Basic get info from VM community.general.rhevm: server: rhevm01 user: '{{ rhev.admin.name }}' password: '{{ rhev.admin.pass }}' name: demo state: info - name: Basic create example from image community.general.rhevm: server: rhevm01 user: '{{ rhev.admin.name }}' password: '{{ rhev.admin.pass }}' name: demo cluster: centos image: centos7_x64 state: present - name: Power management community.general.rhevm: server: rhevm01 user: '{{ rhev.admin.name }}' password: '{{ rhev.admin.pass }}' cluster: RH name: uptime_server image: centos7_x64 state: down - name: Multi disk, multi nic create example community.general.rhevm: server: rhevm01 user: '{{ rhev.admin.name }}' password: '{{ rhev.admin.pass }}' cluster: RH name: server007 type: server vmcpu: 4 vmmem: 2 ifaces: - name: eth0 vlan: vlan2202 - name: eth1 vlan: vlan36 - name: eth2 vlan: vlan38 - name: eth3 vlan: vlan2202 disks: - name: root size: 10 domain: ssd-san - name: swap size: 10 domain: 15kiscsi-san - name: opt size: 10 domain: 15kiscsi-san - name: var size: 10 domain: 10kiscsi-san - name: home size: 10 domain: sata-san boot_order: - network - hd state: present - name: Add a CD to the disk cd_drive community.general.rhevm: user: '{{ rhev.admin.name }}' password: '{{ rhev.admin.pass }}' name: server007 cd_drive: rhev-tools-setup.iso state: cd - name: New host deployment + host network configuration community.general.rhevm: password: '{{ rhevm.admin.pass }}' name: ovirt_node007 type: host cluster: rhevm01 ifaces: - name: em1 - name: em2 - name: p3p1 ip: 172.31.224.200 netmask: 255.255.254.0 - name: p3p2 ip: 172.31.225.200 netmask: 255.255.254.0 - name: bond0 bond: - em1 - em2 network: rhevm ip: 172.31.222.200 netmask: 255.255.255.0 management: yes - name: bond0.36 network: vlan36 ip: 10.2.36.200 netmask: 255.255.254.0 gateway: 10.2.36.254 - name: bond0.2202 network: vlan2202 - name: bond0.38 network: vlan38 state: present ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **vm** dictionary | always | Returns all of the VMs variables and execution. **Sample:** { "boot\_order": [ "hd", "network" ], "changed": true, "changes": [ "Delete Protection" ], "cluster": "C1", "cpu\_share": "0", "created": false, "datacenter": "Default", "del\_prot": true, "disks": [ { "domain": "ssd-san", "name": "OS", "size": 40 } ], "eth0": "00:00:5E:00:53:00", "eth1": "00:00:5E:00:53:01", "eth2": "00:00:5E:00:53:02", "exists": true, "failed": false, "ifaces": [ { "name": "eth0", "vlan": "Management" }, { "name": "eth1", "vlan": "Internal" }, { "name": "eth2", "vlan": "External" } ], "image": false, "mempol": "0", "msg": [ "VM exists", "cpu\_share was already set to 0", "VM high availability was already set to True", "The boot order has already been set", "VM delete protection has been set to True", "Disk web2\_Disk0\_OS already exists", "The VM starting host was already set to host416" ], "name": "web2", "type": "server", "uuid": "4ba5a1be-e60b-4368-9533-920f156c817b", "vm\_ha": true, "vmcpu": "4", "vmhost": "host416", "vmmem": "16" } | ### Authors * Timothy Vandenbrande (@TimothyVandenbrande) ansible community.general.ohai – Returns inventory data from Ohai community.general.ohai – Returns inventory data from Ohai ========================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ohai`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Examples](#examples) Synopsis -------- * Similar to the [community.general.facter](facter_module#ansible-collections-community-general-facter-module) module, this runs the *Ohai* discovery program (<https://docs.chef.io/ohai.html>) on the remote host and returns JSON inventory data. *Ohai* data is a bit more verbose and nested than *facter*. Requirements ------------ The below requirements are needed on the host that executes this module. * ohai Examples -------- ``` # Retrieve (ohai) data from all Web servers and store in one-file per host ansible webservers -m ohai --tree=/tmp/ohaidata ``` ### Authors * Ansible Core Team * Michael DeHaan (@mpdehaan) ansible community.general.datadog_monitor – Manages Datadog monitors community.general.datadog\_monitor – Manages Datadog monitors ============================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.datadog_monitor`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manages monitors within Datadog. * Options as described on <https://docs.datadoghq.com/api/>. Requirements ------------ The below requirements are needed on the host that executes this module. * datadog Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_host** string added in 0.2.0 of community.general | | The URL to the Datadog API. Default value is `https://api.datadoghq.com`. This value can also be set with the `DATADOG_HOST` environment variable. | | **api\_key** string / required | | Your Datadog API key. | | **app\_key** string / required | | Your Datadog app key. | | **escalation\_message** string | | A message to include with a re-notification. Supports the '@username' notification we allow elsewhere. Not applicable if *renotify\_interval=None*. | | **evaluation\_delay** string | | Time to delay evaluation (in seconds). Effective for sparse values. | | **id** string | | The ID of the alert. If set, will be used instead of the name to locate the alert. | | **include\_tags** boolean added in 1.3.0 of community.general | **Choices:*** no * **yes** ← | Whether notifications from this monitor automatically inserts its triggering tags into the title. | | **locked** boolean | **Choices:*** **no** ← * yes | Whether changes to this monitor should be restricted to the creator or admins. | | **name** string / required | | The name of the alert. | | **new\_host\_delay** string | | A positive integer representing the number of seconds to wait before evaluating the monitor for new hosts. This gives the host time to fully initialize. | | **no\_data\_timeframe** string | | The number of minutes before a monitor will notify when data stops reporting. Must be at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks. If not specified, it defaults to 2x timeframe for metric, 2 minutes for service. | | **notification\_message** string | | A message to include with notifications for this monitor. Email notifications can be sent to specific users by using the same '@username' notation as events. Monitor message template variables can be accessed by using double square brackets, i.e '[[' and ']]'. | | **notify\_audit** boolean | **Choices:*** **no** ← * yes | Whether tagged users will be notified on changes to this monitor. | | **notify\_no\_data** boolean | **Choices:*** **no** ← * yes | Whether this monitor will notify when data stops reporting. | | **query** string | | The monitor query to notify on. Syntax varies depending on what type of monitor you are creating. | | **renotify\_interval** string | | The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it is not resolved. | | **require\_full\_window** boolean | **Choices:*** no * yes | Whether this monitor needs a full window of data before it gets evaluated. We highly recommend you set this to False for sparse metrics, otherwise some evaluations will be skipped. | | **silenced** dictionary | **Default:**"" | Dictionary of scopes to silence, with timestamps or None. Each scope will be muted until the given POSIX timestamp or forever if the value is None. | | **state** string / required | **Choices:*** present * absent * mute * unmute | The designated state of the monitor. | | **tags** list / elements=string | | A list of tags to associate with your monitor when creating or updating. This can help you categorize and filter monitors. | | **thresholds** dictionary | | A dictionary of thresholds by status. Only available for service checks and metric alerts. Because each of them can have multiple thresholds, we do not define them directly in the query. If not specified, it defaults to: `{'ok': 1, 'critical': 1, 'warning': 1}`. | | **timeout\_h** string | | The number of hours of the monitor not reporting data before it will automatically resolve from a triggered state. | | **type** string | **Choices:*** metric alert * service check * event alert * process alert * log alert * query alert * trace-analytics alert * rum alert * composite | The type of the monitor. The types `query alert`, `trace-analytics alert` and `rum alert` were added in community.general 2.1.0. The type `composite` was added in community.general 3.4.0. | Examples -------- ``` - name: Create a metric monitor community.general.datadog_monitor: type: "metric alert" name: "Test monitor" state: "present" query: "datadog.agent.up.over('host:host1').last(2).count_by_status()" notification_message: "Host [[host.name]] with IP [[host.ip]] is failing to report to datadog." api_key: "9775a026f1ca7d1c6c5af9d94d9595a4" app_key: "87ce4a24b5553d2e482ea8a8500e71b8ad4554ff" - name: Deletes a monitor community.general.datadog_monitor: name: "Test monitor" state: "absent" api_key: "9775a026f1ca7d1c6c5af9d94d9595a4" app_key: "87ce4a24b5553d2e482ea8a8500e71b8ad4554ff" - name: Mutes a monitor community.general.datadog_monitor: name: "Test monitor" state: "mute" silenced: '{"*":None}' api_key: "9775a026f1ca7d1c6c5af9d94d9595a4" app_key: "87ce4a24b5553d2e482ea8a8500e71b8ad4554ff" - name: Unmutes a monitor community.general.datadog_monitor: name: "Test monitor" state: "unmute" api_key: "9775a026f1ca7d1c6c5af9d94d9595a4" app_key: "87ce4a24b5553d2e482ea8a8500e71b8ad4554ff" - name: Use datadoghq.eu platform instead of datadoghq.com community.general.datadog_monitor: name: "Test monitor" state: "absent" api_host: https://api.datadoghq.eu api_key: "9775a026f1ca7d1c6c5af9d94d9595a4" app_key: "87ce4a24b5553d2e482ea8a8500e71b8ad4554ff" ``` ### Authors * Sebastian Kornehl (@skornehl) ansible community.general.webfaction_app – Add or remove applications on a Webfaction host community.general.webfaction\_app – Add or remove applications on a Webfaction host =================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.webfaction_app`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Add or remove applications on a Webfaction host. Further documentation at <https://github.com/quentinsf/ansible-webfaction>. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **autostart** boolean | **Choices:*** **no** ← * yes | Whether the app should restart with an `autostart.cgi` script | | **extra\_info** string | **Default:**"" | Any extra parameters required by the app | | **login\_name** string / required | | The webfaction account to use | | **login\_password** string / required | | The webfaction password to use | | **machine** string | | The machine name to use (optional for accounts with only one machine) | | **name** string / required | | The name of the application | | **port\_open** boolean | **Choices:*** **no** ← * yes | IF the port should be opened | | **state** string | **Choices:*** **present** ← * absent | Whether the application should exist | | **type** string / required | | The type of application to create. See the Webfaction docs at <https://docs.webfaction.com/xmlrpc-api/apps.html> for a list. | Notes ----- Note * You can run playbooks that use this on a local machine, or on a Webfaction host, or elsewhere, since the scripts use the remote webfaction API. The location is not important. However, running them on multiple hosts *simultaneously* is best avoided. If you don’t specify *localhost* as your host, you may want to add `serial: 1` to the plays. * See [the webfaction API](https://docs.webfaction.com/xmlrpc-api/) for more info. Examples -------- ``` - name: Create a test app community.general.webfaction_app: name: "my_wsgi_app1" state: present type: mod_wsgi35-python27 login_name: "{{webfaction_user}}" login_password: "{{webfaction_passwd}}" machine: "{{webfaction_machine}}" ``` ### Authors * Quentin Stafford-Fraser (@quentinsf)
programming_docs
ansible community.general.utm_network_interface_address_info – Get info for a network/interface_address object community.general.utm\_network\_interface\_address\_info – Get info for a network/interface\_address object =========================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.utm_network_interface_address_info`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Get info for a network/interface\_address object in SOPHOS UTM. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **headers** dictionary | | A dictionary of additional headers to be sent to POST and PUT requests. Is needed for some modules | | **name** string / required | | The name of the object. Will be used to identify the entry | | **state** string | **Choices:*** absent * **present** ← | The desired state of the object. `present` will create or update an object `absent` will delete an object if it was present | | **utm\_host** string / required | | The REST Endpoint of the Sophos UTM. | | **utm\_port** integer | **Default:**4444 | The port of the REST interface. | | **utm\_protocol** string | **Choices:*** http * **https** ← | The protocol of the REST Endpoint. | | **utm\_token** string / required | | The token used to identify at the REST-API. See <https://www.sophos.com/en-us/medialibrary/PDFs/documentation/UTMonAWS/Sophos-UTM-RESTful-API.pdf?la=en>, Chapter 2.4.2. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether the REST interface's ssl certificate should be verified or not. | Examples -------- ``` - name: Get network interface address info utm_proxy_interface_address_info: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestNetworkInterfaceAddress ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **result** complex | success | The utm object that was created | | | **\_locked** boolean | success | Whether or not the object is currently locked | | | **\_ref** string | success | The reference name of the object | | | **\_type** string | success | The type of the object | | | **address** string | success | The ip4 address of the network/interface\_address object | | | **address6** string | success | The ip6 address of the network/interface\_address object | | | **comment** string | success | The comment string | | | **name** string | success | The name of the object | | | **resolved** boolean | success | Whether or not the object is resolved | | | **resolved6** boolean | success | Whether or not the object is resolved | ### Authors * Juergen Wiebe (@steamx) ansible community.general.hpilo_boot – Boot system using specific media through HP iLO interface community.general.hpilo\_boot – Boot system using specific media through HP iLO interface ========================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.hpilo_boot`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module boots a system through its HP iLO interface. The boot media can be one of: cdrom, floppy, hdd, network or usb. * This module requires the hpilo python module. Requirements ------------ The below requirements are needed on the host that executes this module. * python-hpilo Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **force** boolean | **Choices:*** **no** ← * yes | Whether to force a reboot (even when the system is already booted). As a safeguard, without force, hpilo\_boot will refuse to reboot a server that is already running. | | **host** string / required | | The HP iLO hostname/address that is linked to the physical system. | | **image** string | | The URL of a cdrom, floppy or usb boot media image. protocol://username:password@hostname:port/filename protocol is either 'http' or 'https' username:password is optional port is optional | | **login** string | **Default:**"Administrator" | The login name to authenticate to the HP iLO interface. | | **media** string | **Choices:*** cdrom * floppy * rbsu * hdd * network * normal * usb | The boot media to boot the system from | | **password** string | **Default:**"admin" | The password to authenticate to the HP iLO interface. | | **ssl\_version** string | **Choices:*** SSLv3 * SSLv23 * **TLSv1** ← * TLSv1\_1 * TLSv1\_2 | Change the ssl\_version used. | | **state** string | **Choices:*** boot\_always * **boot\_once** ← * connect * disconnect * no\_boot * poweroff | The state of the boot media. no\_boot: Do not boot from the device boot\_once: Boot from the device once and then notthereafter boot\_always: Boot from the device each time the server is rebooted connect: Connect the virtual media device and set to boot\_always disconnect: Disconnects the virtual media device and set to no\_boot poweroff: Power off the server | Notes ----- Note * To use a USB key image you need to specify floppy as boot media. * This module ought to be run from a system that can access the HP iLO interface directly, either by using `local_action` or using `delegate_to`. Examples -------- ``` - name: Task to boot a system using an ISO from an HP iLO interface only if the system is an HP server community.general.hpilo_boot: host: YOUR_ILO_ADDRESS login: YOUR_ILO_LOGIN password: YOUR_ILO_PASSWORD media: cdrom image: http://some-web-server/iso/boot.iso when: cmdb_hwmodel.startswith('HP ') delegate_to: localhost - name: Power off a server community.general.hpilo_boot: host: YOUR_ILO_HOST login: YOUR_ILO_LOGIN password: YOUR_ILO_PASSWORD state: poweroff delegate_to: localhost ``` ### Authors * Dag Wieers (@dagwieers) ansible community.general.rax_meta – Manipulate metadata for Rackspace Cloud Servers community.general.rax\_meta – Manipulate metadata for Rackspace Cloud Servers ============================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rax_meta`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manipulate metadata for Rackspace Cloud Servers Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * pyrax Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **address** string | | Server IP address to modify metadata for, will match any IP assigned to the server | | **api\_key** string | | Rackspace API key, overrides *credentials*. aliases: password | | **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/> | | **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided. aliases: creds\_file | | **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. | | **id** string | | Server ID to modify metadata for | | **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. | | **meta** dictionary | | A hash of metadata to associate with the instance | | **name** string | | Server name to modify metadata for | | **region** string | | Region to create an instance in. | | **tenant\_id** string | | The tenant ID used for authentication. | | **tenant\_name** string | | The tenant name used for authentication. | | **username** string | | Rackspace username, overrides *credentials*. | | **validate\_certs** boolean | **Choices:*** no * yes | Whether or not to require SSL validation of API endpoints. aliases: verify\_ssl | Notes ----- Note * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) Examples -------- ``` - name: Set metadata for a server hosts: all gather_facts: False tasks: - name: Set metadata local_action: module: rax_meta credentials: ~/.raxpub name: "{{ inventory_hostname }}" region: DFW meta: group: primary_group groups: - group_two - group_three app: my_app - name: Clear metadata local_action: module: rax_meta credentials: ~/.raxpub name: "{{ inventory_hostname }}" region: DFW ``` ### Authors * Matt Martz (@sivel) ansible community.general.catapult – Send a sms / mms using the catapult bandwidth api community.general.catapult – Send a sms / mms using the catapult bandwidth api ============================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.catapult`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Allows notifications to be sent using sms / mms via the catapult bandwidth api. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_secret** string / required | | Api Secret from Api account page. | | **api\_token** string / required | | Api Token from Api account page. | | **dest** list / elements=string / required | | The phone number or numbers the message should be sent to (must be in E.164 format, like `+19195551212`). | | **media** string | | For MMS messages, a media url to the location of the media to be sent with the message. | | **msg** string / required | | The contents of the text message (must be 2048 characters or less). | | **src** string / required | | One of your catapult telephone numbers the message should come from (must be in E.164 format, like `+19195551212`). | | **user\_id** string / required | | User Id from Api account page. | Notes ----- Note * Will return changed even if the media url is wrong. * Will return changed if the destination number is invalid. Examples -------- ``` - name: Send a mms to multiple users community.general.catapult: src: "+15035555555" dest: - "+12525089000" - "+12018994225" media: "http://example.com/foobar.jpg" msg: "Task is complete" user_id: "{{ user_id }}" api_token: "{{ api_token }}" api_secret: "{{ api_secret }}" - name: Send a sms to a single user community.general.catapult: src: "+15035555555" dest: "+12018994225" msg: "Consider yourself notified" user_id: "{{ user_id }}" api_token: "{{ api_token }}" api_secret: "{{ api_secret }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **changed** boolean | always | Whether the api accepted the message. **Sample:** True | ### Authors * Jonathan Mainguy (@Jmainguy) ansible community.general.syspatch – Manage OpenBSD system patches community.general.syspatch – Manage OpenBSD system patches ========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.syspatch`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage OpenBSD system patches using syspatch. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **revert** string | **Choices:*** all * one | Revert system patches. | Examples -------- ``` - name: Apply all available system patches community.general.syspatch: - name: Revert last patch community.general.syspatch: revert: one - name: Revert all patches community.general.syspatch: revert: all # NOTE: You can reboot automatically if a patch requires it: - name: Apply all patches and store result community.general.syspatch: register: syspatch - name: Reboot if patch requires it ansible.builtin.reboot: when: syspatch.reboot_needed ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **rc** integer | always | The command return code (0 means success) | | **reboot\_needed** boolean | always | Whether or not a reboot is required after an update. **Sample:** True | | **stderr** string | always | syspatch standard error. **Sample:** syspatch: need root privileges | | **stdout** string | always | syspatch standard output. **Sample:** 001\_rip6cksum | ### Authors * Andrew Klaus (@precurse) ansible community.general.bitbucket_pipeline_key_pair – Manages Bitbucket pipeline SSH key pair community.general.bitbucket\_pipeline\_key\_pair – Manages Bitbucket pipeline SSH key pair ========================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.bitbucket_pipeline_key_pair`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manages Bitbucket pipeline SSH key pair. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **client\_id** string | | OAuth consumer key. If not set the environment variable `BITBUCKET_CLIENT_ID` will be used. | | **client\_secret** string | | OAuth consumer secret. If not set the environment variable `BITBUCKET_CLIENT_SECRET` will be used. | | **private\_key** string | | The private key. | | **public\_key** string | | The public key. | | **repository** string / required | | The repository name. | | **state** string / required | **Choices:*** absent * present | Indicates desired state of the key pair. | | **username** string / required | | The repository owner. | Notes ----- Note * Bitbucket OAuth consumer key and secret can be obtained from Bitbucket profile -> Settings -> Access Management -> OAuth. * Check mode is supported. Examples -------- ``` - name: Create or update SSH key pair community.general.bitbucket_pipeline_key_pair: repository: 'bitbucket-repo' username: bitbucket_username public_key: '{{lookup("file", "bitbucket.pub") }}' private_key: '{{lookup("file", "bitbucket") }}' state: present - name: Remove SSH key pair community.general.bitbucket_pipeline_key_pair: repository: bitbucket-repo username: bitbucket_username state: absent ``` ### Authors * Evgeniy Krysanov (@catcombo) ansible community.general.linode_v4 – Manage instances on the Linode cloud. community.general.linode\_v4 – Manage instances on the Linode cloud. ==================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.linode_v4`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage instances on the Linode cloud. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * linode\_api4 >= 2.0.0 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **access\_token** string / required | | The Linode API v4 access token. It may also be specified by exposing the `LINODE_ACCESS_TOKEN` environment variable. See <https://www.linode.com/docs/api#access-and-authentication>. | | **authorized\_keys** list / elements=string | | A list of SSH public key parts to deploy for the root user. | | **group** string | | The group that the instance should be marked under. Please note, that group labelling is deprecated but still supported. The encouraged method for marking instances is to use tags. | | **image** string | | The image of the instance. This is a required parameter only when creating Linode instances. See <https://www.linode.com/docs/api/images/>. | | **label** string / required | | The instance label. This label is used as the main determiner for idempotence for the module and is therefore mandatory. | | **private\_ip** boolean added in 3.0.0 of community.general | **Choices:*** **no** ← * yes | If `true`, the created Linode will have private networking enabled and assigned a private IPv4 address. | | **region** string | | The region of the instance. This is a required parameter only when creating Linode instances. See <https://www.linode.com/docs/api/regions/>. | | **root\_pass** string | | The password for the root user. If not specified, one will be generated. This generated password will be available in the task success JSON. | | **stackscript\_data** dictionary added in 1.3.0 of community.general | | An object containing arguments to any User Defined Fields present in the StackScript used when creating the instance. Only valid when a stackscript\_id is provided. See <https://www.linode.com/docs/api/stackscripts/>. | | **stackscript\_id** integer added in 1.3.0 of community.general | | The numeric ID of the StackScript to use when creating the instance. See <https://www.linode.com/docs/api/stackscripts/>. | | **state** string / required | **Choices:*** present * absent | The desired instance state. | | **tags** list / elements=string | | The tags that the instance should be marked under. See <https://www.linode.com/docs/api/tags/>. | | **type** string | | The type of the instance. This is a required parameter only when creating Linode instances. See <https://www.linode.com/docs/api/linode-types/>. | Notes ----- Note * No Linode resizing is currently implemented. This module will, in time, replace the current Linode module which uses deprecated API bindings on the Linode side. Examples -------- ``` - name: Create a new Linode. community.general.linode_v4: label: new-linode type: g6-nanode-1 region: eu-west image: linode/debian9 root_pass: passw0rd authorized_keys: - "ssh-rsa ..." stackscript_id: 1337 stackscript_data: variable: value state: present - name: Delete that new Linode. community.general.linode_v4: label: new-linode state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **instance** dictionary | Always. | The instance description in JSON serialized form. **Sample:** {'alerts': {'cpu': 90, 'io': 10000, 'network\_in': 10, 'network\_out': 10, 'transfer\_quota': 80}, 'backups': {'enabled': False, 'schedule': {'day': None, 'window': None}}, 'created': '2018-09-26T08:12:33', 'group': 'Foobar Group', 'hypervisor': 'kvm', 'id': 10480444, 'image': 'linode/centos7', 'ipv4': ['130.132.285.233'], 'ipv6': '2a82:7e00::h03c:46ff:fe04:5cd2/64', 'label': 'lin-foo', 'region': 'eu-west', 'root\_pass': 'foobar', 'specs': {'disk': 25600, 'memory': 1024, 'transfer': 1000, 'vcpus': 1}, 'status': 'running', 'tags': [], 'type': 'g6-nanode-1', 'updated': '2018-09-26T10:10:14', 'watchdog\_enabled': True} | ### Authors * Luke Murphy (@decentral1se)
programming_docs
ansible community.general.pagerduty – Create PagerDuty maintenance windows community.general.pagerduty – Create PagerDuty maintenance windows ================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pagerduty`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This module will let you create PagerDuty maintenance windows Requirements ------------ The below requirements are needed on the host that executes this module. * PagerDuty API access Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **desc** string | **Default:**"Created by Ansible" | Short description of maintenance window. | | **hours** string | **Default:**"1" | Length of maintenance window in hours. | | **minutes** string | **Default:**"0" | Maintenance window in minutes (this is added to the hours). | | **name** string | | PagerDuty unique subdomain. Obsolete. It is not used with PagerDuty REST v2 API. | | **requester\_id** string | | ID of user making the request. Only needed when creating a maintenance\_window. | | **service** list / elements=string | | A comma separated list of PagerDuty service IDs. aliases: services | | **state** string / required | **Choices:*** running * started * ongoing * absent | Create a maintenance window or get a list of ongoing windows. | | **token** string / required | | A pagerduty token, generated on the pagerduty site. It is used for authorization. | | **user** string | | PagerDuty user ID. Obsolete. Please, use *token* for authorization. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | | **window\_id** string | | ID of maintenance window. Only needed when absent a maintenance\_window. | Examples -------- ``` - name: List ongoing maintenance windows using a token community.general.pagerduty: name: companyabc token: xxxxxxxxxxxxxx state: ongoing - name: Create a 1 hour maintenance window for service FOO123 community.general.pagerduty: name: companyabc user: [email protected] token: yourtoken state: running service: FOO123 - name: Create a 5 minute maintenance window for service FOO123 community.general.pagerduty: name: companyabc token: xxxxxxxxxxxxxx hours: 0 minutes: 5 state: running service: FOO123 - name: Create a 4 hour maintenance window for service FOO123 with the description "deployment" community.general.pagerduty: name: companyabc user: [email protected] state: running service: FOO123 hours: 4 desc: deployment register: pd_window - name: Delete the previous maintenance window community.general.pagerduty: name: companyabc user: [email protected] state: absent window_id: '{{ pd_window.result.maintenance_window.id }}' # Delete a maintenance window from a separate playbook than its creation, # and if it is the only existing maintenance window - name: Check community.general.pagerduty: requester_id: XXXXXXX token: yourtoken state: ongoing register: pd_window - name: Delete community.general.pagerduty: requester_id: XXXXXXX token: yourtoken state: absent window_id: "{{ pd_window.result.maintenance_windows[0].id }}" ``` ### Authors * Andrew Newdigate (@suprememoocow) * Dylan Silva (@thaumos) * Justin Johns (!UNKNOWN) * Bruce Pennypacker (@bpennypacker) ansible community.general.svr4pkg – Manage Solaris SVR4 packages community.general.svr4pkg – Manage Solaris SVR4 packages ======================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.svr4pkg`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manages SVR4 packages on Solaris 10 and 11. * These were the native packages on Solaris <= 10 and are available as a legacy feature in Solaris 11. * Note that this is a very basic packaging system. It will not enforce dependencies on install or remove. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **category** boolean | **Choices:*** **no** ← * yes | Install/Remove category instead of a single package. | | **name** string / required | | Package name, e.g. `SUNWcsr` | | **proxy** string | | HTTP[s] proxy to be used if `src` is a URL. | | **response\_file** string | | Specifies the location of a response file to be used if package expects input on install. (added in Ansible 1.4) | | **src** string | | Specifies the location to install the package from. Required when `state=present`. Can be any path acceptable to the `pkgadd` command's `-d` option. e.g.: `somefile.pkg`, `/dir/with/pkgs`, `http:/server/mypkgs.pkg`. If using a file or directory, they must already be accessible by the host. See the [ansible.builtin.copy](../../ansible/builtin/copy_module) module for a way to get them there. | | **state** string / required | **Choices:*** present * absent | Whether to install (`present`), or remove (`absent`) a package. If the package is to be installed, then *src* is required. The SVR4 package system doesn't provide an upgrade operation. You need to uninstall the old, then install the new package. | | **zone** string | **Choices:*** current * **all** ← | Whether to install the package only in the current zone, or install it into all zones. The installation into all zones works only if you are working with the global zone. | Examples -------- ``` - name: Install a package from an already copied file community.general.svr4pkg: name: CSWcommon src: /tmp/cswpkgs.pkg state: present - name: Install a package directly from an http site community.general.svr4pkg: name: CSWpkgutil src: 'http://get.opencsw.org/now' state: present zone: current - name: Install a package with a response file community.general.svr4pkg: name: CSWggrep src: /tmp/third-party.pkg response_file: /tmp/ggrep.response state: present - name: Ensure that a package is not installed community.general.svr4pkg: name: SUNWgnome-sound-recorder state: absent - name: Ensure that a category is not installed community.general.svr4pkg: name: FIREFOX state: absent category: true ``` ### Authors * Boyd Adamson (@brontitall) ansible community.general.redfish_config – Manages Out-Of-Band controllers using Redfish APIs community.general.redfish\_config – Manages Out-Of-Band controllers using Redfish APIs ====================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.redfish_config`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Builds Redfish URIs locally and sends them to remote OOB controllers to set or update a configuration attribute. * Manages BIOS configuration settings. * Manages OOB controller configuration settings. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auth\_token** string added in 2.3.0 of community.general | | Security token for authentication with OOB controller | | **baseuri** string / required | | Base URI of OOB controller | | **bios\_attributes** dictionary added in 0.2.0 of community.general | **Default:**{} | dictionary of BIOS attributes to update | | **boot\_order** list / elements=string added in 0.2.0 of community.general | **Default:**[] | list of BootOptionReference strings specifying the BootOrder | | **category** string / required | | Category to execute on OOB controller | | **command** list / elements=string / required | | List of commands to execute on OOB controller | | **network\_protocols** dictionary added in 0.2.0 of community.general | | setting dict of manager services to update | | **nic\_addr** string added in 0.2.0 of community.general | **Default:**"null" | EthernetInterface Address string on OOB controller | | **nic\_config** dictionary added in 0.2.0 of community.general | | setting dict of EthernetInterface on OOB controller | | **password** string | | Password for authentication with OOB controller | | **resource\_id** string added in 0.2.0 of community.general | | The ID of the System, Manager or Chassis to modify | | **strip\_etag\_quotes** boolean added in 3.7.0 of community.general | **Choices:*** **no** ← * yes | Removes surrounding quotes of etag used in `If-Match` header of `PATCH` requests. Only use this option to resolve bad vendor implementation where `If-Match` only matches the unquoted etag string. | | **timeout** integer | **Default:**10 | Timeout in seconds for URL requests to OOB controller | | **username** string | | User for authentication with OOB controller | Examples -------- ``` - name: Set BootMode to UEFI community.general.redfish_config: category: Systems command: SetBiosAttributes resource_id: 437XR1138R2 bios_attributes: BootMode: "Uefi" baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Set multiple BootMode attributes community.general.redfish_config: category: Systems command: SetBiosAttributes resource_id: 437XR1138R2 bios_attributes: BootMode: "Bios" OneTimeBootMode: "Enabled" BootSeqRetry: "Enabled" baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Enable PXE Boot for NIC1 community.general.redfish_config: category: Systems command: SetBiosAttributes resource_id: 437XR1138R2 bios_attributes: PxeDev1EnDis: Enabled baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Set BIOS default settings with a timeout of 20 seconds community.general.redfish_config: category: Systems command: SetBiosDefaultSettings resource_id: 437XR1138R2 baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" timeout: 20 - name: Set boot order community.general.redfish_config: category: Systems command: SetBootOrder boot_order: - Boot0002 - Boot0001 - Boot0000 - Boot0003 - Boot0004 baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Set boot order to the default community.general.redfish_config: category: Systems command: SetDefaultBootOrder baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Set Manager Network Protocols community.general.redfish_config: category: Manager command: SetNetworkProtocols network_protocols: SNMP: ProtocolEnabled: True Port: 161 HTTP: ProtocolEnabled: False Port: 8080 baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Set Manager NIC community.general.redfish_config: category: Manager command: SetManagerNic nic_config: DHCPv4: DHCPEnabled: False IPv4StaticAddresses: Address: 192.168.1.3 Gateway: 192.168.1.1 SubnetMask: 255.255.255.0 baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **msg** string | always | Message with action result or error description **Sample:** Action was successful | ### Authors * Jose Delarosa (@jose-delarosa) ansible community.general.scaleway_image_info – Gather information about the Scaleway images available. community.general.scaleway\_image\_info – Gather information about the Scaleway images available. ================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.scaleway_image_info`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Gather information about the Scaleway images available. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_timeout** integer | **Default:**30 | HTTP timeout to Scaleway API in seconds. aliases: timeout | | **api\_token** string / required | | Scaleway OAuth token. aliases: oauth\_token | | **api\_url** string | **Default:**"https://api.scaleway.com" | Scaleway API URL. aliases: base\_url | | **query\_parameters** dictionary | **Default:**{} | List of parameters passed to the query string. | | **region** string / required | **Choices:*** ams1 * EMEA-NL-EVS * par1 * EMEA-FR-PAR1 * par2 * EMEA-FR-PAR2 * waw1 * EMEA-PL-WAW1 | Scaleway compute zone | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Validate SSL certs of the Scaleway API. | Notes ----- Note * Also see the API documentation on <https://developer.scaleway.com/> * If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `SCW_TOKEN`, `SCW_API_KEY`, `SCW_OAUTH_TOKEN` or `SCW_API_TOKEN`. * If one wants to use a different `api_url` one can also set the `SCW_API_URL` environment variable. Examples -------- ``` - name: Gather Scaleway images information community.general.scaleway_image_info: region: par1 register: result - ansible.builtin.debug: msg: "{{ result.scaleway_image_info }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **scaleway\_image\_info** list / elements=dictionary | success | Response from Scaleway API. For more details please refer to: <https://developers.scaleway.com/en/products/instance/api/>. **Sample:** {'scaleway\_image\_info': [{'arch': 'x86\_64', 'creation\_date': '2018-07-17T16:18:49.276456+00:00', 'default\_bootscript': {'architecture': 'x86\_64', 'bootcmdargs': 'LINUX\_COMMON scaleway boot=local nbd.max\_part=16', 'default': False, 'dtb': '', 'id': '15fbd2f7-a0f9-412b-8502-6a44da8d98b8', 'initrd': 'http://169.254.42.24/initrd/initrd-Linux-x86\_64-v3.14.5.gz', 'kernel': 'http://169.254.42.24/kernel/x86\_64-mainline-lts-4.9-4.9.93-rev1/vmlinuz-4.9.93', 'organization': '11111111-1111-4111-8111-111111111111', 'public': True, 'title': 'x86\_64 mainline 4.9.93 rev1'}, 'extra\_volumes': [], 'from\_server': None, 'id': '00ae4a88-3252-4eda-9feb-5f6b56bf5ef0', 'modification\_date': '2018-07-17T16:42:06.319315+00:00', 'name': 'Debian Stretch', 'organization': '51b656e3-4865-41e8-adbc-0c45bdd780db', 'public': True, 'root\_volume': {'id': 'da32dfbb-c5ff-476d-ae2d-c297dd09b7dd', 'name': 'snapshot-2a7229dc-d431-4dc5-b66e-95db08b773af-2018-07-17\_16:18', 'size': 25000000000, 'volume\_type': 'l\_ssd'}, 'state': 'available'}]} | ### Authors * Yanis Guenane (@Spredzy) * Remy Leone (@sieben) ansible community.general.proxmox_kvm – Management of Qemu(KVM) Virtual Machines in Proxmox VE cluster. community.general.proxmox\_kvm – Management of Qemu(KVM) Virtual Machines in Proxmox VE cluster. ================================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.proxmox_kvm`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Allows you to create/delete/stop Qemu(KVM) Virtual Machines in Proxmox VE cluster. * From community.general 4.0.0 on, there will be no default values, see *proxmox\_default\_behavior*. Requirements ------------ The below requirements are needed on the host that executes this module. * proxmoxer * requests Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **acpi** boolean | **Choices:*** no * yes | Specify if ACPI should be enabled/disabled. If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `yes`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **agent** boolean | **Choices:*** no * yes | Specify if the QEMU Guest Agent should be enabled/disabled. | | **api\_host** string / required | | Specify the target host of the Proxmox VE cluster. | | **api\_password** string | | Specify the password to authenticate with. You can use `PROXMOX_PASSWORD` environment variable. | | **api\_token\_id** string added in 1.3.0 of community.general | | Specify the token ID. | | **api\_token\_secret** string added in 1.3.0 of community.general | | Specify the token secret. | | **api\_user** string / required | | Specify the user to authenticate with. | | **args** string | | Pass arbitrary arguments to kvm. This option is for experts only! If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `-serial unix:/var/run/qemu-server/<vmid>.serial,server,nowait`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **autostart** boolean | **Choices:*** no * yes | Specify if the VM should be automatically restarted after crash (currently ignored in PVE API). If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `no`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **balloon** integer | | Specify the amount of RAM for the VM in MB. Using zero disables the balloon driver. If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `0`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **bios** string | **Choices:*** seabios * ovmf | Specify the BIOS implementation. | | **boot** string | | Specify the boot order -> boot on floppy `a`, hard disk `c`, CD-ROM `d`, or network `n`. You can combine to set order. If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `cnd`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **bootdisk** string | | Enable booting from specified disk. `(ide|sata|scsi|virtio`\d+) | | **cicustom** string added in 1.3.0 of community.general | | cloud-init: Specify custom files to replace the automatically generated ones at start. | | **cipassword** string added in 1.3.0 of community.general | | cloud-init: password of default user to create. | | **citype** string added in 1.3.0 of community.general | **Choices:*** nocloud * configdrive2 | cloud-init: Specifies the cloud-init configuration format. The default depends on the configured operating system type (`ostype`). We use the `nocloud` format for Linux, and `configdrive2` for Windows. | | **ciuser** string added in 1.3.0 of community.general | | cloud-init: username of default user to create. | | **clone** string | | Name of VM to be cloned. If `vmid` is setted, `clone` can take arbitrary value but required for initiating the clone. | | **cores** integer | | Specify number of cores per socket. If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `1`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **cpu** string | | Specify emulated CPU type. If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `kvm64`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **cpulimit** integer | | Specify if CPU usage will be limited. Value 0 indicates no CPU limit. If the computer has 2 CPUs, it has total of '2' CPU time | | **cpuunits** integer | | Specify CPU weight for a VM. You can disable fair-scheduler configuration by setting this to 0 If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `1000`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **delete** string | | Specify a list of settings you want to delete. | | **description** string | | Specify the description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file. | | **digest** string | | Specify if to prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications. | | **force** boolean | **Choices:*** no * yes | Allow to force stop VM. Can be used with states `stopped`, `restarted` and `absent`. If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `no`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **format** string | **Choices:*** cloop * cow * qcow * qcow2 * qed * raw * vmdk * unspecified | Target drive's backing file's data format. Used only with clone Use *format=unspecified* and *full=false* for a linked clone. If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `qcow2`. If *proxmox\_default\_behavior* is set to `no_defaults`, not specifying this option is equivalent to setting it to `unspecified`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **freeze** boolean | **Choices:*** no * yes | Specify if PVE should freeze CPU at startup (use 'c' monitor command to start execution). | | **full** boolean | **Choices:*** no * **yes** ← | Create a full copy of all disk. This is always done when you clone a normal VM. For VM templates, we try to create a linked clone by default. Used only with clone | | **hostpci** dictionary | | Specify a hash/dictionary of map host pci devices into guest. `hostpci='{"key":"value", "key":"value"}'`. Keys allowed are - `hostpci[n]` where 0 ≤ n ≤ N. Values allowed are - `"host="HOSTPCIID[;HOSTPCIID2...]",pcie="1|0",rombar="1|0",x-vga="1|0""`. The `host` parameter is Host PCI device pass through. HOSTPCIID syntax is `bus:dev.func` (hexadecimal numbers). `pcie=boolean` *default=0* Choose the PCI-express bus (needs the q35 machine model). `rombar=boolean` *default=1* Specify whether or not the device's ROM will be visible in the guest's memory map. `x-vga=boolean` *default=0* Enable vfio-vga device support. /!\ This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care. | | **hotplug** string | | Selectively enable hotplug features. This is a comma separated list of hotplug features `'network', 'disk', 'cpu', 'memory' and 'usb'`. Value 0 disables hotplug completely and value 1 is an alias for the default `'network,disk,usb'`. | | **hugepages** string | **Choices:*** any * 2 * 1024 | Enable/disable hugepages memory. | | **ide** dictionary | | A hash/dictionary of volume used as IDE hard disk or CD-ROM. `ide='{"key":"value", "key":"value"}'`. Keys allowed are - `ide[n]` where 0 ≤ n ≤ 3. Values allowed are - `"storage:size,format=value"`. `storage` is the storage identifier where to create the disk. `size` is the size of the disk in GB. `format` is the drive's backing file's data format. `qcow2|raw|subvol`. | | **ipconfig** dictionary added in 1.3.0 of community.general | | cloud-init: Set the IP configuration. A hash/dictionary of network ip configurations. `ipconfig='{"key":"value", "key":"value"}'`. Keys allowed are - `ipconfig[n]` where 0 ≤ n ≤ network interfaces. Values allowed are - `"[gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,ip=<IPv4Format/CIDR>] [,ip6=<IPv6Format/CIDR>]"`. cloud-init: Specify IP addresses and gateways for the corresponding interface. IP addresses use CIDR notation, gateways are optional but they should be in the same subnet of specified IP address. The special string 'dhcp' can be used for IP addresses to use DHCP, in which case no explicit gateway should be provided. For IPv6 the special string 'auto' can be used to use stateless autoconfiguration. If cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using dhcp on IPv4. | | **keyboard** string | | Sets the keyboard layout for VNC server. | | **kvm** boolean | **Choices:*** no * yes | Enable/disable KVM hardware virtualization. If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `yes`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **localtime** boolean | **Choices:*** no * yes | Sets the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS. | | **lock** string | **Choices:*** migrate * backup * snapshot * rollback | Lock/unlock the VM. | | **machine** string | | Specifies the Qemu machine type. type => `(pc|pc(-i440fx`?-\d+\.\d+(\.pxe)?|q35|pc-q35-\d+\.\d+(\.pxe)?)) | | **memory** integer | | Memory size in MB for instance. If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `512`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **migrate\_downtime** integer | | Sets maximum tolerated downtime (in seconds) for migrations. | | **migrate\_speed** integer | | Sets maximum speed (in MB/s) for migrations. A value of 0 is no limit. | | **name** string | | Specifies the VM name. Only used on the configuration web interface. Required only for `state=present`. | | **nameservers** list / elements=string added in 1.3.0 of community.general | | cloud-init: DNS server IP address(es). If unset, PVE host settings are used. | | **net** dictionary | | A hash/dictionary of network interfaces for the VM. `net='{"key":"value", "key":"value"}'`. Keys allowed are - `net[n]` where 0 ≤ n ≤ N. Values allowed are - `"model="XX:XX:XX:XX:XX:XX",bridge="value",rate="value",tag="value",firewall="1|0",trunks="vlanid""`. Model is one of `e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3`. `XX:XX:XX:XX:XX:XX` should be an unique MAC address. This is automatically generated if not specified. The `bridge` parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'. Option `rate` is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'. If you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. | | **newid** integer | | VMID for the clone. Used only with clone. If newid is not set, the next available VM ID will be fetched from ProxmoxAPI. | | **node** string | | Proxmox VE node on which to operate. Only required for *state=present*. For every other states it will be autodiscovered. | | **numa** dictionary | | A hash/dictionaries of NUMA topology. `numa='{"key":"value", "key":"value"}'`. Keys allowed are - `numa[n]` where 0 ≤ n ≤ N. Values allowed are - `"cpu="<id[-id];...>",hostnodes="<id[-id];...>",memory="number",policy="(bind|interleave|preferred`""). `cpus` CPUs accessing this NUMA node. `hostnodes` Host NUMA nodes to use. `memory` Amount of memory this NUMA node provides. `policy` NUMA allocation policy. | | **numa\_enabled** boolean | **Choices:*** no * yes | Enables NUMA. | | **onboot** boolean | **Choices:*** no * yes | Specifies whether a VM will be started during system bootup. If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `yes`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **ostype** string | **Choices:*** other * wxp * w2k * w2k3 * w2k8 * wvista * win7 * win8 * win10 * l24 * l26 * solaris | Specifies guest operating system. This is used to enable special optimization/features for specific operating systems. The l26 is Linux 2.6/3.X Kernel. If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `l26`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **parallel** dictionary | | A hash/dictionary of map host parallel devices. `parallel='{"key":"value", "key":"value"}'`. Keys allowed are - (parallel[n]) where 0 ≤ n ≤ 2. Values allowed are - `"/dev/parport\d+|/dev/usb/lp\d+"`. | | **pool** string | | Add the new VM to the specified pool. | | **protection** boolean | **Choices:*** no * yes | Enable/disable the protection flag of the VM. This will enable/disable the remove VM and remove disk operations. | | **proxmox\_default\_behavior** string added in 1.3.0 of community.general | **Choices:*** compatibility * no\_defaults | Various module options used to have default values. This cause problems when user expects different behavior from proxmox by default or fill options which cause problems when they have been set. The default value is `compatibility`, which will ensure that the default values are used when the values are not explicitly specified by the user. From community.general 4.0.0 on, the default value will switch to `no_defaults`. To avoid deprecation warnings, please set *proxmox\_default\_behavior* to an explicit value. This affects the *acpi*, *autostart*, *balloon*, *boot*, *cores*, *cpu*, *cpuunits*, *force*, *format*, *kvm*, *memory*, *onboot*, *ostype*, *sockets*, *tablet*, *template*, *vga*, options. | | **reboot** boolean | **Choices:*** no * yes | Allow reboot. If set to `yes`, the VM exit on reboot. | | **revert** string | | Revert a pending change. | | **sata** dictionary | | A hash/dictionary of volume used as sata hard disk or CD-ROM. `sata='{"key":"value", "key":"value"}'`. Keys allowed are - `sata[n]` where 0 ≤ n ≤ 5. Values allowed are - `"storage:size,format=value"`. `storage` is the storage identifier where to create the disk. `size` is the size of the disk in GB. `format` is the drive's backing file's data format. `qcow2|raw|subvol`. | | **scsi** dictionary | | A hash/dictionary of volume used as SCSI hard disk or CD-ROM. `scsi='{"key":"value", "key":"value"}'`. Keys allowed are - `sata[n]` where 0 ≤ n ≤ 13. Values allowed are - `"storage:size,format=value"`. `storage` is the storage identifier where to create the disk. `size` is the size of the disk in GB. `format` is the drive's backing file's data format. `qcow2|raw|subvol`. | | **scsihw** string | **Choices:*** lsi * lsi53c810 * virtio-scsi-pci * virtio-scsi-single * megasas * pvscsi | Specifies the SCSI controller model. | | **searchdomains** list / elements=string added in 1.3.0 of community.general | | cloud-init: Sets DNS search domain(s). If unset, PVE host settings are used. | | **serial** dictionary | | A hash/dictionary of serial device to create inside the VM. `'{"key":"value", "key":"value"}'`. Keys allowed are - serial[n](str; required) where 0 ≤ n ≤ 3. Values allowed are - `(/dev/.+|socket`). /!\ If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care. | | **shares** integer | | Rets amount of memory shares for auto-ballooning. (0 - 50000). The larger the number is, the more memory this VM gets. The number is relative to weights of all other running VMs. Using 0 disables auto-ballooning, this means no limit. | | **skiplock** boolean | **Choices:*** no * yes | Ignore locks Only root is allowed to use this option. | | **smbios** string | | Specifies SMBIOS type 1 fields. | | **snapname** string | | The name of the snapshot. Used only with clone. | | **sockets** integer | | Sets the number of CPU sockets. (1 - N). If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `1`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **sshkeys** string added in 1.3.0 of community.general | | cloud-init: SSH key to assign to the default user. NOT TESTED with multiple keys but a multi-line value should work. | | **startdate** string | | Sets the initial date of the real time clock. Valid format for date are `'now'` or `'2016-09-25T16:01:21'` or `'2016-09-25'`. | | **startup** string | | Startup and shutdown behavior. `[[order=]\d+] [,up=\d+] [,down=\d+]`. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. | | **state** string | **Choices:*** **present** ← * started * absent * stopped * restarted * current | Indicates desired state of the instance. If `current`, the current state of the VM will be fetched. You can access it with `results.status` | | **storage** string | | Target storage for full clone. | | **tablet** boolean | **Choices:*** no * yes | Enables/disables the USB tablet device. If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `no`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **tags** list / elements=string added in 2.3.0 of community.general | | List of tags to apply to the VM instance. Tags must start with `[a-z0-9_]` followed by zero or more of the following characters `[a-z0-9_-+.]`. Tags are only available in Proxmox 6+. | | **target** string | | Target node. Only allowed if the original VM is on shared storage. Used only with clone | | **tdf** boolean | **Choices:*** no * yes | Enables/disables time drift fix. | | **template** boolean | **Choices:*** no * yes | Enables/disables the template. If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `no`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **timeout** integer | **Default:**30 | Timeout for operations. | | **update** boolean | **Choices:*** **no** ← * yes | If `yes`, the VM will be updated with new value. Cause of the operations of the API and security reasons, I have disabled the update of the following parameters `net, virtio, ide, sata, scsi`. Per example updating `net` update the MAC address and `virtio` create always new disk... Update of `pool` is disabled. It needs an additional API endpoint not covered by this module. | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | | **vcpus** integer | | Sets number of hotplugged vcpus. | | **vga** string | **Choices:*** std * cirrus * vmware * qxl * serial0 * serial1 * serial2 * serial3 * qxl2 * qxl3 * qxl4 | Select VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use option 'std' or 'vmware'. If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `std`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **virtio** dictionary | | A hash/dictionary of volume used as VIRTIO hard disk. `virtio='{"key":"value", "key":"value"}'`. Keys allowed are - `virto[n]` where 0 ≤ n ≤ 15. Values allowed are - `"storage:size,format=value"`. `storage` is the storage identifier where to create the disk. `size` is the size of the disk in GB. `format` is the drive's backing file's data format. `qcow2|raw|subvol`. | | **vmid** integer | | Specifies the instance ID. If not set the next available ID will be fetched from ProxmoxAPI. | | **watchdog** string | | Creates a virtual hardware watchdog device. | Examples -------- ``` - name: Create new VM with minimal options community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado name: spynal node: sabrewulf - name: Create new VM with minimal options and given vmid community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado name: spynal node: sabrewulf vmid: 100 - name: Create new VM with two network interface options community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado name: spynal node: sabrewulf net: net0: 'virtio,bridge=vmbr1,rate=200' net1: 'e1000,bridge=vmbr2' - name: Create new VM with one network interface, three virto hard disk, 4 cores, and 2 vcpus community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado name: spynal node: sabrewulf net: net0: 'virtio,bridge=vmbr1,rate=200' virtio: virtio0: 'VMs_LVM:10' virtio1: 'VMs:2,format=qcow2' virtio2: 'VMs:5,format=raw' cores: 4 vcpus: 2 - name: > Clone VM with only source VM name. The VM source is spynal. The target VM name is zavala community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado clone: spynal name: zavala node: sabrewulf storage: VMs format: qcow2 timeout: 500 - name: > Create linked clone VM with only source VM name. The VM source is spynal. The target VM name is zavala community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado clone: spynal name: zavala node: sabrewulf storage: VMs full: no format: unspecified timeout: 500 - name: Clone VM with source vmid and target newid and raw format community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado clone: arbitrary_name vmid: 108 newid: 152 name: zavala node: sabrewulf storage: LVM_STO format: raw timeout: 300 - name: Create new VM and lock it for snapshot community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado name: spynal node: sabrewulf lock: snapshot - name: Create new VM and set protection to disable the remove VM and remove disk operations community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado name: spynal node: sabrewulf protection: yes - name: Create new VM using cloud-init with a username and password community.general.proxmox_kvm: node: sabrewulf api_user: root@pam api_password: secret api_host: helldorado name: spynal ide: ide2: 'local:cloudinit,format=qcow2' ciuser: mylinuxuser cipassword: supersecret searchdomains: 'mydomain.internal' nameservers: 1.1.1.1 net: net0: 'virtio,bridge=vmbr1,tag=77' ipconfig: ipconfig0: 'ip=192.168.1.1/24,gw=192.168.1.1' - name: Create new VM using Cloud-Init with an ssh key community.general.proxmox_kvm: node: sabrewulf api_user: root@pam api_password: secret api_host: helldorado name: spynal ide: ide2: 'local:cloudinit,format=qcow2' sshkeys: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILJkVm98B71lD5XHfihwcYHE9TVpsJmK1vR1JcaU82L+' searchdomains: 'mydomain.internal' nameservers: - '1.1.1.1' - '8.8.8.8' net: net0: 'virtio,bridge=vmbr1,tag=77' ipconfig: ipconfig0: 'ip=192.168.1.1/24' - name: Start VM community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado name: spynal node: sabrewulf state: started - name: Stop VM community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado name: spynal node: sabrewulf state: stopped - name: Stop VM with force community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado name: spynal node: sabrewulf state: stopped force: yes - name: Restart VM community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado name: spynal node: sabrewulf state: restarted - name: Remove VM community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado name: spynal node: sabrewulf state: absent - name: Get VM current state community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado name: spynal node: sabrewulf state: current - name: Update VM configuration community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado name: spynal node: sabrewulf cores: 8 memory: 16384 update: yes - name: Delete QEMU parameters community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado name: spynal node: sabrewulf delete: 'args,template,cpulimit' - name: Revert a pending change community.general.proxmox_kvm: api_user: root@pam api_password: secret api_host: helldorado name: spynal node: sabrewulf revert: 'template,cpulimit' ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **msg** string | always | A short message **Sample:** VM kropta with vmid = 110 is running | | **status** string | success, not clone, not absent, not update | The current virtual machine status. **Sample:** running | | **vmid** integer | success | The VM vmid. **Sample:** 115 | ### Authors * Abdoul Bah (@helldorado) <bahabdoul at gmail.com>
programming_docs
ansible community.general.icinga2_feature – Manage Icinga2 feature community.general.icinga2\_feature – Manage Icinga2 feature =========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.icinga2_feature`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This module can be used to enable or disable an Icinga2 feature. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **name** string / required | | This is the feature name to enable or disable. | | **state** string | **Choices:*** **present** ← * absent | If set to `present` and feature is disabled, then feature is enabled. If set to `present` and feature is already enabled, then nothing is changed. If set to `absent` and feature is enabled, then feature is disabled. If set to `absent` and feature is already disabled, then nothing is changed. | Examples -------- ``` - name: Enable ido-pgsql feature community.general.icinga2_feature: name: ido-pgsql state: present - name: Disable api feature community.general.icinga2_feature: name: api state: absent ``` ### Authors * Loic Blot (@nerzhul) ansible community.general.ipa_service – Manage FreeIPA service community.general.ipa\_service – Manage FreeIPA service ======================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ipa_service`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Add and delete an IPA service using IPA API. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **force** boolean | **Choices:*** no * yes | Force principal name even if host is not in DNS. | | **hosts** list / elements=string | | Defines the list of 'ManagedBy' hosts. | | **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_prot** string | **Choices:*** http * **https** ← | Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. | | **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **krbcanonicalname** string / required | | Principal of the service. Can not be changed as it is the unique identifier. aliases: name | | **state** string | **Choices:*** absent * **present** ← | State to ensure. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | This only applies if `ipa_prot` is *https*. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Ensure service is present community.general.ipa_service: name: http/host01.example.com state: present ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - name: Ensure service is absent community.general.ipa_service: name: http/host01.example.com state: absent ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - name: Changing Managing hosts list community.general.ipa_service: name: http/host01.example.com hosts: - host01.example.com - host02.example.com ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **service** dictionary | always | Service as returned by IPA API. | ### Authors * Cédric Parent (@cprh) ansible community.general.idrac_redfish_info – Gather PowerEdge server information through iDRAC using Redfish APIs community.general.idrac\_redfish\_info – Gather PowerEdge server information through iDRAC using Redfish APIs ============================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.idrac_redfish_info`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Builds Redfish URIs locally and sends them to remote iDRAC controllers to get information back. * For use with Dell EMC iDRAC operations that require Redfish OEM extensions * This module was called `idrac_redfish_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [community.general.idrac\_redfish\_info](#ansible-collections-community-general-idrac-redfish-info-module) module no longer returns `ansible_facts`! Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auth\_token** string added in 2.3.0 of community.general | | Security token for authentication with OOB controller | | **baseuri** string / required | | Base URI of iDRAC controller | | **category** string / required | | Category to execute on iDRAC controller | | **command** list / elements=string / required | | List of commands to execute on iDRAC controller `GetManagerAttributes` returns the list of dicts containing iDRAC, LifecycleController and System attributes | | **password** string | | Password for authentication with iDRAC controller | | **timeout** integer | **Default:**10 | Timeout in seconds for URL requests to OOB controller | | **username** string | | User for authentication with iDRAC controller | Examples -------- ``` - name: Get Manager attributes with a default of 20 seconds community.general.idrac_redfish_info: category: Manager command: GetManagerAttributes baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" timeout: 20 register: result # Examples to display the value of all or a single iDRAC attribute - name: Store iDRAC attributes as a fact variable ansible.builtin.set_fact: idrac_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'iDRACAttributes') | list | first }}" - name: Display all iDRAC attributes ansible.builtin.debug: var: idrac_attributes - name: Display the value of 'Syslog.1.SysLogEnable' iDRAC attribute ansible.builtin.debug: var: idrac_attributes['Syslog.1.SysLogEnable'] # Examples to display the value of all or a single LifecycleController attribute - name: Store LifecycleController attributes as a fact variable ansible.builtin.set_fact: lc_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'LCAttributes') | list | first }}" - name: Display LifecycleController attributes ansible.builtin.debug: var: lc_attributes - name: Display the value of 'CollectSystemInventoryOnRestart' attribute ansible.builtin.debug: var: lc_attributes['LCAttributes.1.CollectSystemInventoryOnRestart'] # Examples to display the value of all or a single System attribute - name: Store System attributes as a fact variable ansible.builtin.set_fact: system_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'SystemAttributes') | list | first }}" - name: Display System attributes ansible.builtin.debug: var: system_attributes - name: Display the value of 'PSRedPolicy' ansible.builtin.debug: var: system_attributes['ServerPwr.1.PSRedPolicy'] ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **msg** dictionary | always | different results depending on task **Sample:** List of Manager attributes | ### Authors * Jose Delarosa (@jose-delarosa) ansible community.general.odbc – Execute SQL via ODBC community.general.odbc – Execute SQL via ODBC ============================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.odbc`. New in version 1.0.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Read/Write info via ODBC drivers. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * pyodbc Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **commit** boolean added in 1.3.0 of community.general | **Choices:*** no * **yes** ← | Perform a commit after the execution of the SQL query. Some databases allow a commit after a select whereas others raise an exception. Default is `true` to support legacy module behavior. | | **dsn** string / required | | The connection string passed into ODBC. | | **params** list / elements=string | | Parameters to pass to the SQL query. | | **query** string / required | | The SQL query to perform. | Notes ----- Note * Like the command module, this module always returns changed = yes whether or not the query would change the database. * To alter this behavior you can use `changed_when`: [yes or no]. * For details about return values (description and row\_count) see <https://github.com/mkleehammer/pyodbc/wiki/Cursor>. Examples -------- ``` - name: Set some values in the test db community.general.odbc: dsn: "DRIVER={ODBC Driver 13 for SQL Server};Server=db.ansible.com;Database=my_db;UID=admin;PWD=password;" query: "Select * from table_a where column1 = ?" params: - "value1" commit: false changed_when: no ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **description** list / elements=dictionary | success | List of dicts about the columns selected from the cursors, likely empty for DDL statements. See notes. | | **results** list / elements=list | success | List of lists of strings containing selected rows, likely empty for DDL statements. | | **row\_count** string | success | The number of rows selected or modified according to the cursor defaults to -1. See notes. | ### Authors * John Westcott IV (@john-westcott-iv) ansible community.general.nios_ptr_record – Configure Infoblox NIOS PTR records community.general.nios\_ptr\_record – Configure Infoblox NIOS PTR records ========================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nios_ptr_record`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Status](#status) DEPRECATED ---------- Removed in version 5.0.0 Why Please install the infoblox.nios\_modules collection and use the corresponding module from it. Alternative infoblox.nios\_modules.nios\_ptr\_record Synopsis -------- * Adds and/or removes instances of PTR record objects from Infoblox NIOS servers. This module manages NIOS `record:ptr` objects using the Infoblox WAPI interface over REST. Requirements ------------ The below requirements are needed on the host that executes this module. * infoblox\_client Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **comment** string | | Configures a text string comment to be associated with the instance of this object. The provided text string will be configured on the object instance. Maximum 256 characters. | | **extattrs** dictionary | | Allows for the configuration of Extensible Attributes on the instance of the object. This argument accepts a set of key / value pairs for configuration. | | **ipv4addr** string | | The IPv4 Address of the record. Mutually exclusive with the ipv6addr. aliases: ipv4 | | **ipv6addr** string | | The IPv6 Address of the record. Mutually exclusive with the ipv4addr. aliases: ipv6 | | **name** string | | The name of the DNS PTR record in FQDN format to add or remove from the system. The field is required only for an PTR object in Forward Mapping Zone. | | **provider** dictionary | | A dict object containing connection details. | | | **host** string | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. | | | **http\_pool\_connections** integer | **Default:**10 | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_pool\_maxsize** integer | **Default:**10 | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_request\_timeout** integer | **Default:**10 | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. | | | **max\_results** integer | **Default:**1000 | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. | | | **max\_retries** integer | **Default:**3 | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. | | | **password** string | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. | | | **silent\_ssl\_warnings** boolean | **Choices:*** no * **yes** ← | Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **username** string | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. | | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable. aliases: ssl\_verify | | | **wapi\_version** string | **Default:**"2.1" | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 | | **ptrdname** string | | The domain name of the DNS PTR record in FQDN format. | | **state** string | **Choices:*** **present** ← * absent | Configures the intended state of the instance of the object on the NIOS server. When this value is set to `present`, the object is configured on the device and when this value is set to `absent` the value is removed (if necessary) from the device. | | **ttl** integer | | Time To Live (TTL) value for the record. A 32-bit unsigned integer that represents the duration, in seconds, that the record is valid (cached). Zero indicates that the record should not be cached. | | **view** string | | Sets the DNS view to associate this a record with. The DNS view must already be configured on the system aliases: dns\_view | Notes ----- Note * This module must be run locally, which can be achieved by specifying `connection: local`. * Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible. Examples -------- ``` - name: Create a PTR Record community.general.nios_ptr_record: ipv4: 192.168.10.1 ptrdname: host.ansible.com state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Delete a PTR Record community.general.nios_ptr_record: ipv4: 192.168.10.1 ptrdname: host.ansible.com state: absent provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local ``` Status ------ * This module will be removed in version 5.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Trebuchet Clement (@clementtrebuchet)
programming_docs
ansible community.general.cobbler_sync – Sync Cobbler community.general.cobbler\_sync – Sync Cobbler ============================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.cobbler_sync`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Sync Cobbler to commit changes. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **host** string | **Default:**"127.0.0.1" | The name or IP address of the Cobbler system. | | **password** string | | The password to log in to Cobbler. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. | | **username** string | **Default:**"cobbler" | The username to log in to Cobbler. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. | Notes ----- Note * Concurrently syncing Cobbler is bound to fail with weird errors. * On python 2.7.8 and older (i.e. on RHEL7) you may need to tweak the python behaviour to disable certificate validation. More information at [Certificate verification in Python standard library HTTP clients](https://access.redhat.com/articles/2039753). Examples -------- ``` - name: Commit Cobbler changes community.general.cobbler_sync: host: cobbler01 username: cobbler password: MySuperSecureP4sswOrd run_once: yes delegate_to: localhost ``` ### Authors * Dag Wieers (@dagwieers) ansible community.general.keycloak_authentication – Configure authentication in Keycloak community.general.keycloak\_authentication – Configure authentication in Keycloak ================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.keycloak_authentication`. New in version 3.3.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module actually can only make a copy of an existing authentication flow, add an execution to it and configure it. * It can also delete the flow. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **alias** string / required | | Alias for the authentication flow. | | **auth\_client\_id** string | **Default:**"admin-cli" | OpenID Connect *client\_id* to authenticate to the API with. | | **auth\_client\_secret** string | | Client Secret to use in conjunction with *auth\_client\_id* (if required). | | **auth\_keycloak\_url** string / required | | URL to the Keycloak instance. aliases: url | | **auth\_password** string | | Password to authenticate for API access with. aliases: password | | **auth\_realm** string | | Keycloak realm name to authenticate to for API access. | | **auth\_username** string | | Username to authenticate for API access with. aliases: username | | **authenticationExecutions** list / elements=dictionary | | Configuration structure for the executions. | | | **authenticationConfig** dictionary | | Describe the config of the authentication. | | | **displayName** string | | Name of the execution or subflow to create or update. | | | **flowAlias** string | | Alias of parent flow. | | | **index** integer | | Priority order of the execution. | | | **providerId** string | | `providerID` for the new flow when not copied from an existing flow. | | | **requirement** string | **Choices:*** REQUIRED * ALTERNATIVE * DISABLED * CONDITIONAL | Control status of the subflow or execution. | | **copyFrom** string | | `flowAlias` of the authentication flow to use for the copy. | | **description** string | | Description of the flow. | | **force** boolean | **Choices:*** **no** ← * yes | If `true`, allows to remove the authentication flow and recreate it. | | **providerId** string | | `providerId` for the new flow when not copied from an existing flow. | | **realm** string / required | | The name of the realm in which is the authentication. | | **state** string | **Choices:*** **present** ← * absent | Control if the authentication flow must exists or not. | | **token** string added in 3.0.0 of community.general | | Authentication token for Keycloak API. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Verify TLS certificates (do not disable this in production). | Examples -------- ``` - name: Create an authentication flow from first broker login and add an execution to it. community.general.keycloak_authentication: auth_keycloak_url: http://localhost:8080/auth auth_realm: master auth_username: admin auth_password: password realm: master alias: "Copy of first broker login" copyFrom: "first broker login" authenticationExecutions: - providerId: "test-execution1" requirement: "REQUIRED" authenticationConfig: alias: "test.execution1.property" config: test1.property: "value" - providerId: "test-execution2" requirement: "REQUIRED" authenticationConfig: alias: "test.execution2.property" config: test2.property: "value" state: present - name: Re-create the authentication flow community.general.keycloak_authentication: auth_keycloak_url: http://localhost:8080/auth auth_realm: master auth_username: admin auth_password: password realm: master alias: "Copy of first broker login" copyFrom: "first broker login" authenticationExecutions: - providerId: "test-provisioning" requirement: "REQUIRED" authenticationConfig: alias: "test.provisioning.property" config: test.provisioning.property: "value" state: present force: true - name: Create an authentication flow with subflow containing an execution. community.general.keycloak_authentication: auth_keycloak_url: http://localhost:8080/auth auth_realm: master auth_username: admin auth_password: password realm: master alias: "Copy of first broker login" copyFrom: "first broker login" authenticationExecutions: - providerId: "test-execution1" requirement: "REQUIRED" - displayName: "New Subflow" requirement: "REQUIRED" - providerId: "auth-cookie" requirement: "REQUIRED" flowAlias: "New Sublow" state: present - name: Remove authentication. community.general.keycloak_authentication: auth_keycloak_url: http://localhost:8080/auth auth_realm: master auth_username: admin auth_password: password realm: master alias: "Copy of first broker login" state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **flow** dictionary | on success | JSON representation for the authentication. | ### Authors * Philippe Gauthier (@elfelip) * Gaëtan Daubresse (@Gaetan2907) ansible community.general.scaleway_organization_info – Gather information about the Scaleway organizations available. community.general.scaleway\_organization\_info – Gather information about the Scaleway organizations available. =============================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.scaleway_organization_info`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Gather information about the Scaleway organizations available. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_timeout** integer | **Default:**30 | HTTP timeout to Scaleway API in seconds. aliases: timeout | | **api\_token** string / required | | Scaleway OAuth token. aliases: oauth\_token | | **api\_url** string | **Default:**"https://account.scaleway.com" | Scaleway API URL aliases: base\_url | | **query\_parameters** dictionary | **Default:**{} | List of parameters passed to the query string. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Validate SSL certs of the Scaleway API. | Notes ----- Note * Also see the API documentation on <https://developer.scaleway.com/> * If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `SCW_TOKEN`, `SCW_API_KEY`, `SCW_OAUTH_TOKEN` or `SCW_API_TOKEN`. * If one wants to use a different `api_url` one can also set the `SCW_API_URL` environment variable. Examples -------- ``` - name: Gather Scaleway organizations information community.general.scaleway_organization_info: register: result - ansible.builtin.debug: msg: "{{ result.scaleway_organization_info }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **scaleway\_organization\_info** complex | success | Response from Scaleway API **Sample:** {'scaleway\_organization\_info': [{'address\_city\_name': 'Paris', 'address\_country\_code': 'FR', 'address\_line1': "42 Rue de l'univers", 'address\_line2': None, 'address\_postal\_code': '75042', 'address\_subdivision\_code': 'FR-75', 'creation\_date': '2018-08-06T13:43:28.508575+00:00', 'currency': 'EUR', 'customer\_class': 'individual', 'id': '3f709602-5e6c-4619-b80c-e8432ferewtr', 'locale': 'fr\_FR', 'modification\_date': '2018-08-06T14:56:41.401685+00:00', 'name': 'James Bond', 'support\_id': '694324', 'support\_level': 'basic', 'support\_pin': '9324', 'users': [], 'vat\_number': None, 'warnings': []}]} | ### Authors * Yanis Guenane (@Spredzy) * Remy Leone (@sieben) ansible community.general.redis_info – Gather information about Redis servers community.general.redis\_info – Gather information about Redis servers ====================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.redis_info`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Gathers information and statistics about Redis servers. Requirements ------------ The below requirements are needed on the host that executes this module. * redis Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **login\_host** string | **Default:**"localhost" | The host running the database. | | **login\_password** string | | The password used to authenticate with, when authentication is enabled for the Redis server. | | **login\_port** integer | **Default:**6379 | The port to connect to. | Notes ----- Note * Requires the redis-py Python package on the remote host. You can install it with pip (`pip install redis`) or with a package manager. <https://github.com/andymccurdy/redis-py> See Also -------- See also [community.general.redis](redis_module#ansible-collections-community-general-redis-module) The official documentation on the **community.general.redis** module. Examples -------- ``` - name: Get server information community.general.redis_info: register: result - name: Print server information ansible.builtin.debug: var: result.info ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **info** dictionary | success | The default set of server information sections <https://redis.io/commands/info>. **Sample:** {'active\_defrag\_hits': 0, 'active\_defrag\_key\_hits': 0, 'active\_defrag\_key\_misses': 0, 'active\_defrag\_misses': 0, 'active\_defrag\_running': 0, 'allocator\_active': 932409344, 'allocator\_allocated': 932062792, 'allocator\_frag\_bytes': 346552, 'allocator\_frag\_ratio': 1.0, 'allocator\_resident': 947253248, 'allocator\_rss\_bytes': 14843904, 'allocator\_rss\_ratio': 1.02, 'aof\_current\_rewrite\_time\_sec': -1, 'aof\_enabled': 0, 'aof\_last\_bgrewrite\_status': 'ok', 'aof\_last\_cow\_size': 0, 'aof\_last\_rewrite\_time\_sec': -1, 'aof\_last\_write\_status': 'ok', 'aof\_rewrite\_in\_progress': 0, 'aof\_rewrite\_scheduled': 0, 'arch\_bits': 64, 'atomicvar\_api': 'atomic-builtin', 'blocked\_clients': 0, 'client\_recent\_max\_input\_buffer': 4, 'client\_recent\_max\_output\_buffer': 0, 'cluster\_enabled': 0, 'config\_file': '', 'configured\_hz': 10, 'connected\_clients': 4, 'connected\_slaves': 0, 'db0': {'avg\_ttl': 1945628530, 'expires': 16, 'keys': 3341411}, 'evicted\_keys': 0, 'executable': '/data/redis-server', 'expired\_keys': 9, 'expired\_stale\_perc': 1.72, 'expired\_time\_cap\_reached\_count': 0, 'gcc\_version': '9.2.0', 'hz': 10, 'instantaneous\_input\_kbps': 0.0, 'instantaneous\_ops\_per\_sec': 0, 'instantaneous\_output\_kbps': 0.0, 'keyspace\_hits': 0, 'keyspace\_misses': 0, 'latest\_fork\_usec': 0, 'lazyfree\_pending\_objects': 0, 'loading': 0, 'lru\_clock': 11603632, 'master\_repl\_offset': 118831417, 'master\_replid': '0d904704e424e38c3cd896783e9f9d28d4836e5e', 'master\_replid2': '0000000000000000000000000000000000000000', 'maxmemory': 0, 'maxmemory\_human': '0B', 'maxmemory\_policy': 'noeviction', 'mem\_allocator': 'jemalloc-5.1.0', 'mem\_aof\_buffer': 0, 'mem\_clients\_normal': 49694, 'mem\_clients\_slaves': 0, 'mem\_fragmentation\_bytes': 12355480, 'mem\_fragmentation\_ratio': 1.01, 'mem\_not\_counted\_for\_evict': 0, 'mem\_replication\_backlog': 1048576, 'migrate\_cached\_sockets': 0, 'multiplexing\_api': 'epoll', 'number\_of\_cached\_scripts': 0, 'os': 'Linux 3.10.0-862.14.4.el7.x86\_64 x86\_64', 'process\_id': 1, 'pubsub\_channels': 0, 'pubsub\_patterns': 0, 'rdb\_bgsave\_in\_progress': 0, 'rdb\_changes\_since\_last\_save': 671, 'rdb\_current\_bgsave\_time\_sec': -1, 'rdb\_last\_bgsave\_status': 'ok', 'rdb\_last\_bgsave\_time\_sec': -1, 'rdb\_last\_cow\_size': 0, 'rdb\_last\_save\_time': 1588702236, 'redis\_build\_id': 'a31260535f820267', 'redis\_git\_dirty': 0, 'redis\_git\_sha1': 0, 'redis\_mode': 'standalone', 'redis\_version': '999.999.999', 'rejected\_connections': 0, 'repl\_backlog\_active': 1, 'repl\_backlog\_first\_byte\_offset': 118707937, 'repl\_backlog\_histlen': 123481, 'repl\_backlog\_size': 1048576, 'role': 'master', 'rss\_overhead\_bytes': -3051520, 'rss\_overhead\_ratio': 1.0, 'run\_id': '8d252f66c3ef89bd60a060cf8dc5cfe3d511c5e4', 'second\_repl\_offset': 118830003, 'slave\_expires\_tracked\_keys': 0, 'sync\_full': 0, 'sync\_partial\_err': 0, 'sync\_partial\_ok': 0, 'tcp\_port': 6379, 'total\_commands\_processed': 885, 'total\_connections\_received': 10, 'total\_net\_input\_bytes': 802709255, 'total\_net\_output\_bytes': 31754, 'total\_system\_memory': 135029538816, 'total\_system\_memory\_human': '125.76G', 'uptime\_in\_days': 53, 'uptime\_in\_seconds': 4631778, 'used\_cpu\_sys': 4.668282, 'used\_cpu\_sys\_children': 0.002191, 'used\_cpu\_user': 4.21088, 'used\_cpu\_user\_children': 0.0, 'used\_memory': 931908760, 'used\_memory\_dataset': 910774306, 'used\_memory\_dataset\_perc': '97.82%', 'used\_memory\_human': '888.74M', 'used\_memory\_lua': 37888, 'used\_memory\_lua\_human': '37.00K', 'used\_memory\_overhead': 21134454, 'used\_memory\_peak': 932015216, 'used\_memory\_peak\_human': '888.84M', 'used\_memory\_peak\_perc': '99.99%', 'used\_memory\_rss': 944201728, 'used\_memory\_rss\_human': '900.46M', 'used\_memory\_scripts': 0, 'used\_memory\_scripts\_human': '0B', 'used\_memory\_startup': 791264} | ### Authors * Pavlo Bashynskyi (@levonet) ansible community.general.sendgrid – Sends an email with the SendGrid API community.general.sendgrid – Sends an email with the SendGrid API ================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.sendgrid`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Sends an email with a SendGrid account through their API, not through the SMTP service. Requirements ------------ The below requirements are needed on the host that executes this module. * sendgrid Python library 1.6.22 or lower (Sendgrid API V2 supported) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string | | Sendgrid API key to use instead of username/password. | | **attachments** list / elements=path | | A list of relative or explicit paths of files you want to attach (7MB limit as per SendGrid docs). | | **bcc** list / elements=string | | A list of email addresses to bcc. | | **body** string / required | | The e-mail body content. | | **cc** list / elements=string | | A list of email addresses to cc. | | **from\_address** string / required | | The address in the "from" field for the email. | | **from\_name** string | | The name you want to appear in the from field, i.e 'John Doe'. | | **headers** dictionary | | A dict to pass on as headers. | | **html\_body** boolean | **Choices:*** **no** ← * yes | Whether the body is html content that should be rendered. | | **password** string | | Password that corresponds to the username. Since 2.2 it is only required if *api\_key* is not supplied. | | **subject** string / required | | The desired subject for the email. | | **to\_addresses** list / elements=string / required | | A list with one or more recipient email addresses. | | **username** string | | Username for logging into the SendGrid account. Since 2.2 it is only required if *api\_key* is not supplied. | Notes ----- Note * This module is non-idempotent because it sends an email through the external API. It is idempotent only in the case that the module fails. * Like the other notification modules, this one requires an external dependency to work. In this case, you’ll need an active SendGrid account. * In order to use api\_key, cc, bcc, attachments, from\_name, html\_body, headers you must pip install sendgrid * since 2.2 *username* and *password* are not required if you supply an *api\_key* Examples -------- ``` - name: Send an email to a single recipient that the deployment was successful community.general.sendgrid: username: "{{ sendgrid_username }}" password: "{{ sendgrid_password }}" from_address: "[email protected]" to_addresses: - "[email protected]" subject: "Deployment success." body: "The most recent Ansible deployment was successful." delegate_to: localhost - name: Send an email to more than one recipient that the build failed community.general.sendgrid: username: "{{ sendgrid_username }}" password: "{{ sendgrid_password }}" from_address: "[email protected]" to_addresses: - "[email protected]" - "[email protected]" subject: "Build failure!." body: "Unable to pull source repository from Git server." delegate_to: localhost ``` ### Authors * Matt Makai (@makaimc)
programming_docs
ansible community.general.emc_vnx_sg_member – Manage storage group member on EMC VNX community.general.emc\_vnx\_sg\_member – Manage storage group member on EMC VNX =============================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.emc_vnx_sg_member`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module manages the members of an existing storage group. Requirements ------------ The below requirements are needed on the host that executes this module. * An EMC VNX Storage device. * Ansible 2.7. * storops (0.5.10 or greater). Install using ‘pip install storops’. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **lunid** integer / required | | Lun id to be added. | | **name** string / required | | Name of the Storage group to manage. | | **sp\_address** string / required | | Address of the SP of target/secondary storage. | | **sp\_password** string | **Default:**"sysadmin" | password for accessing SP. | | **sp\_user** string | **Default:**"sysadmin" | Username for accessing SP. | | **state** string | **Choices:*** **present** ← * absent | Indicates the desired lunid state. `present` ensures specified lunid is present in the Storage Group. `absent` ensures specified lunid is absent from Storage Group. | Notes ----- Note * The modules prefixed with emc\_vnx are built to support the EMC VNX storage platform. Examples -------- ``` - name: Add lun to storage group community.general.emc_vnx_sg_member: name: sg01 sp_address: sp1a.fqdn sp_user: sysadmin sp_password: sysadmin lunid: 100 state: present - name: Remove lun from storage group community.general.emc_vnx_sg_member: name: sg01 sp_address: sp1a.fqdn sp_user: sysadmin sp_password: sysadmin lunid: 100 state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **hluid** integer | success | LUNID that hosts attached to the storage group will see. | ### Authors * Luca ‘remix\_tj’ Lorenzetto (@remixtj) ansible community.general.rax_queue – create / delete a queue in Rackspace Public Cloud community.general.rax\_queue – create / delete a queue in Rackspace Public Cloud ================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rax_queue`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * creates / deletes a Rackspace Public Cloud queue. Requirements ------------ The below requirements are needed on the host that executes this module. * pyrax * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string | | Rackspace API key, overrides *credentials*. aliases: password | | **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/> | | **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided. aliases: creds\_file | | **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. | | **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. | | **name** string | | Name to give the queue | | **region** string | | Region to create an instance in. | | **state** string | **Choices:*** **present** ← * absent | Indicate desired state of the resource | | **tenant\_id** string | | The tenant ID used for authentication. | | **tenant\_name** string | | The tenant name used for authentication. | | **username** string | | Rackspace username, overrides *credentials*. | | **validate\_certs** boolean | **Choices:*** no * yes | Whether or not to require SSL validation of API endpoints. aliases: verify\_ssl | Notes ----- Note * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) Examples -------- ``` - name: Build a Queue gather_facts: False hosts: local connection: local tasks: - name: Queue create request local_action: module: rax_queue credentials: ~/.raxpub name: my-queue region: DFW state: present register: my_queue ``` ### Authors * Christopher H. Laco (@claco) * Matt Martz (@sivel) ansible community.general.grove – Sends a notification to a grove.io channel community.general.grove – Sends a notification to a grove.io channel ==================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.grove`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * The `grove` module sends a message for a service to a Grove.io channel. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **channel\_token** string / required | | Token of the channel to post to. | | **icon\_url** string | | Icon for the service | | **message\_content** string / required | | Message content. The alias *message* is deprecated and will be removed in community.general 4.0.0. aliases: message | | **service** string | **Default:**"ansible" | Name of the service (displayed as the "user" in the message) | | **url** string | | Service URL for the web client | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Sends a notification to a grove.io channel community.general.grove: channel_token: 6Ph62VBBJOccmtTPZbubiPzdrhipZXtg service: my-app message: 'deployed {{ target }}' ``` ### Authors * Jonas Pfenniger (@zimbatm) ansible community.general.pipx – Manages applications installed with pipx community.general.pipx – Manages applications installed with pipx ================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pipx`. New in version 3.8.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage Python applications installed in isolated virtualenvs using pipx. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **executable** path | | Path to the `pipx` installed in the system. If not specified, the module will use `python -m pipx` to run the tool, using the same Python interpreter as ansible itself. | | **force** boolean | **Choices:*** **no** ← * yes | Force modification of the application's virtual environment. See `pipx` for details. Only used when *state=install*, *state=upgrade*, *state=upgrade\_all*, or *state=inject*. | | **include\_injected** boolean | **Choices:*** **no** ← * yes | Upgrade the injected packages along with the application. Only used when *state=upgrade* or *state=upgrade\_all*. | | **index\_url** string | | Base URL of Python Package Index. Only used when *state=install*, *state=upgrade*, or *state=inject*. | | **inject\_packages** list / elements=string | | Packages to be injected into an existing virtual environment. Only used when *state=inject*. | | **install\_deps** boolean | **Choices:*** **no** ← * yes | Include applications of dependent packages. Only used when *state=install* or *state=upgrade*. | | **name** string | | The name of the application to be installed. It must to be a simple package name. For passing package specifications or installing from URLs or directories, please use the *source* option. | | **python** string | | Python version to be used when creating the application virtual environment. Must be 3.6+. Only used when *state=install*, *state=reinstall*, or *state=reinstall\_all*. | | **source** string | | If the application source, such as a package with version specifier, or an URL, directory or any other accepted specification. See `pipx` documentation for more details. When specified, the `pipx` command will use *source* instead of *name*. | | **state** string | **Choices:*** present * absent * **install** ← * uninstall * uninstall\_all * inject * upgrade * upgrade\_all * reinstall * reinstall\_all | Desired state for the application. The states `present` and `absent` are aliases to `install` and `uninstall`, respectively. | Notes ----- Note * This module does not install the `pipx` python package, however that can be easily done with the module [ansible.builtin.pip](../../ansible/builtin/pip_module#ansible-collections-ansible-builtin-pip-module). * This module does not require `pipx` to be in the shell `PATH`, but it must be loadable by Python as a module. * Please note that `pipx` requires Python 3.6 or above. * This first implementation does not verify whether a specified version constraint has been installed or not. Hence, when using version operators, `pipx` module will always try to execute the operation, even when the application was previously installed. This feature will be added in the future. * See also the `pipx` documentation at <https://pypa.github.io/pipx/>. Examples -------- ``` - name: Install tox community.general.pipx: name: tox - name: Install tox from git repository community.general.pipx: name: tox source: git+https://github.com/tox-dev/tox.git - name: Upgrade tox community.general.pipx: name: tox state: upgrade - name: Reinstall black with specific Python version community.general.pipx: name: black state: reinstall python: 3.7 - name: Uninstall pycowsay community.general.pipx: name: pycowsay state: absent ``` ### Authors * Alexei Znamensky (@russoz) ansible community.general.clc_server_snapshot – Create, Delete and Restore server snapshots in CenturyLink Cloud. community.general.clc\_server\_snapshot – Create, Delete and Restore server snapshots in CenturyLink Cloud. =========================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.clc_server_snapshot`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * An Ansible module to Create, Delete and Restore server snapshots in CenturyLink Cloud. Requirements ------------ The below requirements are needed on the host that executes this module. * python = 2.7 * requests >= 2.5.0 * clc-sdk Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **expiration\_days** integer | **Default:**7 | The number of days to keep the server snapshot before it expires. | | **server\_ids** list / elements=string / required | | The list of CLC server Ids. | | **state** string | **Choices:*** **present** ← * absent * restore | The state to insure that the provided resources are in. | | **wait** string | **Default:**"yes" | Whether to wait for the provisioning tasks to finish before returning. | Notes ----- Note * To use this module, it is required to set the below environment variables which enables access to the Centurylink Cloud - CLC\_V2\_API\_USERNAME, the account login id for the centurylink cloud - CLC\_V2\_API\_PASSWORD, the account password for the centurylink cloud * Alternatively, the module accepts the API token and account alias. The API token can be generated using the CLC account login and password via the HTTP api call @ <https://api.ctl.io/v2/authentication/login> - CLC\_V2\_API\_TOKEN, the API token generated from <https://api.ctl.io/v2/authentication/login> - CLC\_ACCT\_ALIAS, the account alias associated with the centurylink cloud * Users can set CLC\_V2\_API\_URL to specify an endpoint for pointing to a different CLC environment. Examples -------- ``` # Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples - name: Create server snapshot community.general.clc_server_snapshot: server_ids: - UC1TEST-SVR01 - UC1TEST-SVR02 expiration_days: 10 wait: True state: present - name: Restore server snapshot community.general.clc_server_snapshot: server_ids: - UC1TEST-SVR01 - UC1TEST-SVR02 wait: True state: restore - name: Delete server snapshot community.general.clc_server_snapshot: server_ids: - UC1TEST-SVR01 - UC1TEST-SVR02 wait: True state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **server\_ids** list / elements=string | success | The list of server ids that are changed **Sample:** ['UC1TEST-SVR01', 'UC1TEST-SVR02'] | ### Authors * CLC Runner (@clc-runner) ansible community.general.logentries_msg – Send a message to logentries. community.general.logentries\_msg – Send a message to logentries. ================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.logentries_msg`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Send a message to logentries Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api** string | **Default:**"data.logentries.com" | API endpoint | | **msg** string / required | | The message body. | | **port** integer | **Default:**80 | API endpoint port | | **token** string / required | | Log token. | Examples -------- ``` - name: Send a message to logentries community.general.logentries_msg: token=00000000-0000-0000-0000-000000000000 msg="{{ ansible_hostname }}" ``` ### Authors * Jimmy Tang (@jcftang) <[jimmy\[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#f69c9f9b9b8fa982979891d0d5c5c1cdd0d5c3c4cdd0d5c2cecd8497869f92c1d0d5c2c0cd95999b)> ansible community.general.gitlab_runner – Create, modify and delete GitLab Runners. community.general.gitlab\_runner – Create, modify and delete GitLab Runners. ============================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.gitlab_runner`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Register, update and delete runners with the GitLab API. * All operations are performed using the GitLab API v4. * For details, consult the full API documentation at <https://docs.gitlab.com/ee/api/runners.html>. * A valid private API token is required for all operations. You can create as many tokens as you like using the GitLab web interface at [https://$GITLAB\_URL/profile/personal\_access\_tokens](#). * A valid registration token is required for registering a new runner. To create shared runners, you need to ask your administrator to give you this token. It can be found at [https://$GITLAB\_URL/admin/runners/](#). Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * python-gitlab >= 1.5.0 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **access\_level** string | **Choices:*** **ref\_protected** ← * not\_protected | Determines if a runner can pick up jobs only from protected branches. If set to `ref_protected`, runner can pick up jobs only from protected branches. If set to `not_protected`, runner can pick up jobs from both protected and unprotected branches. | | **active** boolean | **Choices:*** no * **yes** ← | Define if the runners is immediately active after creation. | | **api\_password** string | | The password to use for authentication against the API | | **api\_token** string | | Your private token to interact with the GitLab API. | | **api\_url** string | | The resolvable endpoint for the API | | **api\_username** string | | The username to use for authentication against the API | | **description** string / required | | The unique name of the runner. aliases: name | | **locked** boolean | **Choices:*** **no** ← * yes | Determines if the runner is locked or not. | | **maximum\_timeout** integer | **Default:**3600 | The maximum time that a runner has to complete a specific job. | | **owned** boolean added in 2.0.0 of community.general | **Choices:*** **no** ← * yes | Searches only runners available to the user when searching for existing, when false admin token required. | | **project** string added in 3.7.0 of community.general | | ID or full path of the project in the form of group/name. | | **registration\_token** string | | The registration token is used to register new runners. Required if *state* is `present`. | | **run\_untagged** boolean | **Choices:*** no * **yes** ← | Run untagged jobs or not. | | **state** string | **Choices:*** **present** ← * absent | Make sure that the runner with the same name exists with the same configuration or delete the runner with the same name. | | **tag\_list** list / elements=string | **Default:**[] | The tags that apply to the runner. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether or not to validate SSL certs when supplying a https endpoint. | Notes ----- Note * To create a new runner at least the `api_token`, `description` and `api_url` options are required. * Runners need to have unique descriptions. Examples -------- ``` - name: "Register runner" community.general.gitlab_runner: api_url: https://gitlab.example.com/ api_token: "{{ access_token }}" registration_token: 4gfdsg345 description: Docker Machine t1 state: present active: True tag_list: ['docker'] run_untagged: False locked: False - name: "Delete runner" community.general.gitlab_runner: api_url: https://gitlab.example.com/ api_token: "{{ access_token }}" description: Docker Machine t1 state: absent - name: Delete an owned runner as a non-admin community.general.gitlab_runner: api_url: https://gitlab.example.com/ api_token: "{{ access_token }}" description: Docker Machine t1 owned: yes state: absent - name: Register runner for a specific project community.general.gitlab_runner: api_url: https://gitlab.example.com/ api_token: "{{ access_token }}" registration_token: 4gfdsg345 description: MyProject runner state: present project: mygroup/mysubgroup/myproject ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **error** string | failed | the error message returned by the GitLab API **Sample:** 400: path is already in use | | **msg** string | always | Success or failure message **Sample:** Success | | **result** dictionary | always | json parsed response from the server | | **runner** dictionary | always | API object | ### Authors * Samy Coenen (@SamyCoenen) * Guillaume Martinez (@Lunik)
programming_docs
ansible community.general.xcc_redfish_command – Manages Lenovo Out-Of-Band controllers using Redfish APIs community.general.xcc\_redfish\_command – Manages Lenovo Out-Of-Band controllers using Redfish APIs =================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.xcc_redfish_command`. New in version 2.4.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Builds Redfish URIs locally and sends them to remote OOB controllers to perform an action or get information back or update a configuration attribute. * Manages virtual media. * Supports getting information back via GET method. * Supports updating a configuration attribute via PATCH method. * Supports performing an action via POST method. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auth\_token** string | | Security token for authentication with OOB controller | | **baseuri** string / required | | Base URI of OOB controller. | | **category** string / required | | Category to execute on OOB controller. | | **command** list / elements=string / required | | List of commands to execute on OOB controller. | | **password** string | | Password for authentication with OOB controller. | | **request\_body** dictionary | | The request body to patch or post. | | **resource\_id** string | | The ID of the System, Manager or Chassis to modify. | | **resource\_uri** string | | The resource uri to get or patch or post. | | **timeout** integer | **Default:**10 | Timeout in seconds for URL requests to OOB controller. | | **username** string | | Username for authentication with OOB controller. | | **virtual\_media** dictionary | | The options for VirtualMedia commands. | | | **image\_url** string | | The URL of the image to insert or eject. | | | **inserted** boolean | **Choices:*** no * **yes** ← | Indicates if the image is treated as inserted on command completion. | | | **media\_types** list / elements=string | | The list of media types appropriate for the image. | | | **password** string | | The password for accessing the image URL. | | | **transfer\_method** string | | The transfer method to use with the image. | | | **transfer\_protocol\_type** string | | The network protocol to use with the image. | | | **username** string | | The username for accessing the image URL. | | | **write\_protected** boolean | **Choices:*** no * **yes** ← | Indicates if the media is treated as write-protected. | Examples -------- ``` - name: Insert Virtual Media community.general.xcc_redfish_command: category: Manager command: VirtualMediaInsert baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" virtual_media: image_url: "http://example.com/images/SomeLinux-current.iso" media_types: - CD - DVD resource_id: "1" - name: Eject Virtual Media community.general.xcc_redfish_command: category: Manager command: VirtualMediaEject baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" virtual_media: image_url: "http://example.com/images/SomeLinux-current.iso" resource_id: "1" - name: Eject all Virtual Media community.general.xcc_redfish_command: category: Manager command: VirtualMediaEject baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" resource_id: "1" - name: Get ComputeSystem Oem property SystemStatus via GetResource command community.general.xcc_redfish_command: category: Raw command: GetResource baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" resource_uri: "/redfish/v1/Systems/1" register: result - ansible.builtin.debug: msg: "{{ result.redfish_facts.data.Oem.Lenovo.SystemStatus }}" - name: Get Oem DNS setting via GetResource command community.general.xcc_redfish_command: category: Raw command: GetResource baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" resource_uri: "/redfish/v1/Managers/1/NetworkProtocol/Oem/Lenovo/DNS" register: result - name: Print fetched information ansible.builtin.debug: msg: "{{ result.redfish_facts.data }}" - name: Get Lenovo FoD key collection resource via GetCollectionResource command community.general.xcc_redfish_command: category: Raw command: GetCollectionResource baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" resource_uri: "/redfish/v1/Managers/1/Oem/Lenovo/FoD/Keys" register: result - name: Print fetched information ansible.builtin.debug: msg: "{{ result.redfish_facts.data_list }}" - name: Update ComputeSystem property AssetTag via PatchResource command community.general.xcc_redfish_command: category: Raw command: PatchResource baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" resource_uri: "/redfish/v1/Systems/1" request_body: AssetTag: "new_asset_tag" - name: Perform BootToBIOSSetup action via PostResource command community.general.xcc_redfish_command: category: Raw command: PostResource baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" resource_uri: "/redfish/v1/Systems/1/Actions/Oem/LenovoComputerSystem.BootToBIOSSetup" request_body: {} - name: Perform SecureBoot.ResetKeys action via PostResource command community.general.xcc_redfish_command: category: Raw command: PostResource baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" resource_uri: "/redfish/v1/Systems/1/SecureBoot/Actions/SecureBoot.ResetKeys" request_body: ResetKeysType: DeleteAllKeys - name: Create session community.general.redfish_command: category: Sessions command: CreateSession baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" register: result - name: Update Manager DateTimeLocalOffset property using security token for auth community.general.xcc_redfish_command: category: Raw command: PatchResource baseuri: "{{ baseuri }}" auth_token: "{{ result.session.token }}" resource_uri: "/redfish/v1/Managers/1" request_body: DateTimeLocalOffset: "+08:00" - name: Delete session using security token created by CreateSesssion above community.general.redfish_command: category: Sessions command: DeleteSession baseuri: "{{ baseuri }}" auth_token: "{{ result.session.token }}" session_uri: "{{ result.session.uri }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **msg** string | when failure or action/update success | A message related to the performed action(s). **Sample:** Action was successful | | **redfish\_facts** dictionary | when command == GetResource or command == GetCollectionResource | Resource content. **Sample:** { "redfish\_facts": { "data": { "@odata.etag": ""3179bf00d69f25a8b3c"", "@odata.id": "/redfish/v1/Managers/1/NetworkProtocol/Oem/Lenovo/DNS", "@odata.type": "#LenovoDNS.v1\_0\_0.LenovoDNS", "DDNS": [ { "DDNSEnable": true, "DomainName": "", "DomainNameSource": "DHCP" } ], "DNSEnable": true, "Description": "This resource is used to represent a DNS resource for a Redfish implementation.", "IPv4Address1": "10.103.62.178", "IPv4Address2": "0.0.0.0", "IPv4Address3": "0.0.0.0", "IPv6Address1": "::", "IPv6Address2": "::", "IPv6Address3": "::", "Id": "LenovoDNS", "PreferredAddresstype": "IPv4" }, "ret": true } } | ### Authors * Yuyan Pan (@panyy3) ansible community.general.composer – Dependency Manager for PHP community.general.composer – Dependency Manager for PHP ======================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.composer`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you. Requirements ------------ The below requirements are needed on the host that executes this module. * php * composer installed in bin path (recommended /usr/local/bin) or specified in *composer\_executable* Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **apcu\_autoloader** boolean | **Choices:*** **no** ← * yes | Uses APCu to cache found/not-found classes Alias `apcu-autoloader` has been deprecated and will be removed in community.general 5.0.0. aliases: apcu-autoloader | | **arguments** string | | Composer arguments like required package, version and so on. | | **classmap\_authoritative** boolean | **Choices:*** **no** ← * yes | Autoload classes from classmap only. Implicitely enable optimize\_autoloader. Recommended especially for production, but can take a bit of time to run. Alias `classmap-authoritative` has been deprecated and will be removed in community.general 5.0.0. aliases: classmap-authoritative | | **command** string | **Default:**"install" | Composer command like "install", "update" and so on. | | **composer\_executable** path added in 3.2.0 of community.general | | Path to composer executable on the remote host, if composer is not in `PATH` or a custom composer is needed. | | **executable** path | | Path to PHP Executable on the remote host, if PHP is not in PATH. aliases: php\_path | | **global\_command** boolean | **Choices:*** **no** ← * yes | Runs the specified command globally. Alias `global-command` has been deprecated and will be removed in community.general 5.0.0. aliases: global-command | | **ignore\_platform\_reqs** boolean | **Choices:*** **no** ← * yes | Ignore php, hhvm, lib-\* and ext-\* requirements and force the installation even if the local machine does not fulfill these. Alias `ignore-platform-reqs` has been deprecated and will be removed in community.general 5.0.0. aliases: ignore-platform-reqs | | **no\_dev** boolean | **Choices:*** no * **yes** ← | Disables installation of require-dev packages (see --no-dev). Alias `no-dev` has been deprecated and will be removed in community.general 5.0.0. aliases: no-dev | | **no\_plugins** boolean | **Choices:*** **no** ← * yes | Disables all plugins ( see --no-plugins ). Alias `no-plugins` has been deprecated and will be removed in community.general 5.0.0. aliases: no-plugins | | **no\_scripts** boolean | **Choices:*** **no** ← * yes | Skips the execution of all scripts defined in composer.json (see --no-scripts). Alias `no-scripts` has been deprecated and will be removed in community.general 5.0.0. aliases: no-scripts | | **optimize\_autoloader** boolean | **Choices:*** no * **yes** ← | Optimize autoloader during autoloader dump (see --optimize-autoloader). Convert PSR-0/4 autoloading to classmap to get a faster autoloader. Recommended especially for production, but can take a bit of time to run. Alias `optimize-autoloader` has been deprecated and will be removed in community.general 5.0.0. aliases: optimize-autoloader | | **prefer\_dist** boolean | **Choices:*** **no** ← * yes | Forces installation from package dist even for dev versions (see --prefer-dist). Alias `prefer-dist` has been deprecated and will be removed in community.general 5.0.0. aliases: prefer-dist | | **prefer\_source** boolean | **Choices:*** **no** ← * yes | Forces installation from package sources when possible (see --prefer-source). Alias `prefer-source` has been deprecated and will be removed in community.general 5.0.0. aliases: prefer-source | | **working\_dir** path | | Directory of your project (see --working-dir). This is required when the command is not run globally. Will be ignored if `global_command=true`. Alias `working-dir` has been deprecated and will be removed in community.general 5.0.0. aliases: working-dir | Notes ----- Note * Default options that are always appended in each execution are –no-ansi, –no-interaction and –no-progress if available. * We received reports about issues on macOS if composer was installed by Homebrew. Please use the official install method to avoid issues. Examples -------- ``` - name: Download and installs all libs and dependencies outlined in the /path/to/project/composer.lock community.general.composer: command: install working_dir: /path/to/project - name: Install a new package community.general.composer: command: require arguments: my/package working_dir: /path/to/project - name: Clone and install a project with all dependencies community.general.composer: command: create-project arguments: package/package /path/to/project ~1.0 working_dir: /path/to/project prefer_dist: yes - name: Install a package globally community.general.composer: command: require global_command: yes arguments: my/package ``` ### Authors * Dimitrios Tydeas Mengidis (@dmtrs) * René Moser (@resmo) ansible community.general.ibm_sa_vol_map – Handles volume mapping on IBM Spectrum Accelerate Family storage systems. community.general.ibm\_sa\_vol\_map – Handles volume mapping on IBM Spectrum Accelerate Family storage systems. =============================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ibm_sa_vol_map`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module maps volumes to or unmaps them from the hosts on IBM Spectrum Accelerate Family storage systems. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * pyxcli Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **cluster** string | | Maps the volume to a cluster. | | **endpoints** string / required | | The hostname or management IP of Spectrum Accelerate storage system. | | **host** string | | Maps the volume to a host. | | **lun** string | | The LUN identifier. | | **override** string | | Overrides the existing volume mapping. | | **password** string / required | | Password for username on the spectrum accelerate storage system. | | **state** string | **Choices:*** **present** ← * absent | When the state is present the volume is mapped. When the state is absent, the volume is meant to be unmapped. | | **username** string / required | | Management user on the spectrum accelerate storage system. | | **vol** string / required | | Volume name. | Notes ----- Note * This module requires pyxcli python library. Use ‘pip install pyxcli’ in order to get pyxcli. Examples -------- ``` - name: Map volume to host. community.general.ibm_sa_vol_map: vol: volume_name lun: 1 host: host_name username: admin password: secret endpoints: hostdev-system state: present - name: Map volume to cluster. community.general.ibm_sa_vol_map: vol: volume_name lun: 1 cluster: cluster_name username: admin password: secret endpoints: hostdev-system state: present - name: Unmap volume. community.general.ibm_sa_vol_map: host: host_name username: admin password: secret endpoints: hostdev-system state: absent ``` ### Authors * Tzur Eliyahu (@tzure) ansible community.general.homebrew_cask – Install and uninstall homebrew casks community.general.homebrew\_cask – Install and uninstall homebrew casks ======================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.homebrew_cask`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manages Homebrew casks. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **accept\_external\_apps** boolean | **Choices:*** **no** ← * yes | Allow external apps. | | **greedy** boolean | **Choices:*** **no** ← * yes | Upgrade casks that auto update. Passes --greedy to brew cask outdated when checking if an installed cask has a newer version available. | | **install\_options** list / elements=string | | Options flags to install a package. aliases: options | | **name** list / elements=string | | Name of cask to install or remove. aliases: cask, package, pkg | | **path** path | **Default:**"/usr/local/bin:/opt/homebrew/bin" | ':' separated list of paths to search for 'brew' executable. | | **state** string | **Choices:*** absent * installed * latest * **present** ← * removed * uninstalled * upgraded | State of the cask. | | **sudo\_password** string | | The sudo password to be passed to SUDO\_ASKPASS. | | **update\_homebrew** boolean | **Choices:*** **no** ← * yes | Update homebrew itself first. Note that `brew cask update` is a synonym for `brew update`. Alias `update-brew` has been deprecated and will be removed in community.general 5.0.0. aliases: update-brew | | **upgrade\_all** boolean | **Choices:*** **no** ← * yes | Upgrade all casks. Mutually exclusive with `upgraded` state. aliases: upgrade | Examples -------- ``` - name: Install cask community.general.homebrew_cask: name: alfred state: present - name: Remove cask community.general.homebrew_cask: name: alfred state: absent - name: Install cask with install options community.general.homebrew_cask: name: alfred state: present install_options: 'appdir=/Applications' - name: Install cask with install options community.general.homebrew_cask: name: alfred state: present install_options: 'debug,appdir=/Applications' - name: Allow external app community.general.homebrew_cask: name: alfred state: present accept_external_apps: True - name: Remove cask with force option community.general.homebrew_cask: name: alfred state: absent install_options: force - name: Upgrade all casks community.general.homebrew_cask: upgrade_all: true - name: Upgrade given cask with force option community.general.homebrew_cask: name: alfred state: upgraded install_options: force - name: Upgrade cask with greedy option community.general.homebrew_cask: name: 1password state: upgraded greedy: True - name: Using sudo password for installing cask community.general.homebrew_cask: name: wireshark state: present sudo_password: "{{ ansible_become_pass }}" ``` ### Authors * Indrajit Raychaudhuri (@indrajitr) * Daniel Jaouen (@danieljaouen) * Enric Lluelles (@enriclluelles)
programming_docs
ansible community.general.slack – Send Slack notifications community.general.slack – Send Slack notifications ================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.slack`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * The `slack` module sends notifications to <http://slack.com> via the Incoming WebHook integration Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **attachments** list / elements=dictionary | | Define a list of attachments. This list mirrors the Slack JSON API. For more information, see <https://api.slack.com/docs/attachments>. | | **blocks** list / elements=dictionary added in 1.0.0 of community.general | | Define a list of blocks. This list mirrors the Slack JSON API. For more information, see <https://api.slack.com/block-kit>. | | **channel** string | | Channel to send the message to. If absent, the message goes to the channel selected for the *token*. | | **color** string | **Default:**"normal" | Allow text to use default colors - use the default of 'normal' to not send a custom color bar at the start of the message. Allowed values for color can be one of 'normal', 'good', 'warning', 'danger', any valid 3 digit or 6 digit hex color value. Specifying value in hex is supported since Ansible 2.8. | | **domain** string | | Slack (sub)domain for your environment without protocol. (i.e. `example.slack.com`) In 1.8 and beyond, this is deprecated and may be ignored. See token documentation for information. | | **icon\_emoji** string | | Emoji for the message sender. See Slack documentation for options. (if *icon\_emoji* is set, *icon\_url* will not be used) | | **icon\_url** string | **Default:**"https://www.ansible.com/favicon.ico" | Url for the message sender's icon (default `https://www.ansible.com/favicon.ico`) | | **link\_names** integer | **Choices:*** 1 * 0 **Default:**1 | Automatically create links for channels and usernames in *msg*. | | **message\_id** string added in 1.2.0 of community.general | | Optional. Message ID to edit, instead of posting a new message. Corresponds to `ts` in the Slack API (<https://api.slack.com/messaging/modifying>). | | **msg** string | | Message to send. Note that the module does not handle escaping characters. Plain-text angle brackets and ampersands should be converted to HTML entities (e.g. & to &amp;) before sending. See Slack's documentation (<https://api.slack.com/docs/message-formatting>) for more. | | **parse** string | **Choices:*** full * none | Setting for the message parser at Slack | | **thread\_id** string | | Optional. Timestamp of parent message to thread this message. https://api.slack.com/docs/message-threading | | **token** string / required | | Slack integration token. This authenticates you to the slack service. Make sure to use the correct type of token, depending on what method you use. Webhook token: Prior to 1.8, a token looked like `3Ffe373sfhRE6y42Fg3rvf4GlK`. In 1.8 and above, ansible adapts to the new slack API where tokens look like `G922VJP24/D921DW937/3Ffe373sfhRE6y42Fg3rvf4GlK`. If tokens are in the new format then slack will ignore any value of domain. If the token is in the old format the domain is required. Ansible has no control of when slack will get rid of the old API. When slack does that the old format will stop working. \*\* Please keep in mind the tokens are not the API tokens but are the webhook tokens. In slack these are found in the webhook URL which are obtained under the apps and integrations. The incoming webhooks can be added in that area. In some cases this may be locked by your Slack admin and you must request access. It is there that the incoming webhooks can be added. The key is on the end of the URL given to you in that section. WebAPI token: Slack WebAPI requires a personal, bot or work application token. These tokens start with `xoxp-`, `xoxb-` or `xoxa-`, eg. `xoxb-1234-56789abcdefghijklmnop`. WebAPI token is required if you intend to receive thread\_id. See Slack's documentation (<https://api.slack.com/docs/token-types>) for more information. | | **username** string | **Default:**"Ansible" | This is the sender of the message. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Send notification message via Slack community.general.slack: token: thetoken/generatedby/slack msg: '{{ inventory_hostname }} completed' delegate_to: localhost - name: Send notification message via Slack all options community.general.slack: token: thetoken/generatedby/slack msg: '{{ inventory_hostname }} completed' channel: '#ansible' thread_id: '1539917263.000100' username: 'Ansible on {{ inventory_hostname }}' icon_url: http://www.example.com/some-image-file.png link_names: 0 parse: 'none' delegate_to: localhost - name: Insert a color bar in front of the message for visibility purposes and use the default webhook icon and name configured in Slack community.general.slack: token: thetoken/generatedby/slack msg: '{{ inventory_hostname }} is alive!' color: good username: '' icon_url: '' - name: Insert a color bar in front of the message with valid hex color value community.general.slack: token: thetoken/generatedby/slack msg: 'This message uses color in hex value' color: '#00aacc' username: '' icon_url: '' - name: Use the attachments API community.general.slack: token: thetoken/generatedby/slack attachments: - text: Display my system load on host A and B color: '#ff00dd' title: System load fields: - title: System A value: "load average: 0,74, 0,66, 0,63" short: True - title: System B value: 'load average: 5,16, 4,64, 2,43' short: True - name: Use the blocks API community.general.slack: token: thetoken/generatedby/slack blocks: - type: section text: type: mrkdwn text: |- *System load* Display my system load on host A and B - type: context elements: - type: mrkdwn text: |- *System A* load average: 0,74, 0,66, 0,63 - type: mrkdwn text: |- *System B* load average: 5,16, 4,64, 2,43 - name: Send a message with a link using Slack markup community.general.slack: token: thetoken/generatedby/slack msg: We sent this message using <https://www.ansible.com|Ansible>! - name: Send a message with angle brackets and ampersands community.general.slack: token: thetoken/generatedby/slack msg: This message has &lt;brackets&gt; &amp; ampersands in plain text. - name: Initial Threaded Slack message community.general.slack: channel: '#ansible' token: xoxb-1234-56789abcdefghijklmnop msg: 'Starting a thread with my initial post.' register: slack_response - name: Add more info to thread community.general.slack: channel: '#ansible' token: xoxb-1234-56789abcdefghijklmnop thread_id: "{{ slack_response['ts'] }}" color: good msg: 'And this is my threaded response!' - name: Send a message to be edited later on community.general.slack: token: thetoken/generatedby/slack channel: '#ansible' msg: Deploying something... register: slack_response - name: Edit message community.general.slack: token: thetoken/generatedby/slack channel: "{{ slack_response.channel }}" msg: Deployment complete! message_id: "{{ slack_response.ts }}" ``` ### Authors * Ramon de la Fuente (@ramondelafuente) ansible community.general.influxdb_user – Manage InfluxDB users community.general.influxdb\_user – Manage InfluxDB users ======================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.influxdb_user`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manage InfluxDB users. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * influxdb >= 0.9 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **admin** boolean | **Choices:*** **no** ← * yes | Whether the user should be in the admin role or not. Since version 2.8, the role will also be updated. | | **grants** list / elements=dictionary | | Privileges to grant to this user. Takes a list of dicts containing the "database" and "privilege" keys. If this argument is not provided, the current grants will be left alone. If an empty list is provided, all grants for the user will be removed. | | **hostname** string | **Default:**"localhost" | The hostname or IP address on which InfluxDB server is listening. Since Ansible 2.5, defaulted to localhost. | | **password** string | **Default:**"root" | Password that will be used to authenticate against InfluxDB server. Alias `login_password` added in Ansible 2.5. aliases: login\_password | | **path** string added in 0.2.0 of community.general | | The path on which InfluxDB server is accessible Only available when using python-influxdb >= 5.1.0 | | **port** integer | **Default:**8086 | The port on which InfluxDB server is listening | | **proxies** dictionary | | HTTP(S) proxy to use for Requests to connect to InfluxDB server. | | **retries** integer | **Default:**3 | Number of retries client will try before aborting. `0` indicates try until success. Only available when using python-influxdb >= 4.1.0 | | **ssl** boolean | **Choices:*** **no** ← * yes | Use https instead of http to connect to InfluxDB server. | | **state** string | **Choices:*** absent * **present** ← | State of the user. | | **timeout** integer | | Number of seconds Requests will wait for client to establish a connection. | | **udp\_port** integer | **Default:**4444 | UDP port to connect to InfluxDB server. | | **use\_udp** boolean | **Choices:*** **no** ← * yes | Use UDP to connect to InfluxDB server. | | **user\_name** string / required | | Name of the user. | | **user\_password** string | | Password to be set for the user. | | **username** string | **Default:**"root" | Username that will be used to authenticate against InfluxDB server. Alias `login_username` added in Ansible 2.5. aliases: login\_username | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Create a user on localhost using default login credentials community.general.influxdb_user: user_name: john user_password: s3cr3t - name: Create a user on localhost using custom login credentials community.general.influxdb_user: user_name: john user_password: s3cr3t login_username: "{{ influxdb_username }}" login_password: "{{ influxdb_password }}" - name: Create an admin user on a remote host using custom login credentials community.general.influxdb_user: user_name: john user_password: s3cr3t admin: yes hostname: "{{ influxdb_hostname }}" login_username: "{{ influxdb_username }}" login_password: "{{ influxdb_password }}" - name: Create a user on localhost with privileges community.general.influxdb_user: user_name: john user_password: s3cr3t login_username: "{{ influxdb_username }}" login_password: "{{ influxdb_password }}" grants: - database: 'collectd' privilege: 'WRITE' - database: 'graphite' privilege: 'READ' - name: Destroy a user using custom login credentials community.general.influxdb_user: user_name: john login_username: "{{ influxdb_username }}" login_password: "{{ influxdb_password }}" state: absent ``` ### Authors * Vitaliy Zhhuta (@zhhuta) ansible community.general.profitbricks_nic – Create or Remove a NIC. community.general.profitbricks\_nic – Create or Remove a NIC. ============================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.profitbricks_nic`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This module allows you to create or restore a volume snapshot. This module has a dependency on profitbricks >= 1.0.0 Requirements ------------ The below requirements are needed on the host that executes this module. * profitbricks Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **datacenter** string / required | | The datacenter in which to operate. | | **lan** string | | The LAN to place the NIC on. You can pass a LAN that doesn't exist and it will be created. Required on create. | | **name** string | | The name or ID of the NIC. This is only required on deletes, but not on create. If not specified, it defaults to a value based on UUID4. | | **server** string / required | | The server name or ID. | | **state** string | **Default:**"present" | Indicate desired state of the resource The available choices are: `present`, `absent`. | | **subscription\_password** string / required | | THe ProfitBricks password. Overrides the PB\_PASSWORD environment variable. | | **subscription\_user** string / required | | The ProfitBricks username. Overrides the PB\_SUBSCRIPTION\_ID environment variable. | | **wait** boolean | **Choices:*** no * **yes** ← | wait for the operation to complete before returning | | **wait\_timeout** integer | **Default:**600 | how long before wait gives up, in seconds | Examples -------- ``` - name: Create a NIC community.general.profitbricks_nic: datacenter: Tardis One server: node002 lan: 2 wait_timeout: 500 state: present - name: Remove a NIC community.general.profitbricks_nic: datacenter: Tardis One server: node002 name: 7341c2454f wait_timeout: 500 state: absent ``` ### Authors * Matt Baldwin (@baldwinSPC) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#85e7e4e9e1f2eceba3a6b6b2bea3a6b0b7bea3a6b1bdbef6f1e4e6eef5eaecebf1e6e9eaf0e1a3a6b1b3bee6eae8)> ansible community.general.parted – Configure block device partitions community.general.parted – Configure block device partitions ============================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.parted`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module allows configuring block device partition using the `parted` command line tool. For a full description of the fields and the options check the GNU parted manual. Requirements ------------ The below requirements are needed on the host that executes this module. * This module requires parted version 1.8.3 and above * align option (except ‘undefined’) requires parted 2.1 and above * If the version of parted is below 3.1, it requires a Linux version running the sysfs file system `/sys/`. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **align** string | **Choices:*** cylinder * minimal * none * **optimal** ← * undefined | Set alignment for newly created partitions. Use 'undefined' for parted default aligment. | | **device** string / required | | The block device (disk) where to operate. | | **flags** list / elements=string | | A list of the flags that has to be set on the partition. | | **fs\_type** string added in 0.2.0 of community.general | | If specified and the partition does not exist, will set filesystem type to given partition. Parameter optional, but see notes below about negative `part_start` values. | | **label** string | **Choices:*** aix * amiga * bsd * dvh * gpt * loop * mac * **msdos** ← * pc98 * sun | Disk label type to use. If `device` already contains different label, it will be changed to `label` and any previous partitions will be lost. | | **name** string | | Sets the name for the partition number (GPT, Mac, MIPS and PC98 only). | | **number** integer | | The number of the partition to work with or the number of the partition that will be created. Required when performing any action on the disk, except fetching information. | | **part\_end** string | **Default:**"100%" | Where the partition will end as offset from the beginning of the disk, that is, the "distance" from the start of the disk. Negative numbers specify distance from the end of the disk. The distance can be specified with all the units supported by parted (except compat) and it is case sensitive, e.g. `10GiB`, `15%`. | | **part\_start** string | **Default:**"0%" | Where the partition will start as offset from the beginning of the disk, that is, the "distance" from the start of the disk. Negative numbers specify distance from the end of the disk. The distance can be specified with all the units supported by parted (except compat) and it is case sensitive, e.g. `10GiB`, `15%`. Using negative values may require setting of `fs_type` (see notes). | | **part\_type** string | **Choices:*** extended * logical * **primary** ← | May be specified only with 'msdos' or 'dvh' partition tables. A `name` must be specified for a 'gpt' partition table. Neither `part_type` nor `name` may be used with a 'sun' partition table. | | **resize** boolean added in 1.3.0 of community.general | **Choices:*** **no** ← * yes | Call `resizepart` on existing partitions to match the size specified by *part\_end*. | | **state** string | **Choices:*** absent * present * **info** ← | Whether to create or delete a partition. If set to `info` the module will only return the device information. | | **unit** string | **Choices:*** s * B * KB * **KiB** ← * MB * MiB * GB * GiB * TB * TiB * % * cyl * chs * compact | Selects the current default unit that Parted will use to display locations and capacities on the disk and to interpret those given by the user if they are not suffixed by an unit. When fetching information about a disk, it is always recommended to specify a unit. | Notes ----- Note * When fetching information about a new disk and when the version of parted installed on the system is before version 3.1, the module queries the kernel through `/sys/` to obtain disk information. In this case the units CHS and CYL are not supported. * Negative `part_start` start values were rejected if `fs_type` was not given. This bug was fixed in parted 3.2.153. If you want to use negative `part_start`, specify `fs_type` as well or make sure your system contains newer parted. Examples -------- ``` - name: Create a new ext4 primary partition community.general.parted: device: /dev/sdb number: 1 state: present fs_type: ext4 - name: Remove partition number 1 community.general.parted: device: /dev/sdb number: 1 state: absent - name: Create a new primary partition with a size of 1GiB community.general.parted: device: /dev/sdb number: 1 state: present part_end: 1GiB - name: Create a new primary partition for LVM community.general.parted: device: /dev/sdb number: 2 flags: [ lvm ] state: present part_start: 1GiB - name: Create a new primary partition with a size of 1GiB at disk's end community.general.parted: device: /dev/sdb number: 3 state: present fs_type: ext3 part_start: -1GiB # Example on how to read info and reuse it in subsequent task - name: Read device information (always use unit when probing) community.general.parted: device=/dev/sdb unit=MiB register: sdb_info - name: Remove all partitions from disk community.general.parted: device: /dev/sdb number: '{{ item.num }}' state: absent loop: '{{ sdb_info.partitions }}' - name: Extend an existing partition to fill all available space community.general.parted: device: /dev/sdb number: "{{ sdb_info.partitions | length }}" part_end: "100%" resize: true state: present ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **partition\_info** complex | success | Current partition information **Sample:** {'disk': {'dev': '/dev/sdb', 'logical\_block': 512, 'model': 'VMware Virtual disk', 'physical\_block': 512, 'size': 5.0, 'table': 'msdos', 'unit': 'gib'}, 'partitions': [{'begin': 0.0, 'end': 1.0, 'flags': ['boot', 'lvm'], 'fstype': '', 'name': '', 'num': 1, 'size': 1.0}, {'begin': 1.0, 'end': 5.0, 'flags': [], 'fstype': '', 'name': '', 'num': 2, 'size': 4.0}], 'script': 'unit KiB print '} | | | **disk** dictionary | success | Generic device information. | | | **partitions** list / elements=string | success | List of device partitions. | | | **script** string | success | parted script executed by module | ### Authors * Fabrizio Colonna (@ColOfAbRiX)
programming_docs
ansible community.general.swupd – Manages updates and bundles in ClearLinux systems. community.general.swupd – Manages updates and bundles in ClearLinux systems. ============================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.swupd`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages updates and bundles with the swupd bundle manager, which is used by the Clear Linux Project for Intel Architecture. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **contenturl** string | | URL pointing to the contents of available bundles. If not specified, the contents are retrieved from clearlinux.org. | | **format** string | | The format suffix for version file downloads. For example [1,2,3,staging,etc]. If not specified, the default format is used. | | **manifest** integer | | The manifest contains information about the bundles at certain version of the OS. Specify a Manifest version to verify against that version or leave unspecified to verify against the current version. aliases: release, version | | **name** string | | Name of the (I)bundle to install or remove. aliases: bundle | | **state** string | **Choices:*** **present** ← * absent | Indicates the desired (I)bundle state. `present` ensures the bundle is installed while `absent` ensures the (I)bundle is not installed. | | **update** boolean | **Choices:*** **no** ← * yes | Updates the OS to the latest version. | | **url** string | | Overrides both *contenturl* and *versionurl*. | | **verify** boolean | **Choices:*** **no** ← * yes | Verify content for OS version. | | **versionurl** string | | URL for version string download. | Examples -------- ``` - name: Update the OS to the latest version community.general.swupd: update: yes - name: Installs the "foo" bundle community.general.swupd: name: foo state: present - name: Removes the "foo" bundle community.general.swupd: name: foo state: absent - name: Check integrity of filesystem community.general.swupd: verify: yes - name: Downgrade OS to release 12920 community.general.swupd: verify: yes manifest: 12920 ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **stderr** string | always | stderr of swupd | | **stdout** string | always | stdout of swupd | ### Authors * Alberto Murillo (@albertomurillo) ansible community.general.credstash – retrieve secrets from Credstash on AWS community.general.credstash – retrieve secrets from Credstash on AWS ==================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.credstash`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Credstash is a small utility for managing secrets using AWS’s KMS and DynamoDB: <https://github.com/fugue/credstash> Requirements ------------ The below requirements are needed on the local controller node that executes this lookup. * credstash (python library) Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **\_terms** list / elements=string / required | | | term or list of terms to lookup in the credit store | | **aws\_access\_key\_id** string | | env:AWS\_ACCESS\_KEY\_ID | AWS access key ID | | **aws\_secret\_access\_key** string | | env:AWS\_SECRET\_ACCESS\_KEY | AWS access key | | **aws\_session\_token** string | | env:AWS\_SESSION\_TOKEN | AWS session token | | **profile\_name** string | | env:AWS\_PROFILE | AWS profile to use for authentication | | **region** string | | | AWS region | | **table** string / required | **Default:**"credential-store" | | name of the credstash table to query | | **version** string | | | Credstash version | Examples -------- ``` - name: first use credstash to store your secrets ansible.builtin.shell: credstash put my-github-password secure123 - name: "Test credstash lookup plugin -- get my github password" ansible.builtin.debug: msg: "Credstash lookup! {{ lookup('community.general.credstash', 'my-github-password') }}" - name: "Test credstash lookup plugin -- get my other password from us-west-1" ansible.builtin.debug: msg: "Credstash lookup! {{ lookup('community.general.credstash', 'my-other-password', region='us-west-1') }}" - name: "Test credstash lookup plugin -- get the company's github password" ansible.builtin.debug: msg: "Credstash lookup! {{ lookup('community.general.credstash', 'company-github-password', table='company-passwords') }}" - name: Example play using the 'context' feature hosts: localhost vars: context: app: my_app environment: production tasks: - name: "Test credstash lookup plugin -- get the password with a context passed as a variable" ansible.builtin.debug: msg: "{{ lookup('community.general.credstash', 'some-password', context=context) }}" - name: "Test credstash lookup plugin -- get the password with a context defined here" ansible.builtin.debug: msg: "{{ lookup('community.general.credstash', 'some-password', context=dict(app='my_app', environment='production')) }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **\_raw** string | success | Value(s) stored in Credstash. | ### Authors * Unknown (!UNKNOWN) ansible community.general.ksu – Kerberos substitute user community.general.ksu – Kerberos substitute user ================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ksu`. * [Synopsis](#synopsis) * [Parameters](#parameters) Synopsis -------- * This become plugins allows your remote/login user to execute commands as another user via the ksu utility. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **become\_exe** string | **Default:**"ksu" | ini entries: [privilege\_escalation]become\_exe = ksu [ksu\_become\_plugin]executable = ksu env:ANSIBLE\_BECOME\_EXE env:ANSIBLE\_KSU\_EXE var: ansible\_become\_exe var: ansible\_ksu\_exe | Su executable | | **become\_flags** string | **Default:**"" | ini entries: [privilege\_escalation]become\_flags = [ksu\_become\_plugin]flags = env:ANSIBLE\_BECOME\_FLAGS env:ANSIBLE\_KSU\_FLAGS var: ansible\_become\_flags var: ansible\_ksu\_flags | Options to pass to ksu | | **become\_pass** string | | ini entries: [ksu\_become\_plugin]password = None env:ANSIBLE\_BECOME\_PASS env:ANSIBLE\_KSU\_PASS var: ansible\_ksu\_pass var: ansible\_become\_pass var: ansible\_become\_password | ksu password | | **become\_user** string / required | | ini entries: [privilege\_escalation]become\_user = None [ksu\_become\_plugin]user = None env:ANSIBLE\_BECOME\_USER env:ANSIBLE\_KSU\_USER var: ansible\_become\_user var: ansible\_ksu\_user | User you 'become' to execute the task | | **prompt\_l10n** string | **Default:**[] | ini entries: [ksu\_become\_plugin]localized\_prompts = [] env:ANSIBLE\_KSU\_PROMPT\_L10N var: ansible\_ksu\_prompt\_l10n | List of localized strings to match for prompt detection If empty we'll use the built in one | ### Authors * Ansible Core Team ansible community.general.packet_volume_attachment – Attach/detach a volume to a device in the Packet host. community.general.packet\_volume\_attachment – Attach/detach a volume to a device in the Packet host. ===================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.packet_volume_attachment`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Attach/detach a volume to a device in the Packet host. * API is documented at <https://www.packet.com/developers/api/volumes/>. * This module creates the attachment route in the Packet API. In order to discover the block devices on the server, you have to run the Attach Scripts, as documented at <https://help.packet.net/technical/storage/packet-block-storage-linux>. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * packet-python >= 1.35 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auth\_token** string | | Packet API token. You can also supply it in env var `PACKET_API_TOKEN`. | | **device** string | | Selector for the device. It can be a UUID of the device, or a hostname. Example values: 98a14f7a-3d27-4478-b7cf-35b5670523f3, "my device" | | **project\_id** string / required | | UUID of the project to which the device and volume belong. | | **state** string | **Choices:*** **present** ← * absent | Indicate desired state of the attachment. | | **volume** string / required | | Selector for the volume. It can be a UUID, an API-generated volume name, or user-defined description string. Example values: 4a347482-b546-4f67-8300-fb5018ef0c5, volume-4a347482, "my volume" | Examples -------- ``` # All the examples assume that you have your Packet API token in env var PACKET_API_TOKEN. # You can also pass the api token in module param auth_token. - hosts: localhost vars: volname: testvol devname: testdev project_id: 52000fb2-ee46-4673-93a8-de2c2bdba33b tasks: - name: Create volume packet_volume: description: "{{ volname }}" project_id: "{{ project_id }}" facility: ewr1 plan: storage_1 state: present size: 10 snapshot_policy: snapshot_count: 10 snapshot_frequency: 1day - name: Create a device packet_device: project_id: "{{ project_id }}" hostnames: "{{ devname }}" operating_system: ubuntu_16_04 plan: baremetal_0 facility: ewr1 state: present - name: Attach testvol to testdev community.general.packet_volume_attachment: project_id: "{{ project_id }}" volume: "{{ volname }}" device: "{{ devname }}" - name: Detach testvol from testdev community.general.packet_volume_attachment: project_id: "{{ project_id }}" volume: "{{ volname }}" device: "{{ devname }}" state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **device\_id** string | success | UUID of device addressed by the module call. | | **volume\_id** string | success | UUID of volume addressed by the module call. | ### Authors * Tomas Karasek (@t0mk) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#97e3f8fab1b4a3a1ace3f8b1b4a3a1ace3fff2b1b4a3a1acfcb1b4a4a0acb1b4a2a5acb1b4a3afacf0faf6fefbb1b4a3a1acf4f8fa)> * Nurfet Becirevic (@nurfet-becirevic) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#046a7176626170222730323f6661676d7661726d67222737333f222731363f2227303c3f6369656d68222730323f676b69)> ansible community.general.sapcar_extract – Manages SAP SAPCAR archives community.general.sapcar\_extract – Manages SAP SAPCAR archives =============================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.sapcar_extract`. New in version 3.2.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Provides support for unpacking `sar`/`car` files with the SAPCAR binary from SAP and pulling information back into Ansible. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **binary\_path** path | | The path to the SAPCAR binary, for example, `/home/dummy/sapcar` or `https://myserver/SAPCAR`. If this parameter is not provided the module will look in `PATH`. | | **dest** path | | The destination where SAPCAR extracts the SAR file. Missing folders will be created. If this parameter is not provided it will unpack in the same folder as the SAR file. | | **manifest** string | **Default:**"SIGNATURE.SMF" | The name of the manifest. | | **path** path / required | | The path to the SAR/CAR file. | | **remove** boolean | **Choices:*** **no** ← * yes | If `true` the SAR/CAR file will be removed. **This should be used with caution!** | | **security\_library** path | | The path to the security library, for example, `/usr/sap/hostctrl/exe/libsapcrytp.so`, for signature operations. | | **signature** boolean | **Choices:*** **no** ← * yes | If `true` the signature will be extracted. | Notes ----- Note * Always returns `changed=true` in `check_mode`. Examples -------- ``` - name: Extract SAR file community.general.sapcar_extract: path: "~/source/hana.sar" - name: Extract SAR file with destination community.general.sapcar_extract: path: "~/source/hana.sar" dest: "~/test/" - name: Extract SAR file with destination and download from webserver can be a fileshare as well community.general.sapcar_extract: path: "~/source/hana.sar" dest: "~/dest/" binary_path: "https://myserver/SAPCAR" - name: Extract SAR file and delete SAR after extract community.general.sapcar_extract: path: "~/source/hana.sar" remove: true - name: Extract SAR file with manifest community.general.sapcar_extract: path: "~/source/hana.sar" signature: true - name: Extract SAR file with manifest and rename it community.general.sapcar_extract: path: "~/source/hana.sar" manifest: "MyNewSignature.SMF" signature: true ``` ### Authors * Rainer Leber (@RainerLeber) ansible community.general.hwc_vpc_subnet – Creates a resource of Vpc/Subnet in Huawei Cloud community.general.hwc\_vpc\_subnet – Creates a resource of Vpc/Subnet in Huawei Cloud ===================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.hwc_vpc_subnet`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * subnet management. Requirements ------------ The below requirements are needed on the host that executes this module. * keystoneauth1 >= 3.6.0 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **availability\_zone** string | | Specifies the AZ to which the subnet belongs. Cannot be changed after creating the subnet. | | **cidr** string / required | | Specifies the subnet CIDR block. The value must be within the VPC CIDR block and be in CIDR format. The subnet mask cannot be greater than 28. Cannot be changed after creating the subnet. | | **dhcp\_enable** boolean | **Choices:*** no * yes | Specifies whether DHCP is enabled for the subnet. The value can be true (enabled) or false(disabled), and default value is true. If this parameter is set to false, newly created ECSs cannot obtain IP addresses, and usernames and passwords cannot be injected using Cloud-init. | | **dns\_address** list / elements=string | | Specifies the DNS server addresses for subnet. The address in the head will be used first. | | **domain** string / required | | The name of the Domain to scope to (Identity v3). (currently only domain names are supported, and not domain IDs). | | **gateway\_ip** string / required | | Specifies the gateway of the subnet. The value must be an IP address in the subnet. Cannot be changed after creating the subnet. | | **id** string | | The id of resource to be managed. | | **identity\_endpoint** string / required | | The Identity authentication URL. | | **name** string / required | | Specifies the subnet name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores `_`, hyphens (-), and periods (.). | | **password** string / required | | The password to login with. | | **project** string / required | | The name of the Tenant (Identity v2) or Project (Identity v3). (currently only project names are supported, and not project IDs). | | **region** string | | The region to which the project belongs. | | **state** string | **Choices:*** **present** ← * absent | Whether the given object should exist in Huawei Cloud. | | **timeouts** dictionary | | The timeouts for each operations. | | | **create** string | **Default:**"15m" | The timeouts for create operation. | | | **update** string | **Default:**"15m" | The timeouts for update operation. | | **user** string / required | | The user name to login with (currently only user names are supported, and not user IDs). | | **vpc\_id** string / required | | Specifies the ID of the VPC to which the subnet belongs. Cannot be changed after creating the subnet. | Notes ----- Note * For authentication, you can set identity\_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT` env variable. * For authentication, you can set user using the `ANSIBLE_HWC_USER` env variable. * For authentication, you can set password using the `ANSIBLE_HWC_PASSWORD` env variable. * For authentication, you can set domain using the `ANSIBLE_HWC_DOMAIN` env variable. * For authentication, you can set project using the `ANSIBLE_HWC_PROJECT` env variable. * For authentication, you can set region using the `ANSIBLE_HWC_REGION` env variable. * Environment variables values will only be used if the playbook values are not set. Examples -------- ``` # create subnet - name: Create vpc hwc_network_vpc: cidr: "192.168.100.0/24" name: "ansible_network_vpc_test" register: vpc - name: Create subnet community.general.hwc_vpc_subnet: vpc_id: "{{ vpc.id }}" cidr: "192.168.100.0/26" gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" dhcp_enable: True ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **availability\_zone** string | success | Specifies the AZ to which the subnet belongs. | | **cidr** string | success | Specifies the subnet CIDR block. The value must be within the VPC CIDR block and be in CIDR format. The subnet mask cannot be greater than 28. | | **dhcp\_enable** boolean | success | Specifies whether DHCP is enabled for the subnet. The value can be true (enabled) or false(disabled), and default value is true. If this parameter is set to false, newly created ECSs cannot obtain IP addresses, and usernames and passwords cannot be injected using Cloud-init. | | **dns\_address** list / elements=string | success | Specifies the DNS server addresses for subnet. The address in the head will be used first. | | **gateway\_ip** string | success | Specifies the gateway of the subnet. The value must be an IP address in the subnet. | | **name** string | success | Specifies the subnet name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores `_`, hyphens (-), and periods (.). | | **vpc\_id** string | success | Specifies the ID of the VPC to which the subnet belongs. | ### Authors * Huawei Inc. (@huaweicloud)
programming_docs
ansible community.general.oneview_fcoe_network_info – Retrieve the information about one or more of the OneView FCoE Networks community.general.oneview\_fcoe\_network\_info – Retrieve the information about one or more of the OneView FCoE Networks ======================================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneview_fcoe_network_info`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Retrieve the information about one or more of the FCoE Networks from OneView. * This module was called `oneview_fcoe_network_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [community.general.oneview\_fcoe\_network\_info](#ansible-collections-community-general-oneview-fcoe-network-info-module) module no longer returns `ansible_facts`! Requirements ------------ The below requirements are needed on the host that executes this module. * hpOneView >= 2.0.1 * python >= 2.7.9 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_version** integer | | OneView API Version. | | **config** path | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional and when used should be present in the host running the ansible commands. If the file path is not provided, the configuration will be loaded from environment variables. For links to example configuration files or how to use the environment variables verify the notes section. | | **hostname** string | | IP address or hostname for the appliance. | | **image\_streamer\_hostname** string | | IP address or hostname for the HPE Image Streamer REST API. | | **name** string | | FCoE Network name. | | **params** dictionary | | List of params to delimit, filter and sort the list of resources. params allowed: - `start`: The first item to return, using 0-based indexing. - `count`: The number of resources to return. - `filter`: A general filter/query string to narrow the list of items returned. - `sort`: The sort order of the returned data set. | | **password** string | | Password for API authentication. | | **username** string | | Username for API authentication. | Notes ----- Note * A sample configuration file for the config parameter can be found at: <https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json> * Check how to use environment variables for configuration at: <https://github.com/HewlettPackard/oneview-ansible#environment-variables> * Additional Playbooks for the HPE OneView Ansible modules can be found at: <https://github.com/HewlettPackard/oneview-ansible/tree/master/examples> * The OneView API version used will directly affect returned and expected fields in resources. Information on setting the desired API version and can be found at: <https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version> Examples -------- ``` - name: Gather information about all FCoE Networks community.general.oneview_fcoe_network_info: config: /etc/oneview/oneview_config.json delegate_to: localhost register: result - name: Print fetched information about FCoE Networks ansible.builtin.debug: msg: "{{ result.fcoe_networks }}" - name: Gather paginated, filtered and sorted information about FCoE Networks community.general.oneview_fcoe_network_info: config: /etc/oneview/oneview_config.json params: start: 0 count: 3 sort: 'name:descending' filter: 'vlanId=2' delegate_to: localhost register: result - name: Print fetched information about paginated, filtered and sorted list of FCoE Networks ansible.builtin.debug: msg: "{{ result.fcoe_networks }}" - name: Gather information about a FCoE Network by name community.general.oneview_fcoe_network_info: config: /etc/oneview/oneview_config.json name: Test FCoE Network Information delegate_to: localhost register: result - name: Print fetched information about FCoE Network found by name ansible.builtin.debug: msg: "{{ result.fcoe_networks }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **fcoe\_networks** dictionary | Always, but can be null. | Has all the OneView information about the FCoE Networks. | ### Authors * Felipe Bulsoni (@fgbulsoni) * Thiago Miotto (@tmiotto) * Adriane Cardozo (@adriane-cardozo) ansible community.general.proxmox_nic – Management of a NIC of a Qemu(KVM) VM in a Proxmox VE cluster. community.general.proxmox\_nic – Management of a NIC of a Qemu(KVM) VM in a Proxmox VE cluster. =============================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.proxmox_nic`. New in version 3.1.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Allows you to create/update/delete a NIC on Qemu(KVM) Virtual Machines in a Proxmox VE cluster. Requirements ------------ The below requirements are needed on the host that executes this module. * proxmoxer * requests Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_host** string / required | | Specify the target host of the Proxmox VE cluster. | | **api\_password** string | | Specify the password to authenticate with. You can use `PROXMOX_PASSWORD` environment variable. | | **api\_token\_id** string added in 1.3.0 of community.general | | Specify the token ID. | | **api\_token\_secret** string added in 1.3.0 of community.general | | Specify the token secret. | | **api\_user** string / required | | Specify the user to authenticate with. | | **bridge** string | | Add this interface to the specified bridge device. The Proxmox VE default bridge is called `vmbr0`. | | **firewall** boolean | **Choices:*** **no** ← * yes | Whether this interface should be protected by the firewall. | | **interface** string / required | | Name of the interface, should be `net[n]` where `1 ≤ n ≤ 31`. | | **link\_down** boolean | **Choices:*** **no** ← * yes | Whether this interface should be disconnected (like pulling the plug). | | **mac** string | | `XX:XX:XX:XX:XX:XX` should be a unique MAC address. This is automatically generated if not specified. When not specified this module will keep the MAC address the same when changing an existing interface. | | **model** string | **Choices:*** e1000 * e1000-82540em * e1000-82544gc * e1000-82545em * i82551 * i82557b * i82559er * ne2k\_isa * ne2k\_pci * pcnet * rtl8139 * **virtio** ← * vmxnet3 | The NIC emulator model. | | **mtu** integer | | Force MTU, for `virtio` model only, setting will be ignored otherwise. Set to `1` to use the bridge MTU. Value should be `1 ≤ n ≤ 65520`. | | **name** string | | Specifies the VM name. Only used on the configuration web interface. Required only for *state=present*. | | **queues** integer | | Number of packet queues to be used on the device. Value should be `0 ≤ n ≤ 16`. | | **rate** float | | Rate limit in MBps (MegaBytes per second) as floating point number. | | **state** string | **Choices:*** **present** ← * absent | Indicates desired state of the NIC. | | **tag** integer | | VLAN tag to apply to packets on this interface. Value should be `1 ≤ n ≤ 4094`. | | **trunks** list / elements=integer | | List of VLAN trunks to pass through this interface. | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | | **vmid** integer | | Specifies the instance ID. | Examples -------- ``` - name: Create NIC net0 targeting the vm by name community.general.proxmox_nic: api_user: root@pam api_password: secret api_host: proxmoxhost name: my_vm interface: net0 bridge: vmbr0 tag: 3 - name: Create NIC net0 targeting the vm by id community.general.proxmox_nic: api_user: root@pam api_password: secret api_host: proxmoxhost vmid: 103 interface: net0 bridge: vmbr0 mac: "12:34:56:C0:FF:EE" firewall: true - name: Delete NIC net0 targeting the vm by name community.general.proxmox_nic: api_user: root@pam api_password: secret api_host: proxmoxhost name: my_vm interface: net0 state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **msg** string | always | A short message **Sample:** Nic net0 unchanged on VM with vmid 103 | | **vmid** integer | success | The VM vmid. **Sample:** 115 | ### Authors * Lammert Hellinga (@Kogelvis) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#aac6cbc7c7cfd8de8c89999d918c899f98918c899e9291c2cfc6c6c3c4cdcb8c899e9c91c3de)> ansible community.general.oneandone_firewall_policy – Configure 1&1 firewall policy. community.general.oneandone\_firewall\_policy – Configure 1&1 firewall policy. ============================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneandone_firewall_policy`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Create, remove, reconfigure, update firewall policies. This module has a dependency on 1and1 >= 1.0 Requirements ------------ The below requirements are needed on the host that executes this module. * 1and1 * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **add\_rules** list / elements=dictionary | | A list of rules that will be added to an existing firewall policy. It is syntax is the same as the one used for rules parameter. Used in combination with update state. | | **add\_server\_ips** list / elements=string | | A list of server identifiers (id or name) to be assigned to a firewall policy. Used in combination with update state. | | **api\_url** string | | Custom API URL. Overrides the ONEANDONE\_API\_URL environment variable. | | **auth\_token** string | | Authenticating API token provided by 1&1. | | **description** string | | Firewall policy description. maxLength=256 | | **firewall\_policy** string | | The identifier (id or name) of the firewall policy used with update state. | | **name** string | | Firewall policy name used with present state. Used as identifier (id or name) when used with absent state. maxLength=128 | | **remove\_rules** list / elements=string | | A list of rule ids that will be removed from an existing firewall policy. Used in combination with update state. | | **remove\_server\_ips** list / elements=string | | A list of server IP ids to be unassigned from a firewall policy. Used in combination with update state. | | **rules** list / elements=dictionary | | A list of rules that will be set for the firewall policy. Each rule must contain protocol parameter, in addition to three optional parameters (port\_from, port\_to, and source) | | **state** string | **Choices:*** **present** ← * absent * update | Define a firewall policy state to create, remove, or update. | | **wait** boolean | **Choices:*** no * **yes** ← | wait for the instance to be in state 'running' before returning | | **wait\_interval** integer | **Default:**5 | Defines the number of seconds to wait when using the \_wait\_for methods | | **wait\_timeout** integer | **Default:**600 | how long before wait gives up, in seconds | Examples -------- ``` - name: Create a firewall policy community.general.oneandone_firewall_policy: auth_token: oneandone_private_api_key name: ansible-firewall-policy description: Testing creation of firewall policies with ansible rules: - protocol: TCP port_from: 80 port_to: 80 source: 0.0.0.0 wait: true wait_timeout: 500 - name: Destroy a firewall policy community.general.oneandone_firewall_policy: auth_token: oneandone_private_api_key state: absent name: ansible-firewall-policy - name: Update a firewall policy community.general.oneandone_firewall_policy: auth_token: oneandone_private_api_key state: update firewall_policy: ansible-firewall-policy name: ansible-firewall-policy-updated description: Testing creation of firewall policies with ansible - updated - name: Add server to a firewall policy community.general.oneandone_firewall_policy: auth_token: oneandone_private_api_key firewall_policy: ansible-firewall-policy-updated add_server_ips: - server_identifier (id or name) - server_identifier #2 (id or name) wait: true wait_timeout: 500 state: update - name: Remove server from a firewall policy community.general.oneandone_firewall_policy: auth_token: oneandone_private_api_key firewall_policy: ansible-firewall-policy-updated remove_server_ips: - B2504878540DBC5F7634EB00A07C1EBD (server's IP id) wait: true wait_timeout: 500 state: update - name: Add rules to a firewall policy community.general.oneandone_firewall_policy: auth_token: oneandone_private_api_key firewall_policy: ansible-firewall-policy-updated description: Adding rules to an existing firewall policy add_rules: - protocol: TCP port_from: 70 port_to: 70 source: 0.0.0.0 - protocol: TCP port_from: 60 port_to: 60 source: 0.0.0.0 wait: true wait_timeout: 500 state: update - name: Remove rules from a firewall policy community.general.oneandone_firewall_policy: auth_token: oneandone_private_api_key firewall_policy: ansible-firewall-policy-updated remove_rules: - rule_id #1 - rule_id #2 - ... wait: true wait_timeout: 500 state: update ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **firewall\_policy** dictionary | always | Information about the firewall policy that was processed **Sample:** {"id": "92B74394A397ECC3359825C1656D67A6", "name": "Default Policy"} | ### Authors * Amel Ajdinovic (@aajdinov) * Ethan Devenport (@edevenport) ansible community.general.ibm_sa_vol – Handle volumes on IBM Spectrum Accelerate Family storage systems. community.general.ibm\_sa\_vol – Handle volumes on IBM Spectrum Accelerate Family storage systems. ================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ibm_sa_vol`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module creates or deletes volumes to be used on IBM Spectrum Accelerate Family storage systems. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * pyxcli Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **endpoints** string / required | | The hostname or management IP of Spectrum Accelerate storage system. | | **password** string / required | | Password for username on the spectrum accelerate storage system. | | **pool** string | | Volume pool. | | **size** string | | Volume size. | | **state** string | **Choices:*** **present** ← * absent | Volume state. | | **username** string / required | | Management user on the spectrum accelerate storage system. | | **vol** string / required | | Volume name. | Notes ----- Note * This module requires pyxcli python library. Use ‘pip install pyxcli’ in order to get pyxcli. Examples -------- ``` - name: Create a new volume. community.general.ibm_sa_vol: vol: volume_name pool: pool_name size: 17 state: present username: admin password: secret endpoints: hostdev-system - name: Delete an existing volume. community.general.ibm_sa_vol: vol: volume_name state: absent username: admin password: secret endpoints: hostdev-system ``` ### Authors * Tzur Eliyahu (@tzure) ansible community.general.webfaction_domain – Add or remove domains and subdomains on Webfaction community.general.webfaction\_domain – Add or remove domains and subdomains on Webfaction ========================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.webfaction_domain`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Add or remove domains or subdomains on a Webfaction host. Further documentation at <https://github.com/quentinsf/ansible-webfaction>. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **login\_name** string / required | | The webfaction account to use | | **login\_password** string / required | | The webfaction password to use | | **name** string / required | | The name of the domain | | **state** string | **Choices:*** **present** ← * absent | Whether the domain should exist | | **subdomains** list / elements=string | **Default:**[] | Any subdomains to create. | Notes ----- Note * If you are *deleting* domains by using `state=absent`, then note that if you specify subdomains, just those particular subdomains will be deleted. If you don’t specify subdomains, the domain will be deleted. * You can run playbooks that use this on a local machine, or on a Webfaction host, or elsewhere, since the scripts use the remote webfaction API. The location is not important. However, running them on multiple hosts *simultaneously* is best avoided. If you don’t specify *localhost* as your host, you may want to add `serial: 1` to the plays. * See [the webfaction API](https://docs.webfaction.com/xmlrpc-api/) for more info. Examples -------- ``` - name: Create a test domain community.general.webfaction_domain: name: mydomain.com state: present subdomains: - www - blog login_name: "{{webfaction_user}}" login_password: "{{webfaction_passwd}}" - name: Delete test domain and any subdomains community.general.webfaction_domain: name: mydomain.com state: absent login_name: "{{webfaction_user}}" login_password: "{{webfaction_passwd}}" ``` ### Authors * Quentin Stafford-Fraser (@quentinsf)
programming_docs
ansible community.general.bitbucket_pipeline_known_host – Manages Bitbucket pipeline known hosts community.general.bitbucket\_pipeline\_known\_host – Manages Bitbucket pipeline known hosts =========================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.bitbucket_pipeline_known_host`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manages Bitbucket pipeline known hosts under the “SSH Keys” menu. * The host fingerprint will be retrieved automatically, but in case of an error, one can use *key* field to specify it manually. Requirements ------------ The below requirements are needed on the host that executes this module. * paramiko Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **client\_id** string | | The OAuth consumer key. If not set the environment variable `BITBUCKET_CLIENT_ID` will be used. | | **client\_secret** string | | The OAuth consumer secret. If not set the environment variable `BITBUCKET_CLIENT_SECRET` will be used. | | **key** string | | The public key. | | **name** string / required | | The FQDN of the known host. | | **repository** string / required | | The repository name. | | **state** string / required | **Choices:*** absent * present | Indicates desired state of the record. | | **username** string / required | | The repository owner. | Notes ----- Note * Bitbucket OAuth consumer key and secret can be obtained from Bitbucket profile -> Settings -> Access Management -> OAuth. * Check mode is supported. Examples -------- ``` - name: Create known hosts from the list community.general.bitbucket_pipeline_known_host: repository: 'bitbucket-repo' username: bitbucket_username name: '{{ item }}' state: present with_items: - bitbucket.org - example.com - name: Remove known host community.general.bitbucket_pipeline_known_host: repository: bitbucket-repo username: bitbucket_username name: bitbucket.org state: absent - name: Specify public key file community.general.bitbucket_pipeline_known_host: repository: bitbucket-repo username: bitbucket_username name: bitbucket.org key: '{{lookup("file", "bitbucket.pub") }}' state: absent ``` ### Authors * Evgeniy Krysanov (@catcombo) ansible community.general.dnsimple – Interface with dnsimple.com (a DNS hosting service) community.general.dnsimple – Interface with dnsimple.com (a DNS hosting service) ================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.dnsimple`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manages domains and records via the DNSimple API, see the docs: <http://developer.dnsimple.com/>. Requirements ------------ The below requirements are needed on the host that executes this module. * dnsimple >= 1.0.0 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **account\_api\_token** string | | Account API token. See *account\_email* for more information. | | **account\_email** string | | Account email. If omitted, the environment variables `DNSIMPLE_EMAIL` and `DNSIMPLE_API_TOKEN` will be looked for. If those aren't found, a `.dnsimple` file will be looked for, see: <https://github.com/mikemaccana/dnsimple-python#getting-started>. `.dnsimple` config files are only supported in dnsimple-python<2.0.0 | | **domain** string | | Domain to work with. Can be the domain name (e.g. "mydomain.com") or the numeric ID of the domain in DNSimple. If omitted, a list of domains will be returned. If domain is present but the domain doesn't exist, it will be created. | | **priority** integer | | Record priority. | | **record** string | | Record to add, if blank a record for the domain will be created, supports the wildcard (\*). | | **record\_ids** list / elements=string | | List of records to ensure they either exist or do not exist. | | **sandbox** boolean added in 3.5.0 of community.general | **Choices:*** **no** ← * yes | Use the DNSimple sandbox environment. Requires a dedicated account in the dnsimple sandbox environment. Check <https://developer.dnsimple.com/sandbox/> for more information. | | **solo** boolean | **Choices:*** **no** ← * yes | Whether the record should be the only one for that record type and record name. Only use with `state` is set to `present` on a record. | | **state** string | **Choices:*** **present** ← * absent | whether the record should exist or not. | | **ttl** integer | **Default:**3600 | The TTL to give the new record in seconds. | | **type** string | **Choices:*** A * ALIAS * CNAME * MX * SPF * URL * TXT * NS * SRV * NAPTR * PTR * AAAA * SSHFP * HINFO * POOL * CAA | The type of DNS record to create. | | **value** string | | Record value. Must be specified when trying to ensure a record exists. | Examples -------- ``` - name: Authenticate using email and API token and fetch all domains community.general.dnsimple: account_email: [email protected] account_api_token: dummyapitoken delegate_to: localhost - name: Delete a domain community.general.dnsimple: domain: my.com state: absent delegate_to: localhost - name: Create a test.my.com A record to point to 127.0.0.1 community.general.dnsimple: domain: my.com record: test type: A value: 127.0.0.1 delegate_to: localhost register: record - name: Delete record using record_ids community.general.dnsimple: domain: my.com record_ids: '{{ record["id"] }}' state: absent delegate_to: localhost - name: Create a my.com CNAME record to example.com community.general.dnsimple: domain: my.com record: '' type: CNAME value: example.com state: present delegate_to: localhost - name: Change TTL value for a record community.general.dnsimple: domain: my.com record: '' type: CNAME value: example.com ttl: 600 state: present delegate_to: localhost - name: Delete the record community.general.dnsimple: domain: my.com record: '' type: CNAME value: example.com state: absent delegate_to: localhost ``` ### Authors * Alex Coomans (@drcapulet) ansible community.general.taiga_issue – Creates/deletes an issue in a Taiga Project Management Platform community.general.taiga\_issue – Creates/deletes an issue in a Taiga Project Management Platform ================================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.taiga_issue`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Creates/deletes an issue in a Taiga Project Management Platform (<https://taiga.io>). * An issue is identified by the combination of project, issue subject and issue type. * This module implements the creation or deletion of issues (not the update). Requirements ------------ The below requirements are needed on the host that executes this module. * python-taiga Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **attachment** path | | Path to a file to be attached to the issue. | | **attachment\_description** string | **Default:**"" | A string describing the file to be attached to the issue. | | **description** string | **Default:**"" | The issue description. | | **issue\_type** string / required | | The issue type. Must exist previously. | | **priority** string | **Default:**"Normal" | The issue priority. Must exist previously. | | **project** string / required | | Name of the project containing the issue. Must exist previously. | | **severity** string | **Default:**"Normal" | The issue severity. Must exist previously. | | **state** string | **Choices:*** **present** ← * absent | Whether the issue should be present or not. | | **status** string | **Default:**"New" | The issue status. Must exist previously. | | **subject** string / required | | The issue subject. | | **tags** list / elements=string | **Default:**[] | A lists of tags to be assigned to the issue. | | **taiga\_host** string | **Default:**"https://api.taiga.io" | The hostname of the Taiga instance. | Notes ----- Note * The authentication is achieved either by the environment variable TAIGA\_TOKEN or by the pair of environment variables TAIGA\_USERNAME and TAIGA\_PASSWORD Examples -------- ``` - name: Create an issue in the my hosted Taiga environment and attach an error log community.general.taiga_issue: taiga_host: https://mytaigahost.example.com project: myproject subject: An error has been found issue_type: Bug priority: High status: New severity: Important description: An error has been found. Please check the attached error log for details. attachment: /path/to/error.log attachment_description: Error log file tags: - Error - Needs manual check state: present - name: Deletes the previously created issue community.general.taiga_issue: taiga_host: https://mytaigahost.example.com project: myproject subject: An error has been found issue_type: Bug state: absent ``` ### Authors * Alejandro Guirao (@lekum) ansible community.general.macports – Package manager for MacPorts community.general.macports – Package manager for MacPorts ========================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.macports`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manages MacPorts packages (ports) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **name** list / elements=string | | A list of port names. aliases: port | | **selfupdate** boolean | **Choices:*** **no** ← * yes | Update Macports and the ports tree, either prior to installing ports or as a separate step. Equivalent to running `port selfupdate`. aliases: update\_cache, update\_ports | | **state** string | **Choices:*** **present** ← * absent * active * inactive * installed * removed | Indicates the desired state of the port. | | **upgrade** boolean | **Choices:*** **no** ← * yes | Upgrade all outdated ports, either prior to installing ports or as a separate step. Equivalent to running `port upgrade outdated`. | | **variant** string | | A port variant specification. `variant` is only supported with state: *installed*/*present*. aliases: variants | Examples -------- ``` - name: Install the foo port community.general.macports: name: foo - name: Install the universal, x11 variant of the foo port community.general.macports: name: foo variant: +universal+x11 - name: Install a list of ports community.general.macports: name: "{{ ports }}" vars: ports: - foo - foo-tools - name: Update Macports and the ports tree, then upgrade all outdated ports community.general.macports: selfupdate: yes upgrade: yes - name: Update Macports and the ports tree, then install the foo port community.general.macports: name: foo selfupdate: yes - name: Remove the foo port community.general.macports: name: foo state: absent - name: Activate the foo port community.general.macports: name: foo state: active - name: Deactivate the foo port community.general.macports: name: foo state: inactive ``` ### Authors * Jimmy Tang (@jcftang) ansible community.general.ipa_dnsrecord – Manage FreeIPA DNS records community.general.ipa\_dnsrecord – Manage FreeIPA DNS records ============================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ipa_dnsrecord`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Add, modify and delete an IPA DNS Record using IPA API. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_prot** string | **Choices:*** http * **https** ← | Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. | | **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **record\_name** string / required | | The DNS record name to manage. aliases: name | | **record\_ttl** integer | | Set the TTL for the record. Applies only when adding a new or changing the value of record\_value. | | **record\_type** string | **Choices:*** **A** ← * AAAA * A6 * CNAME * DNAME * MX * PTR * SRV * TXT | The type of DNS record name. Currently, 'A', 'AAAA', 'A6', 'CNAME', 'DNAME', 'PTR', 'TXT', 'SRV' and 'MX' are supported. 'A6', 'CNAME', 'DNAME' and 'TXT' are added in version 2.5. 'SRV' and 'MX' are added in version 2.8. | | **record\_value** string / required | | Manage DNS record name with this value. In the case of 'A' or 'AAAA' record types, this will be the IP address. In the case of 'A6' record type, this will be the A6 Record data. In the case of 'CNAME' record type, this will be the hostname. In the case of 'DNAME' record type, this will be the DNAME target. In the case of 'PTR' record type, this will be the hostname. In the case of 'TXT' record type, this will be a text. In the case of 'SRV' record type, this will be a service record. In the case of 'MX' record type, this will be a mail exchanger record. | | **state** string | **Choices:*** absent * **present** ← | State to ensure | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | This only applies if `ipa_prot` is *https*. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. | | **zone\_name** string / required | | The DNS zone name to which DNS record needs to be managed. | Examples -------- ``` - name: Ensure dns record is present community.general.ipa_dnsrecord: ipa_host: spider.example.com ipa_pass: Passw0rd! state: present zone_name: example.com record_name: vm-001 record_type: 'AAAA' record_value: '::1' - name: Ensure that dns record exists with a TTL community.general.ipa_dnsrecord: name: host02 zone_name: example.com record_type: 'AAAA' record_value: '::1' record_ttl: 300 ipa_host: ipa.example.com ipa_pass: topsecret state: present - name: Ensure a PTR record is present community.general.ipa_dnsrecord: ipa_host: spider.example.com ipa_pass: Passw0rd! state: present zone_name: 2.168.192.in-addr.arpa record_name: 5 record_type: 'PTR' record_value: 'internal.ipa.example.com' - name: Ensure a TXT record is present community.general.ipa_dnsrecord: ipa_host: spider.example.com ipa_pass: Passw0rd! state: present zone_name: example.com record_name: _kerberos record_type: 'TXT' record_value: 'EXAMPLE.COM' - name: Ensure an SRV record is present community.general.ipa_dnsrecord: ipa_host: spider.example.com ipa_pass: Passw0rd! state: present zone_name: example.com record_name: _kerberos._udp.example.com record_type: 'SRV' record_value: '10 50 88 ipa.example.com' - name: Ensure an MX record is present community.general.ipa_dnsrecord: ipa_host: spider.example.com ipa_pass: Passw0rd! state: present zone_name: example.com record_name: '@' record_type: 'MX' record_value: '1 mailserver.example.com' - name: Ensure that dns record is removed community.general.ipa_dnsrecord: name: host01 zone_name: example.com record_type: 'AAAA' record_value: '::1' ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **dnsrecord** dictionary | always | DNS record as returned by IPA API. | ### Authors * Abhijeet Kasurde (@Akasurde)
programming_docs
ansible community.general.atomic_container – Manage the containers on the atomic host platform community.general.atomic\_container – Manage the containers on the atomic host platform ======================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.atomic_container`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage the containers on the atomic host platform. * Allows to manage the lifecycle of a container on the atomic host platform. Requirements ------------ The below requirements are needed on the host that executes this module. * atomic * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **backend** string / required | **Choices:*** docker * ostree | Define the backend to use for the container. | | **image** string / required | | The image to use to install the container. | | **mode** string | **Choices:*** user * system | Define if it is an user or a system container. | | **name** string / required | | Name of the container. | | **rootfs** string | | Define the rootfs of the image. | | **state** string | **Choices:*** absent * **latest** ← * present * rollback | State of the container. | | **values** list / elements=string | | Values for the installation of the container. This option is permitted only with mode 'user' or 'system'. The values specified here will be used at installation time as --set arguments for atomic install. | Notes ----- Note * Host should support `atomic` command Examples -------- ``` - name: Install the etcd system container community.general.atomic_container: name: etcd image: rhel/etcd backend: ostree state: latest mode: system values: - ETCD_NAME=etcd.server - name: Uninstall the etcd system container community.general.atomic_container: name: etcd image: rhel/etcd backend: ostree state: absent mode: system ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **msg** string | always | The command standard output **Sample:** [{"u'Using default tag": "latest ...'"}] | ### Authors * Giuseppe Scrivano (@giuseppe) ansible community.general.rax_clb_nodes – add, modify and remove nodes from a Rackspace Cloud Load Balancer community.general.rax\_clb\_nodes – add, modify and remove nodes from a Rackspace Cloud Load Balancer ===================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rax_clb_nodes`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Adds, modifies and removes nodes from a Rackspace Cloud Load Balancer Requirements ------------ The below requirements are needed on the host that executes this module. * pyrax * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **address** string | | IP address or domain name of the node | | **api\_key** string | | Rackspace API key, overrides *credentials*. aliases: password | | **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/> | | **condition** string | **Choices:*** enabled * disabled * draining | Condition for the node, which determines its role within the load balancer | | **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided. aliases: creds\_file | | **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. | | **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. | | **load\_balancer\_id** integer / required | | Load balancer id | | **node\_id** integer | | Node id | | **port** integer | | Port number of the load balanced service on the node | | **region** string | | Region to create an instance in. | | **state** string | **Choices:*** **present** ← * absent | Indicate desired state of the node | | **tenant\_id** string | | The tenant ID used for authentication. | | **tenant\_name** string | | The tenant name used for authentication. | | **type** string | **Choices:*** primary * secondary | Type of node | | **username** string | | Rackspace username, overrides *credentials*. | | **validate\_certs** boolean | **Choices:*** no * yes | Whether or not to require SSL validation of API endpoints. aliases: verify\_ssl | | **virtualenv** path | | Virtualenv to execute this module in | | **wait** boolean | **Choices:*** **no** ← * yes | Wait for the load balancer to become active before returning | | **wait\_timeout** integer | **Default:**30 | How long to wait before giving up and returning an error | | **weight** integer | | Weight of node | Notes ----- Note * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) Examples -------- ``` - name: Add a new node to the load balancer local_action: module: rax_clb_nodes load_balancer_id: 71 address: 10.2.2.3 port: 80 condition: enabled type: primary wait: yes credentials: /path/to/credentials - name: Drain connections from a node local_action: module: rax_clb_nodes load_balancer_id: 71 node_id: 410 condition: draining wait: yes credentials: /path/to/credentials - name: Remove a node from the load balancer local_action: module: rax_clb_nodes load_balancer_id: 71 node_id: 410 state: absent wait: yes credentials: /path/to/credentials ``` ### Authors * Lukasz Kawczynski (@neuroid) ansible community.general.memset_zone_record – Create and delete records in Memset DNS zones. community.general.memset\_zone\_record – Create and delete records in Memset DNS zones. ======================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.memset_zone_record`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage DNS records in a Memset account. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **address** string / required | | The address for this record (can be IP or text string depending on record type). aliases: ip, data | | **api\_key** string / required | | The API key obtained from the Memset control panel. | | **priority** integer | | `SRV` and `TXT` record priority, in the range 0 > 999 (inclusive). | | **record** string | | The subdomain to create. | | **relative** boolean | **Choices:*** **no** ← * yes | If set then the current domain is added onto the address field for `CNAME`, `MX`, `NS` and `SRV`record types. | | **state** string | **Choices:*** absent * **present** ← | Indicates desired state of resource. | | **ttl** integer | **Choices:*** 0 * 300 * 600 * 900 * 1800 * 3600 * 7200 * 10800 * 21600 * 43200 * 86400 | The record's TTL in seconds (will inherit zone's TTL if not explicitly set). This must be a valid int from <https://www.memset.com/apidocs/methods_dns.html#dns.zone_record_create>. | | **type** string / required | **Choices:*** A * AAAA * CNAME * MX * NS * SRV * TXT | The type of DNS record to create. | | **zone** string / required | | The name of the zone to which to add the record to. | Notes ----- Note * Zones can be thought of as a logical group of domains, all of which share the same DNS records (i.e. they point to the same IP). An API key generated via the Memset customer control panel is needed with the following minimum scope - *dns.zone\_create*, *dns.zone\_delete*, *dns.zone\_list*. * Currently this module can only create one DNS record at a time. Multiple records should be created using `with_items`. Examples -------- ``` # Create DNS record for www.domain.com - name: Create DNS record community.general.memset_zone_record: api_key: dcf089a2896940da9ffefb307ef49ccd state: present zone: domain.com type: A record: www address: 1.2.3.4 ttl: 300 relative: false delegate_to: localhost # create an SPF record for domain.com - name: Create SPF record for domain.com community.general.memset_zone_record: api_key: dcf089a2896940da9ffefb307ef49ccd state: present zone: domain.com type: TXT address: "v=spf1 +a +mx +ip4:a1.2.3.4 ?all" delegate_to: localhost # create multiple DNS records - name: Create multiple DNS records community.general.memset_zone_record: api_key: dcf089a2896940da9ffefb307ef49ccd zone: "{{ item.zone }}" type: "{{ item.type }}" record: "{{ item.record }}" address: "{{ item.address }}" delegate_to: localhost with_items: - { 'zone': 'domain1.com', 'type': 'A', 'record': 'www', 'address': '1.2.3.4' } - { 'zone': 'domain2.com', 'type': 'A', 'record': 'mail', 'address': '4.3.2.1' } ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **memset\_api** complex | when state == present | Record info from the Memset API. | | | **address** string | always | Record content (may be an IP, string or blank depending on record type). **Sample:** 1.1.1.1 | | | **id** string | always | Record ID. **Sample:** b0bb1ce851aeea6feeb2dc32fe83bf9c | | | **priority** integer | always | Priority for `MX` and `SRV` records. **Sample:** 10 | | | **record** string | always | Name of record. **Sample:** www | | | **relative** boolean | always | Adds the current domain onto the address field for `CNAME`, `MX`, `NS` and `SRV` types. | | | **ttl** integer | always | Record TTL. **Sample:** 10 | | | **type** string | always | Record type. **Sample:** AAAA | | | **zone\_id** string | always | Zone ID. **Sample:** b0bb1ce851aeea6feeb2dc32fe83bf9c | ### Authors * Simon Weald (@glitchcrab) ansible community.general.discord – Send Discord messages community.general.discord – Send Discord messages ================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.discord`. New in version 3.1.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Sends a message to a Discord channel using the Discord webhook API. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **avatar\_url** string | | Overrides the default avatar of the webhook. | | **content** string | | Content of the message to the Discord channel. At least one of *content* and *embeds* must be specified. | | **embeds** list / elements=dictionary | | Send messages as Embeds to the Discord channel. Embeds can have a colored border, embedded images, text fields and more. Allowed parameters are described in the Discord Docs: <https://discord.com/developers/docs/resources/channel#embed-object> At least one of *content* and *embeds* must be specified. | | **tts** boolean | **Choices:*** **no** ← * yes | Set this to `true` if this is a TTS (Text to Speech) message. | | **username** string | | Overrides the default username of the webhook. | | **webhook\_id** string / required | | The webhook ID. Format from Discord webhook URL: `/webhooks/{webhook.id}/{webhook.token}`. | | **webhook\_token** string / required | | The webhook token. Format from Discord webhook URL: `/webhooks/{webhook.id}/{webhook.token}`. | See Also -------- See also [API documentation](https://discord.com/developers/docs/resources/webhook#execute-webhook) Documentation for Discord API Examples -------- ``` - name: Send a message to the Discord channel community.general.discord: webhook_id: "00000" webhook_token: "XXXYYY" content: "This is a message from ansible" - name: Send a message to the Discord channel with specific username and avatar community.general.discord: webhook_id: "00000" webhook_token: "XXXYYY" content: "This is a message from ansible" username: Ansible avatar_url: "https://docs.ansible.com/ansible/latest/_static/images/logo_invert.png" - name: Send a embedded message to the Discord channel community.general.discord: webhook_id: "00000" webhook_token: "XXXYYY" embeds: - title: "Embedded message" description: "This is an embedded message" footer: text: "Author: Ansible" image: url: "https://docs.ansible.com/ansible/latest/_static/images/logo_invert.png" - name: Send two embedded messages community.general.discord: webhook_id: "00000" webhook_token: "XXXYYY" embeds: - title: "First message" description: "This is my first embedded message" footer: text: "Author: Ansible" image: url: "https://docs.ansible.com/ansible/latest/_static/images/logo_invert.png" - title: "Second message" description: "This is my first second message" footer: text: "Author: Ansible" icon_url: "https://docs.ansible.com/ansible/latest/_static/images/logo_invert.png" fields: - name: "Field 1" value: "Value of my first field" - name: "Field 2" value: "Value of my second field" timestamp: "{{ ansible_date_time.iso8601 }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **http\_code** integer | always | Response Code returned by Discord API. **Sample:** 204 | ### Authors * Christian Wollinger (@cwollinger) ansible community.general.dpkg_divert – Override a debian package’s version of a file community.general.dpkg\_divert – Override a debian package’s version of a file ============================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.dpkg_divert`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * A diversion is for `dpkg` the knowledge that only a given package (or the local administrator) is allowed to install a file at a given location. Other packages shipping their own version of this file will be forced to *divert* it, i.e. to install it at another location. It allows one to keep changes in a file provided by a debian package by preventing its overwrite at package upgrade. * This module manages diversions of debian packages files using the `dpkg-divert` commandline tool. It can either create or remove a diversion for a given file, but also update an existing diversion to modify its *holder* and/or its *divert* location. Requirements ------------ The below requirements are needed on the host that executes this module. * dpkg-divert >= 1.15.0 (Debian family) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **divert** path | | The location where the versions of file will be diverted. Default is to add suffix `.distrib` to the file path. This parameter is ignored when *state=absent*. | | **force** boolean | **Choices:*** **no** ← * yes | When *rename=true* and *force=true*, renaming is performed even if the target of the renaming exists, i.e. the existing contents of the file at this location will be lost. This parameter is ignored when *rename=false*. | | **holder** string | | The name of the package whose copy of file is not diverted, also known as the diversion holder or the package the diversion belongs to. The actual package does not have to be installed or even to exist for its name to be valid. If not specified, the diversion is hold by 'LOCAL', that is reserved by/for dpkg for local diversions. This parameter is ignored when *state=absent*. | | **path** path / required | | The original and absolute path of the file to be diverted or undiverted. This path is unique, i.e. it is not possible to get two diversions for the same *path*. | | **rename** boolean | **Choices:*** **no** ← * yes | Actually move the file aside (when *state=present*) or back (when *state=absent*), but only when changing the state of the diversion. This parameter has no effect when attempting to add a diversion that already exists or when removing an unexisting one. Unless *force=true*, renaming fails if the destination file already exists (this lock being a dpkg-divert feature, and bypassing it being a module feature). | | **state** string | **Choices:*** absent * **present** ← | When *state=absent*, remove the diversion of the specified *path*; when *state=present*, create the diversion if it does not exist, or update its package *holder* or *divert* location, if it already exists. | Notes ----- Note * This module supports *check\_mode* and *diff*. Examples -------- ``` - name: Divert /usr/bin/busybox to /usr/bin/busybox.distrib and keep file in place community.general.dpkg_divert: path: /usr/bin/busybox - name: Divert /usr/bin/busybox by package 'branding' community.general.dpkg_divert: path: /usr/bin/busybox holder: branding - name: Divert and rename busybox to busybox.dpkg-divert community.general.dpkg_divert: path: /usr/bin/busybox divert: /usr/bin/busybox.dpkg-divert rename: yes - name: Remove the busybox diversion and move the diverted file back community.general.dpkg_divert: path: /usr/bin/busybox state: absent rename: yes force: yes ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **commands** list / elements=string | on\_success | The dpkg-divert commands ran internally by the module. **Sample:** [ "/usr/bin/dpkg-divert --no-rename --remove /etc/foobarrc", "/usr/bin/dpkg-divert --package ansible --no-rename --add /etc/foobarrc" ] | | **diversion** dictionary | always | The status of the diversion after task execution. **Sample:** { "divert": "/etc/foobarrc.distrib", "holder": "LOCAL", "path": "/etc/foobarrc" "state": "present" } | | | **divert** string | success | The location of the diverted file. | | | **holder** string | success | The package holding the diversion. | | | **path** string | success | The path of the file to divert/undivert. | | | **state** string | success | The state of the diversion. | | **messages** list / elements=string | on\_success | The dpkg-divert relevant messages (stdout or stderr). **Sample:** [ "Removing 'local diversion of /etc/foobarrc to /etc/foobarrc.distrib'", "Adding 'diversion of /etc/foobarrc to /etc/foobarrc.distrib by ansible'" ] | ### Authors * quidame (@quidame)
programming_docs
ansible community.general.vertica_configuration – Updates Vertica configuration parameters. community.general.vertica\_configuration – Updates Vertica configuration parameters. ==================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.vertica_configuration`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Updates Vertica configuration parameters. Requirements ------------ The below requirements are needed on the host that executes this module. * unixODBC * pyodbc Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **cluster** string | **Default:**"localhost" | Name of the Vertica cluster. | | **db** string | | Name of the Vertica database. | | **login\_password** string | | The password used to authenticate with. | | **login\_user** string | **Default:**"dbadmin" | The username used to authenticate with. | | **parameter** string / required | | Name of the parameter to update. aliases: name | | **port** string | **Default:**"5433" | Vertica cluster port to connect to. | | **value** string | | Value of the parameter to be set. | Notes ----- Note * The default authentication assumes that you are either logging in as or sudo’ing to the `dbadmin` account on the host. * This module uses `pyodbc`, a Python ODBC database adapter. You must ensure that `unixODBC` and `pyodbc` is installed on the host and properly configured. * Configuring `unixODBC` for Vertica requires `Driver = /opt/vertica/lib64/libverticaodbc.so` to be added to the `Vertica` section of either `/etc/odbcinst.ini` or `$HOME/.odbcinst.ini` and both `ErrorMessagesPath = /opt/vertica/lib64` and `DriverManagerEncoding = UTF-16` to be added to the `Driver` section of either `/etc/vertica.ini` or `$HOME/.vertica.ini`. Examples -------- ``` - name: Updating load_balance_policy community.general.vertica_configuration: name=failovertostandbyafter value='8 hours' ``` ### Authors * Dariusz Owczarek (@dareko) ansible community.general.keyring – grab secrets from the OS keyring community.general.keyring – grab secrets from the OS keyring ============================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.keyring`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Allows you to access data stored in the OS provided keyring/keychain. Requirements ------------ The below requirements are needed on the local controller node that executes this lookup. * keyring (python library) Examples -------- ``` - name : output secrets to screen (BAD IDEA) ansible.builtin.debug: msg: "Password: {{item}}" with_community.general.keyring: - 'servicename username' - name: access mysql with password from keyring mysql_db: login_password={{lookup('community.general.keyring','mysql joe')}} login_user=joe ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **\_raw** list / elements=string | success | Secrets stored. | ### Authors * Samuel Boucher (!UNKNOWN) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#12707d67717a7760343126242961737f67777e343126242971343121252934312720293431262a29757f737b7e3431262429717d7f)> ansible community.general.xenserver_guest_powerstate – Manages power states of virtual machines running on Citrix Hypervisor/XenServer host or pool community.general.xenserver\_guest\_powerstate – Manages power states of virtual machines running on Citrix Hypervisor/XenServer host or pool ============================================================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.xenserver_guest_powerstate`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module can be used to power on, power off, restart or suspend virtual machine and gracefully reboot or shutdown guest OS of virtual machine. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * XenAPI Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **hostname** string | **Default:**"localhost" | The hostname or IP address of the XenServer host or XenServer pool master. If the value is not specified in the task, the value of environment variable `XENSERVER_HOST` will be used instead. aliases: host, pool | | **name** string | | Name of the VM to manage. VMs running on XenServer do not necessarily have unique names. The module will fail if multiple VMs with same name are found. In case of multiple VMs with same name, use `uuid` to uniquely specify VM to manage. This parameter is case sensitive. aliases: name\_label | | **password** string | | The password to use for connecting to XenServer. If the value is not specified in the task, the value of environment variable `XENSERVER_PASSWORD` will be used instead. aliases: pass, pwd | | **state** string | **Choices:*** powered-on * powered-off * restarted * shutdown-guest * reboot-guest * suspended * **present** ← | Specify the state VM should be in. If `state` is set to value other than `present`, then VM is transitioned into required state and facts are returned. If `state` is set to `present`, then VM is just checked for existence and facts are returned. | | **state\_change\_timeout** integer | **Default:**0 | By default, module will wait indefinitely for VM to change state or acquire an IP address if `wait_for_ip_address: yes`. If this parameter is set to positive value, the module will instead wait specified number of seconds for the state change. In case of timeout, module will generate an error message. | | **username** string | **Default:**"root" | The username to use for connecting to XenServer. If the value is not specified in the task, the value of environment variable `XENSERVER_USER` will be used instead. aliases: admin, user | | **uuid** string | | UUID of the VM to manage if known. This is XenServer's unique identifier. It is required if name is not unique. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Allows connection when SSL certificates are not valid. Set to `false` when certificates are not trusted. If the value is not specified in the task, the value of environment variable `XENSERVER_VALIDATE_CERTS` will be used instead. | | **wait\_for\_ip\_address** boolean | **Choices:*** **no** ← * yes | Wait until XenServer detects an IP address for the VM. This requires XenServer Tools to be preinstalled on the VM to work properly. | Notes ----- Note * Minimal supported version of XenServer is 5.6. * Module was tested with XenServer 6.5, 7.1, 7.2, 7.6, Citrix Hypervisor 8.0, XCP-ng 7.6 and 8.0. * To acquire XenAPI Python library, just run `pip install XenAPI` on your Ansible Control Node. The library can also be found inside Citrix Hypervisor/XenServer SDK (downloadable from Citrix website). Copy the XenAPI.py file from the SDK to your Python site-packages on your Ansible Control Node to use it. Latest version of the library can also be acquired from GitHub: <https://raw.githubusercontent.com/xapi-project/xen-api/master/scripts/examples/python/XenAPI/XenAPI.py> * If no scheme is specified in `hostname`, module defaults to `http://` because `https://` is problematic in most setups. Make sure you are accessing XenServer host in trusted environment or use `https://` scheme explicitly. * To use `https://` scheme for `hostname` you have to either import host certificate to your OS certificate store or use `validate_certs: no` which requires XenAPI library from XenServer 7.2 SDK or newer and Python 2.7.9 or newer. Examples -------- ``` - name: Power on VM community.general.xenserver_guest_powerstate: hostname: "{{ xenserver_hostname }}" username: "{{ xenserver_username }}" password: "{{ xenserver_password }}" name: testvm_11 state: powered-on delegate_to: localhost register: facts ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **instance** dictionary | always | Metadata about the VM **Sample:** {'cdrom': {'type': 'none'}, 'customization\_agent': 'native', 'disks': [{'name': 'windows-template-testing-0', 'name\_desc': '', 'os\_device': 'xvda', 'size': 42949672960, 'sr': 'Local storage', 'sr\_uuid': '0af1245e-bdb0-ba33-1446-57a962ec4075', 'vbd\_userdevice': '0'}, {'name': 'windows-template-testing-1', 'name\_desc': '', 'os\_device': 'xvdb', 'size': 42949672960, 'sr': 'Local storage', 'sr\_uuid': '0af1245e-bdb0-ba33-1446-57a962ec4075', 'vbd\_userdevice': '1'}], 'domid': '56', 'folder': '', 'hardware': {'memory\_mb': 8192, 'num\_cpu\_cores\_per\_socket': 2, 'num\_cpus': 4}, 'home\_server': '', 'is\_template': False, 'name': 'windows-template-testing', 'name\_desc': '', 'networks': [{'gateway': '192.168.0.254', 'gateway6': 'fc00::fffe', 'ip': '192.168.0.200', 'ip6': ['fe80:0000:0000:0000:e9cb:625a:32c5:c291', 'fc00:0000:0000:0000:0000:0000:0000:0001'], 'mac': 'ba:91:3a:48:20:76', 'mtu': '1500', 'name': 'Pool-wide network associated with eth1', 'netmask': '255.255.255.128', 'prefix': '25', 'prefix6': '64', 'vif\_device': '0'}], 'other\_config': {'base\_template\_name': 'Windows Server 2016 (64-bit)', 'import\_task': 'OpaqueRef:e43eb71c-45d6-5351-09ff-96e4fb7d0fa5', 'install-methods': 'cdrom', 'instant': 'true', 'mac\_seed': 'f83e8d8a-cfdc-b105-b054-ef5cb416b77e'}, 'platform': {'acpi': '1', 'apic': 'true', 'cores-per-socket': '2', 'device\_id': '0002', 'hpet': 'true', 'nx': 'true', 'pae': 'true', 'timeoffset': '-25200', 'vga': 'std', 'videoram': '8', 'viridian': 'true', 'viridian\_reference\_tsc': 'true', 'viridian\_time\_ref\_count': 'true'}, 'state': 'poweredon', 'uuid': 'e3c0b2d5-5f05-424e-479c-d3df8b3e7cda', 'xenstore\_data': {'vm-data': ''}} | ### Authors * Bojan Vitnik (@bvitnik) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#2c4e5a45584245470a0f1f1b170a0f191e170a0f181417414d45425f585e494d410a0f181a175e5f)> ansible community.general.gunicorn – Run gunicorn with various settings. community.general.gunicorn – Run gunicorn with various settings. ================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.gunicorn`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Starts gunicorn with the parameters specified. Common settings for gunicorn configuration are supported. For additional configuration use a config file See <https://gunicorn-docs.readthedocs.io/en/latest/settings.html> for more options. It’s recommended to always use the chdir option to avoid problems with the location of the app. Requirements ------------ The below requirements are needed on the host that executes this module. * gunicorn Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **app** string / required | | The app module. A name refers to a WSGI callable that should be found in the specified module. aliases: name | | **chdir** path | | Chdir to specified directory before apps loading. | | **config** path | | Path to the gunicorn configuration file. aliases: conf | | **pid** path | | A filename to use for the PID file. If not set and not found on the configuration file a tmp pid file will be created to check a successful run of gunicorn. | | **user** string | | Switch worker processes to run as this user. | | **venv** path | | Path to the virtualenv directory. aliases: virtualenv | | **worker** string | **Choices:*** sync * eventlet * gevent * tornado * gthread * gaiohttp | The type of workers to use. The default class (sync) should handle most "normal" types of workloads. | Notes ----- Note * If not specified on config file, a temporary error log will be created on /tmp dir. Please make sure you have write access in /tmp dir. Not needed but will help you to identify any problem with configuration. Examples -------- ``` - name: Simple gunicorn run example community.general.gunicorn: app: 'wsgi' chdir: '/workspace/example' - name: Run gunicorn on a virtualenv community.general.gunicorn: app: 'wsgi' chdir: '/workspace/example' venv: '/workspace/example/venv' - name: Run gunicorn with a config file community.general.gunicorn: app: 'wsgi' chdir: '/workspace/example' conf: '/workspace/example/gunicorn.cfg' - name: Run gunicorn as ansible user with specified pid and config file community.general.gunicorn: app: 'wsgi' chdir: '/workspace/example' conf: '/workspace/example/gunicorn.cfg' venv: '/workspace/example/venv' pid: '/workspace/example/gunicorn.pid' user: 'ansible' ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **gunicorn** string | changed | process id of gunicorn **Sample:** 1234 | ### Authors * Alejandro Gomez (@agmezr) ansible community.general.sensu_handler – Manages Sensu handler configuration community.general.sensu\_handler – Manages Sensu handler configuration ====================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.sensu_handler`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages Sensu handler configuration * For more information, refer to the Sensu documentation: <https://sensuapp.org/docs/latest/reference/handlers.html> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **command** string | | The handler command to be executed. The event data is passed to the process via STDIN. NOTE: the command attribute is only required for Pipe handlers (i.e. handlers configured with "type": "pipe"). | | **filter** string | | The Sensu event filter (name) to use when filtering events for the handler. | | **filters** list / elements=string | | An array of Sensu event filters (names) to use when filtering events for the handler. Each array item must be a string. | | **handle\_flapping** boolean | **Choices:*** **no** ← * yes | If events in the flapping state should be handled. | | **handle\_silenced** boolean | **Choices:*** **no** ← * yes | If events matching one or more silence entries should be handled. | | **handlers** list / elements=string | | An array of Sensu event handlers (names) to use for events using the handler set. NOTE: the handlers attribute is only required for handler sets (i.e. handlers configured with "type": "set"). | | **mutator** string | | The Sensu event mutator (name) to use to mutate event data for the handler. | | **name** string / required | | A unique name for the handler. The name cannot contain special characters or spaces. | | **pipe** dictionary | | The pipe definition scope, used to configure the Sensu transport pipe. NOTE: the pipe attribute is only required for Transport handlers (i.e. handlers configured with "type": "transport"). | | **severities** list / elements=string | | An array of check result severities the handler will handle. NOTE: event resolution bypasses this filtering. Example: [ 'warning', 'critical', 'unknown' ]. | | **socket** dictionary | | The socket definition scope, used to configure the TCP/UDP handler socket. NOTE: the socket attribute is only required for TCP/UDP handlers (i.e. handlers configured with "type": "tcp" or "type": "udp"). | | **state** string | **Choices:*** **present** ← * absent | Whether the handler should be present or not | | **timeout** integer | **Default:**10 | The handler execution duration timeout in seconds (hard stop). Only used by pipe and tcp handler types. | | **type** string | **Choices:*** pipe * tcp * udp * transport * set | The handler type | Notes ----- Note * Check mode is supported Examples -------- ``` # Configure a handler that sends event data as STDIN (pipe) - name: Configure IRC Sensu handler community.general.sensu_handler: name: "irc_handler" type: "pipe" command: "/usr/local/bin/notify-irc.sh" severities: - "ok" - "critical" - "warning" - "unknown" timeout: 15 notify: - Restart sensu-client - Restart sensu-server # Delete a handler - name: Delete IRC Sensu handler community.general.sensu_handler: name: "irc_handler" state: "absent" # Example of a TCP handler - name: Configure TCP Sensu handler community.general.sensu_handler: name: "tcp_handler" type: "tcp" timeout: 30 socket: host: "10.0.1.99" port: 4444 register: handler notify: - Restart sensu-client - Restart sensu-server - name: Secure Sensu handler configuration file ansible.builtin.file: path: "{{ handler['file'] }}" owner: "sensu" group: "sensu" mode: "0600" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **config** dictionary | success | Effective handler configuration, when state is present **Sample:** {'command': '/usr/local/bin/notify-irc.sh', 'name': 'irc', 'type': 'pipe'} | | **file** string | success | Path to the handler configuration file **Sample:** /etc/sensu/conf.d/handlers/irc.json | | **name** string | success | Name of the handler **Sample:** irc | ### Authors * David Moreau Simard (@dmsimard)
programming_docs
ansible community.general.ss_3par_cpg – Manage HPE StoreServ 3PAR CPG community.general.ss\_3par\_cpg – Manage HPE StoreServ 3PAR CPG =============================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ss_3par_cpg`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Create and delete CPG on HPE 3PAR. Requirements ------------ The below requirements are needed on the host that executes this module. * hpe3par\_sdk >= 1.0.2. Install using ‘pip install hpe3par\_sdk’ * WSAPI service should be enabled on the 3PAR storage array. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **cpg\_name** string / required | | Name of the CPG. | | **disk\_type** string | **Choices:*** FC * NL * SSD | Specifies that physical disks must have the specified device type. | | **domain** string | | Specifies the name of the domain in which the object will reside. | | **growth\_increment** string | | Specifies the growth increment(in MiB, GiB or TiB) the amount of logical disk storage created on each auto-grow operation. | | **growth\_limit** string | | Specifies that the autogrow operation is limited to the specified storage amount that sets the growth limit(in MiB, GiB or TiB). | | **growth\_warning** string | | Specifies that the threshold(in MiB, GiB or TiB) of used logical disk space when exceeded results in a warning alert. | | **high\_availability** string | **Choices:*** PORT * CAGE * MAG | Specifies that the layout must support the failure of one port pair, one cage, or one magazine. | | **raid\_type** string | **Choices:*** R0 * R1 * R5 * R6 | Specifies the RAID type for the logical disk. | | **secure** boolean | **Choices:*** **no** ← * yes | Specifies whether the certificate needs to be validated while communicating. | | **set\_size** integer | | Specifies the set size in the number of chunklets. | | **state** string / required | **Choices:*** present * absent | Whether the specified CPG should exist or not. | | **storage\_system\_ip** string / required | | The storage system IP address. | | **storage\_system\_password** string / required | | The storage system password. | | **storage\_system\_username** string / required | | The storage system user name. | Notes ----- Note * check\_mode not supported Examples -------- ``` - name: Create CPG sample_cpg community.general.ss_3par_cpg: storage_system_ip: 10.10.10.1 storage_system_username: username storage_system_password: password state: present cpg_name: sample_cpg domain: sample_domain growth_increment: 32000 MiB growth_limit: 64000 MiB growth_warning: 48000 MiB raid_type: R6 set_size: 8 high_availability: MAG disk_type: FC secure: no - name: Delete CPG sample_cpg community.general.ss_3par_cpg: storage_system_ip: 10.10.10.1 storage_system_username: username storage_system_password: password state: absent cpg_name: sample_cpg secure: no ``` ### Authors * Farhan Nomani (@farhan7500) * Gautham P Hegde (@gautamphegde) ansible community.general.udm_dns_record – Manage dns entries on a univention corporate server community.general.udm\_dns\_record – Manage dns entries on a univention corporate server ======================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.udm_dns_record`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This module allows to manage dns records on a univention corporate server (UCS). It uses the python API of the UCS to create a new object or edit it. Requirements ------------ The below requirements are needed on the host that executes this module. * Python >= 2.6 * Univention * ipaddress (for *type=ptr\_record*) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **data** dictionary | **Default:**{} | Additional data for this record, e.g. ['a': '192.0.2.1']. Required if `state=present`. | | **name** string / required | | Name of the record, this is also the DNS record. E.g. www for www.example.com. For PTR records this has to be the IP address. | | **state** string | **Choices:*** **present** ← * absent | Whether the dns record is present or not. | | **type** string / required | | Define the record type. `host_record` is a A or AAAA record, `alias` is a CNAME, `ptr_record` is a PTR record, `srv_record` is a SRV record and `txt_record` is a TXT record. The available choices are: `host_record`, `alias`, `ptr_record`, `srv_record`, `txt_record`. | | **zone** string / required | | Corresponding DNS zone for this record, e.g. example.com. For PTR records this has to be the full reverse zone (for example `1.1.192.in-addr.arpa`). | Examples -------- ``` - name: Create a DNS record on a UCS community.general.udm_dns_record: name: www zone: example.com type: host_record data: a: - 192.0.2.1 - 2001:0db8::42 - name: Create a DNS v4 PTR record on a UCS community.general.udm_dns_record: name: 192.0.2.1 zone: 2.0.192.in-addr.arpa type: ptr_record data: ptr_record: "www.example.com." - name: Create a DNS v6 PTR record on a UCS community.general.udm_dns_record: name: 2001:db8:0:0:0:ff00:42:8329 zone: 2.4.0.0.0.0.f.f.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa type: ptr_record data: ptr_record: "www.example.com." ``` ### Authors * Tobias Rüetschi (@keachi) ansible community.general.xattr – Manage user defined extended attributes community.general.xattr – Manage user defined extended attributes ================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.xattr`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manages filesystem user defined extended attributes. * Requires that extended attributes are enabled on the target filesystem and that the setfattr/getfattr utilities are present. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **follow** boolean | **Choices:*** no * **yes** ← | If `yes`, dereferences symlinks and sets/gets attributes on symlink target, otherwise acts on symlink itself. | | **key** string | | The name of a specific Extended attribute key to set/retrieve. | | **namespace** string | **Default:**"user" | Namespace of the named name/key. | | **path** path / required | | The full path of the file/object to get the facts of. Before 2.3 this option was only usable as *name*. aliases: name | | **state** string | **Choices:*** absent * all * keys * present * **read** ← | defines which state you want to do. `read` retrieves the current value for a `key` (default) `present` sets `name` to `value`, default if value is set `all` dumps all data `keys` retrieves all keys `absent` deletes the key | | **value** string | | The value to set the named name/key to, it automatically sets the `state` to 'set'. | Notes ----- Note * As of Ansible 2.3, the *name* option has been changed to *path* as default, but *name* still works as well. Examples -------- ``` - name: Obtain the extended attributes of /etc/foo.conf community.general.xattr: path: /etc/foo.conf - name: Set the key 'user.foo' to value 'bar' community.general.xattr: path: /etc/foo.conf key: foo value: bar - name: Set the key 'trusted.glusterfs.volume-id' to value '0x817b94343f164f199e5b573b4ea1f914' community.general.xattr: path: /mnt/bricks/brick1 namespace: trusted key: glusterfs.volume-id value: "0x817b94343f164f199e5b573b4ea1f914" - name: Remove the key 'user.foo' community.general.xattr: path: /etc/foo.conf key: foo state: absent - name: Remove the key 'trusted.glusterfs.volume-id' community.general.xattr: path: /mnt/bricks/brick1 namespace: trusted key: glusterfs.volume-id state: absent ``` ### Authors * Brian Coca (@bcoca) ansible community.general.scaleway_server_info – Gather information about the Scaleway servers available. community.general.scaleway\_server\_info – Gather information about the Scaleway servers available. =================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.scaleway_server_info`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Gather information about the Scaleway servers available. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_timeout** integer | **Default:**30 | HTTP timeout to Scaleway API in seconds. aliases: timeout | | **api\_token** string / required | | Scaleway OAuth token. aliases: oauth\_token | | **api\_url** string | **Default:**"https://api.scaleway.com" | Scaleway API URL. aliases: base\_url | | **query\_parameters** dictionary | **Default:**{} | List of parameters passed to the query string. | | **region** string / required | **Choices:*** ams1 * EMEA-NL-EVS * par1 * EMEA-FR-PAR1 * par2 * EMEA-FR-PAR2 * waw1 * EMEA-PL-WAW1 | Scaleway region to use (for example `par1`). | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Validate SSL certs of the Scaleway API. | Notes ----- Note * Also see the API documentation on <https://developer.scaleway.com/> * If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `SCW_TOKEN`, `SCW_API_KEY`, `SCW_OAUTH_TOKEN` or `SCW_API_TOKEN`. * If one wants to use a different `api_url` one can also set the `SCW_API_URL` environment variable. Examples -------- ``` - name: Gather Scaleway servers information community.general.scaleway_server_info: region: par1 register: result - ansible.builtin.debug: msg: "{{ result.scaleway_server_info }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **scaleway\_server\_info** list / elements=dictionary | success | Response from Scaleway API. For more details please refer to: <https://developers.scaleway.com/en/products/instance/api/>. **Sample:** {'scaleway\_server\_info': [{'arch': 'x86\_64', 'boot\_type': 'local', 'bootscript': {'architecture': 'x86\_64', 'bootcmdargs': 'LINUX\_COMMON scaleway boot=local nbd.max\_part=16', 'default': True, 'dtb': '', 'id': 'b1e68c26-a19c-4eac-9222-498b22bd7ad9', 'initrd': 'http://169.254.42.24/initrd/initrd-Linux-x86\_64-v3.14.5.gz', 'kernel': 'http://169.254.42.24/kernel/x86\_64-mainline-lts-4.4-4.4.127-rev1/vmlinuz-4.4.127', 'organization': '11111111-1111-4111-8111-111111111111', 'public': True, 'title': 'x86\_64 mainline 4.4.127 rev1'}, 'commercial\_type': 'START1-XS', 'creation\_date': '2018-08-14T21:36:56.271545+00:00', 'dynamic\_ip\_required': False, 'enable\_ipv6': False, 'extra\_networks': [], 'hostname': 'scw-e0d256', 'id': '12f19bc7-108c-4517-954c-e6b3d0311363', 'image': {'arch': 'x86\_64', 'creation\_date': '2018-04-26T12:42:21.619844+00:00', 'default\_bootscript': {'architecture': 'x86\_64', 'bootcmdargs': 'LINUX\_COMMON scaleway boot=local nbd.max\_part=16', 'default': True, 'dtb': '', 'id': 'b1e68c26-a19c-4eac-9222-498b22bd7ad9', 'initrd': 'http://169.254.42.24/initrd/initrd-Linux-x86\_64-v3.14.5.gz', 'kernel': 'http://169.254.42.24/kernel/x86\_64-mainline-lts-4.4-4.4.127-rev1/vmlinuz-4.4.127', 'organization': '11111111-1111-4111-8111-111111111111', 'public': True, 'title': 'x86\_64 mainline 4.4.127 rev1'}, 'extra\_volumes': [], 'from\_server': None, 'id': '67375eb1-f14d-4f02-bb42-6119cecbde51', 'modification\_date': '2018-04-26T12:49:07.573004+00:00', 'name': 'Ubuntu Xenial', 'organization': '51b656e3-4865-41e8-adbc-0c45bdd780db', 'public': True, 'root\_volume': {'id': '020b8d61-3867-4a0e-84a4-445c5393e05d', 'name': 'snapshot-87fc282d-f252-4262-adad-86979d9074cf-2018-04-26\_12:42', 'size': 25000000000, 'volume\_type': 'l\_ssd'}, 'state': 'available'}, 'ipv6': None, 'location': {'cluster\_id': '5', 'hypervisor\_id': '412', 'node\_id': '2', 'platform\_id': '13', 'zone\_id': 'par1'}, 'maintenances': [], 'modification\_date': '2018-08-14T21:37:28.630882+00:00', 'name': 'scw-e0d256', 'organization': '3f709602-5e6c-4619-b80c-e841c89734af', 'private\_ip': '10.14.222.131', 'protected': False, 'public\_ip': {'address': '163.172.170.197', 'dynamic': False, 'id': 'ea081794-a581-4495-8451-386ddaf0a451'}, 'security\_group': {'id': 'a37379d2-d8b0-4668-9cfb-1233fc436f7e', 'name': 'Default security group'}, 'state': 'running', 'state\_detail': 'booted', 'tags': [], 'volumes': {'0': {'creation\_date': '2018-08-14T21:36:56.271545+00:00', 'export\_uri': 'device://dev/vda', 'id': '68386fae-4f55-4fbf-aabb-953036a85872', 'modification\_date': '2018-08-14T21:36:56.271545+00:00', 'name': 'snapshot-87fc282d-f252-4262-adad-86979d9074cf-2018-04-26\_12:42', 'organization': '3f709602-5e6c-4619-b80c-e841c89734af', 'server': {'id': '12f19bc7-108c-4517-954c-e6b3d0311363', 'name': 'scw-e0d256'}, 'size': 25000000000, 'state': 'available', 'volume\_type': 'l\_ssd'}}}]} | ### Authors * Yanis Guenane (@Spredzy) * Remy Leone (@sieben) ansible community.general.vexata_eg – Manage export groups on Vexata VX100 storage arrays community.general.vexata\_eg – Manage export groups on Vexata VX100 storage arrays ================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.vexata_eg`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Create or delete export groups on a Vexata VX100 array. * An export group is a tuple of a volume group, initiator group and port group that allows a set of volumes to be exposed to one or more hosts through specific array ports. Requirements ------------ The below requirements are needed on the host that executes this module. * Vexata VX100 storage array with VXOS >= v3.5.0 on storage array * vexatapi >= 0.0.1 * python >= 2.7 * VEXATA\_USER and VEXATA\_PASSWORD environment variables must be set if user and password arguments are not passed to the module directly. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **array** string / required | | Vexata VX100 array hostname or IPv4 Address. | | **ig** string | | Initiator group name. | | **name** string / required | | Export group name. | | **password** string | | Vexata API user password. | | **pg** string | | Port group name. | | **state** string | **Choices:*** **present** ← * absent | Creates export group when present or delete when absent. | | **user** string | | Vexata API user with administrative privileges. | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | Allows connection when SSL certificates are not valid. Set to `false` when certificates are not trusted. If set to `yes`, please make sure Python >= 2.7.9 is installed on the given machine. | | **vg** string | | Volume group name. | Examples -------- ``` - name: Create export group named db_export. community.general.vexata_eg: name: db_export vg: dbvols ig: dbhosts pg: pg1 state: present array: vx100_ultra.test.com user: admin password: secret - name: Delete export group named db_export community.general.vexata_eg: name: db_export state: absent array: vx100_ultra.test.com user: admin password: secret ``` ### Authors * Sandeep Kasargod (@vexata) ansible community.general.netcup_dns – manage Netcup DNS records community.general.netcup\_dns – manage Netcup DNS records ========================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.netcup_dns`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages DNS records via the Netcup API, see the docs <https://ccp.netcup.net/run/webservice/servers/endpoint.php> Requirements ------------ The below requirements are needed on the host that executes this module. * nc-dnsapi >= 0.1.3 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string / required | | API key for authentication, must be obtained via the netcup CCP (<https://ccp.netcup.net>) | | **api\_password** string / required | | API password for authentication, must be obtained via the netcup CCP (https://ccp.netcup.net) | | **customer\_id** integer / required | | Netcup customer id | | **domain** string / required | | Domainname the records should be added / removed | | **priority** integer | | Record priority. Required for `type=MX` | | **record** string | **Default:**"@" | Record to add or delete, supports wildcard (\*). Default is `@` (e.g. the zone name) aliases: name | | **solo** boolean | **Choices:*** **no** ← * yes | Whether the record should be the only one for that record type and record name. Only use with `state=present` This will delete all other records with the same record name and type. | | **state** string | **Choices:*** **present** ← * absent | Whether the record should exist or not | | **type** string / required | **Choices:*** A * AAAA * MX * CNAME * CAA * SRV * TXT * TLSA * NS * DS | Record type | | **value** string / required | | Record value | Examples -------- ``` - name: Create a record of type A community.general.netcup_dns: api_key: "..." api_password: "..." customer_id: "..." domain: "example.com" name: "mail" type: "A" value: "127.0.0.1" - name: Delete that record community.general.netcup_dns: api_key: "..." api_password: "..." customer_id: "..." domain: "example.com" name: "mail" type: "A" value: "127.0.0.1" state: absent - name: Create a wildcard record community.general.netcup_dns: api_key: "..." api_password: "..." customer_id: "..." domain: "example.com" name: "*" type: "A" value: "127.0.1.1" - name: Set the MX record for example.com community.general.netcup_dns: api_key: "..." api_password: "..." customer_id: "..." domain: "example.com" type: "MX" value: "mail.example.com" - name: Set a record and ensure that this is the only one community.general.netcup_dns: api_key: "..." api_password: "..." customer_id: "..." name: "demo" domain: "example.com" type: "AAAA" value: "::1" solo: true ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **records** complex | success | list containing all records | | | **id** integer | success | internal id of the record **Sample:** 12345 | | | **name** string | success | the record name **Sample:** fancy-hostname | | | **priority** integer | success | the record priority (only relevant if type=MX) | | | **type** string | succcess | the record type **Sample:** A | | | **value** string | success | the record destination **Sample:** 127.0.0.1 | ### Authors * Nicolai Buchwitz (@nbuchwitz)
programming_docs
ansible community.general.rax_files_objects – Upload, download, and delete objects in Rackspace Cloud Files community.general.rax\_files\_objects – Upload, download, and delete objects in Rackspace Cloud Files ===================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rax_files_objects`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Upload, download, and delete objects in Rackspace Cloud Files Requirements ------------ The below requirements are needed on the host that executes this module. * pyrax * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string | | Rackspace API key, overrides *credentials*. aliases: password | | **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/> | | **clear\_meta** boolean | **Choices:*** **no** ← * yes | Optionally clear existing metadata when applying metadata to existing objects. Selecting this option is only appropriate when setting type=meta | | **container** string / required | | The container to use for file object operations. | | **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided. aliases: creds\_file | | **dest** string | | The destination of a "get" operation; i.e. a local directory, "/home/user/myfolder". Used to specify the destination of an operation on a remote object; i.e. a file name, "file1", or a comma-separated list of remote objects, "file1,file2,file17" | | **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. | | **expires** integer | | Used to set an expiration on a file or folder uploaded to Cloud Files. Requires an integer, specifying expiration in seconds | | **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. | | **meta** dictionary | | A hash of items to set as metadata values on an uploaded file or folder | | **method** string | **Choices:*** **get** ← * put * delete | The method of operation to be performed. For example, put to upload files to Cloud Files, get to download files from Cloud Files or delete to delete remote objects in Cloud Files | | **region** string | | Region to create an instance in. | | **src** string | | Source from which to upload files. Used to specify a remote object as a source for an operation, i.e. a file name, "file1", or a comma-separated list of remote objects, "file1,file2,file17". src and dest are mutually exclusive on remote-only object operations | | **structure** boolean | **Choices:*** no * **yes** ← | Used to specify whether to maintain nested directory structure when downloading objects from Cloud Files. Setting to false downloads the contents of a container to a single, flat directory | | **tenant\_id** string | | The tenant ID used for authentication. | | **tenant\_name** string | | The tenant name used for authentication. | | **type** string | **Choices:*** **file** ← * meta | Type of object to do work on Metadata object or a file object | | **username** string | | Rackspace username, overrides *credentials*. | | **validate\_certs** boolean | **Choices:*** no * yes | Whether or not to require SSL validation of API endpoints. aliases: verify\_ssl | Notes ----- Note * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) Examples -------- ``` - name: "Test Cloud Files Objects" hosts: local gather_facts: False tasks: - name: "Get objects from test container" community.general.rax_files_objects: container: testcont dest: ~/Downloads/testcont - name: "Get single object from test container" community.general.rax_files_objects: container: testcont src: file1 dest: ~/Downloads/testcont - name: "Get several objects from test container" community.general.rax_files_objects: container: testcont src: file1,file2,file3 dest: ~/Downloads/testcont - name: "Delete one object in test container" community.general.rax_files_objects: container: testcont method: delete dest: file1 - name: "Delete several objects in test container" community.general.rax_files_objects: container: testcont method: delete dest: file2,file3,file4 - name: "Delete all objects in test container" community.general.rax_files_objects: container: testcont method: delete - name: "Upload all files to test container" community.general.rax_files_objects: container: testcont method: put src: ~/Downloads/onehundred - name: "Upload one file to test container" community.general.rax_files_objects: container: testcont method: put src: ~/Downloads/testcont/file1 - name: "Upload one file to test container with metadata" community.general.rax_files_objects: container: testcont src: ~/Downloads/testcont/file2 method: put meta: testkey: testdata who_uploaded_this: [email protected] - name: "Upload one file to test container with TTL of 60 seconds" community.general.rax_files_objects: container: testcont method: put src: ~/Downloads/testcont/file3 expires: 60 - name: "Attempt to get remote object that does not exist" community.general.rax_files_objects: container: testcont method: get src: FileThatDoesNotExist.jpg dest: ~/Downloads/testcont ignore_errors: yes - name: "Attempt to delete remote object that does not exist" community.general.rax_files_objects: container: testcont method: delete dest: FileThatDoesNotExist.jpg ignore_errors: yes - name: "Test Cloud Files Objects Metadata" hosts: local gather_facts: false tasks: - name: "Get metadata on one object" community.general.rax_files_objects: container: testcont type: meta dest: file2 - name: "Get metadata on several objects" community.general.rax_files_objects: container: testcont type: meta src: file2,file1 - name: "Set metadata on an object" community.general.rax_files_objects: container: testcont type: meta dest: file17 method: put meta: key1: value1 key2: value2 clear_meta: true - name: "Verify metadata is set" community.general.rax_files_objects: container: testcont type: meta src: file17 - name: "Delete metadata" community.general.rax_files_objects: container: testcont type: meta dest: file17 method: delete meta: key1: '' key2: '' - name: "Get metadata on all objects" community.general.rax_files_objects: container: testcont type: meta ``` ### Authors * Paul Durivage (@angstwad) ansible community.general.lvg – Configure LVM volume groups community.general.lvg – Configure LVM volume groups =================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.lvg`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * This module creates, removes or resizes volume groups. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **force** boolean | **Choices:*** **no** ← * yes | If `yes`, allows to remove volume group with logical volumes. | | **pesize** string | **Default:**"4" | The size of the physical extent. *pesize* must be a power of 2 of at least 1 sector (where the sector size is the largest sector size of the PVs currently used in the VG), or at least 128KiB. Since Ansible 2.6, pesize can be optionally suffixed by a UNIT (k/K/m/M/g/G), default unit is megabyte. | | **pv\_options** string | | Additional options to pass to `pvcreate` when creating the volume group. | | **pvresize** boolean added in 0.2.0 of community.general | **Choices:*** **no** ← * yes | If `yes`, resize the physical volume to the maximum available size. | | **pvs** list / elements=string | | List of comma-separated devices to use as physical devices in this volume group. Required when creating or resizing volume group. The module will take care of running pvcreate if needed. | | **state** string | **Choices:*** absent * **present** ← | Control if the volume group exists. | | **vg** string / required | | The name of the volume group. | | **vg\_options** string | | Additional options to pass to `vgcreate` when creating the volume group. | Notes ----- Note * This module does not modify PE size for already present volume group. See Also -------- See also [community.general.filesystem](filesystem_module#ansible-collections-community-general-filesystem-module) The official documentation on the **community.general.filesystem** module. [community.general.lvol](lvol_module#ansible-collections-community-general-lvol-module) The official documentation on the **community.general.lvol** module. [community.general.parted](parted_module#ansible-collections-community-general-parted-module) The official documentation on the **community.general.parted** module. Examples -------- ``` - name: Create a volume group on top of /dev/sda1 with physical extent size = 32MB community.general.lvg: vg: vg.services pvs: /dev/sda1 pesize: 32 - name: Create a volume group on top of /dev/sdb with physical extent size = 128KiB community.general.lvg: vg: vg.services pvs: /dev/sdb pesize: 128K # If, for example, we already have VG vg.services on top of /dev/sdb1, # this VG will be extended by /dev/sdc5. Or if vg.services was created on # top of /dev/sda5, we first extend it with /dev/sdb1 and /dev/sdc5, # and then reduce by /dev/sda5. - name: Create or resize a volume group on top of /dev/sdb1 and /dev/sdc5. community.general.lvg: vg: vg.services pvs: /dev/sdb1,/dev/sdc5 - name: Remove a volume group with name vg.services community.general.lvg: vg: vg.services state: absent - name: Create a volume group on top of /dev/sda3 and resize the volume group /dev/sda3 to the maximum possible community.general.lvg: vg: resizableVG pvs: /dev/sda3 pvresize: yes ``` ### Authors * Alexander Bulimov (@abulimov) ansible community.general.uptimerobot – Pause and start Uptime Robot monitoring community.general.uptimerobot – Pause and start Uptime Robot monitoring ======================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.uptimerobot`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module will let you start and pause Uptime Robot Monitoring Requirements ------------ The below requirements are needed on the host that executes this module. * Valid Uptime Robot API Key Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **apikey** string / required | | Uptime Robot API key. | | **monitorid** string / required | | ID of the monitor to check. | | **state** string / required | **Choices:*** started * paused | Define whether or not the monitor should be running or paused. | Notes ----- Note * Support for adding and removing monitors and alert contacts has not yet been implemented. Examples -------- ``` - name: Pause the monitor with an ID of 12345 community.general.uptimerobot: monitorid: 12345 apikey: 12345-1234512345 state: paused - name: Start the monitor with an ID of 12345 community.general.uptimerobot: monitorid: 12345 apikey: 12345-1234512345 state: started ``` ### Authors * Nate Kingsley (@nate-kingsley) ansible community.general.sumologic – Sends task result events to Sumologic community.general.sumologic – Sends task result events to Sumologic =================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.sumologic`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This callback plugin will send task results as JSON formatted events to a Sumologic HTTP collector source Requirements ------------ The below requirements are needed on the local controller node that executes this callback. * Whitelisting this callback plugin * Create a HTTP collector source in Sumologic and specify a custom timestamp format of `yyyy-MM-dd HH:mm:ss ZZZZ` and a custom timestamp locator of `"timestamp": "(.*`”) Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **url** string | | ini entries: [callback\_sumologic]url = None env:SUMOLOGIC\_URL | URL to the Sumologic HTTP collector source | Examples -------- ``` examples: > To enable, add this to your ansible.cfg file in the defaults block [defaults] callback_whitelist = community.general.sumologic Set the environment variable export SUMOLOGIC_URL=https://endpoint1.collection.us2.sumologic.com/receiver/v1/http/R8moSv1d8EW9LAUFZJ6dbxCFxwLH6kfCdcBfddlfxCbLuL-BN5twcTpMk__pYy_cDmp== Set the ansible.cfg variable in the callback_sumologic block [callback_sumologic] url = https://endpoint1.collection.us2.sumologic.com/receiver/v1/http/R8moSv1d8EW9LAUFZJ6dbxCFxwLH6kfCdcBfddlfxCbLuL-BN5twcTpMk__pYy_cDmp== ``` ### Authors * Ryan Currah (@ryancurrah) ansible community.general.manageiq_tags – Management of resource tags in ManageIQ. community.general.manageiq\_tags – Management of resource tags in ManageIQ. =========================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.manageiq_tags`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * The manageiq\_tags module supports adding, updating and deleting tags in ManageIQ. Requirements ------------ The below requirements are needed on the host that executes this module. * manageiq-client <https://github.com/ManageIQ/manageiq-api-client-python/> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **manageiq\_connection** dictionary | | ManageIQ connection configuration information. | | | **ca\_cert** string | | The path to a CA bundle file or directory with certificates. defaults to None. aliases: ca\_bundle\_path | | | **password** string | | ManageIQ password. `MIQ_PASSWORD` env var if set. otherwise, required if no token is passed in. | | | **token** string | | ManageIQ token. `MIQ_TOKEN` env var if set. otherwise, required if no username or password is passed in. | | | **url** string | | ManageIQ environment url. `MIQ_URL` env var if set. otherwise, it is required to pass it. | | | **username** string | | ManageIQ username. `MIQ_USERNAME` env var if set. otherwise, required if no token is passed in. | | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether SSL certificates should be verified for HTTPS requests. defaults to True. aliases: verify\_ssl | | **resource\_id** integer added in 2.2.0 of community.general | | The ID of the resource at which tags will be controlled. Must be specified if *resource\_name* is not set. Both options are mutually exclusive. | | **resource\_name** string | | The name of the resource at which tags will be controlled. Must be specified if *resource\_id* is not set. Both options are mutually exclusive. | | **resource\_type** string / required | **Choices:*** provider * host * vm * blueprint * category * cluster * data store * group * resource pool * service * service template * template * tenant * user | The relevant resource type in manageiq. | | **state** string | **Choices:*** absent * **present** ← * list | absent - tags should not exist, present - tags should exist, list - list current tags. | | **tags** list / elements=dictionary | | tags - list of dictionaries, each includes 'name' and 'category' keys. required if state is present or absent. | Examples -------- ``` - name: Create new tags for a provider in ManageIQ community.general.manageiq_tags: resource_name: 'EngLab' resource_type: 'provider' tags: - category: environment name: prod - category: owner name: prod_ops manageiq_connection: url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' validate_certs: False - name: Create new tags for a provider in ManageIQ community.general.manageiq_tags: resource_id: 23000000790497 resource_type: 'provider' tags: - category: environment name: prod - category: owner name: prod_ops manageiq_connection: url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' validate_certs: False - name: Remove tags for a provider in ManageIQ community.general.manageiq_tags: state: absent resource_name: 'EngLab' resource_type: 'provider' tags: - category: environment name: prod - category: owner name: prod_ops manageiq_connection: url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' validate_certs: False - name: List current tags for a provider in ManageIQ community.general.manageiq_tags: state: list resource_name: 'EngLab' resource_type: 'provider' manageiq_connection: url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' validate_certs: False ``` ### Authors * Daniel Korn (@dkorn)
programming_docs
ansible community.general.atomic_image – Manage the container images on the atomic host platform community.general.atomic\_image – Manage the container images on the atomic host platform ========================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.atomic_image`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage the container images on the atomic host platform. * Allows to execute the commands specified by the RUN label in the container image when present. Requirements ------------ The below requirements are needed on the host that executes this module. * atomic * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **backend** string | **Choices:*** docker * ostree | Define the backend where the image is pulled. | | **name** string / required | | Name of the container image. | | **started** boolean | **Choices:*** no * **yes** ← | Start or Stop the container. | | **state** string | **Choices:*** absent * **latest** ← * present | The state of the container image. The state `latest` will ensure container image is upgraded to the latest version and forcefully restart container, if running. | Notes ----- Note * Host should support `atomic` command. Examples -------- ``` - name: Execute the run command on rsyslog container image (atomic run rhel7/rsyslog) community.general.atomic_image: name: rhel7/rsyslog state: latest - name: Pull busybox to the OSTree backend community.general.atomic_image: name: busybox state: latest backend: ostree ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **msg** string | always | The command standard output **Sample:** [{"u'Using default tag": "latest ...'"}] | ### Authors * Saravanan KR (@krsacme) ansible community.general.pagerduty_alert – Trigger, acknowledge or resolve PagerDuty incidents community.general.pagerduty\_alert – Trigger, acknowledge or resolve PagerDuty incidents ======================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pagerduty_alert`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This module will let you trigger, acknowledge or resolve a PagerDuty incident by sending events Requirements ------------ The below requirements are needed on the host that executes this module. * PagerDuty API access Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string / required | | The pagerduty API key (readonly access), generated on the pagerduty site. | | **client** string | | The name of the monitoring client that is triggering this event. | | **client\_url** string | | The URL of the monitoring client that is triggering this event. | | **desc** string | **Default:**"Created via Ansible" | For `triggered` *state* - Required. Short description of the problem that led to this trigger. This field (or a truncated version) will be used when generating phone calls, SMS messages and alert emails. It will also appear on the incidents tables in the PagerDuty UI. The maximum length is 1024 characters. For `acknowledged` or `resolved` *state* - Text that will appear in the incident's log associated with this event. | | **incident\_key** string | | Identifies the incident to which this *state* should be applied. For `triggered` *state* - If there's no open (i.e. unresolved) incident with this key, a new one will be created. If there's already an open incident with a matching key, this event will be appended to that incident's log. The event key provides an easy way to "de-dup" problem reports. For `acknowledged` or `resolved` *state* - This should be the incident\_key you received back when the incident was first opened by a trigger event. Acknowledge events referencing resolved or nonexistent incidents will be discarded. | | **integration\_key** string | | The GUID of one of your "Generic API" services. This is the "integration key" listed on a "Integrations" tab of PagerDuty service. | | **name** string | | PagerDuty unique subdomain. Obsolete. It is not used with PagerDuty REST v2 API. | | **service\_id** string / required | | ID of PagerDuty service when incidents will be triggered, acknowledged or resolved. | | **service\_key** string | | The GUID of one of your "Generic API" services. Obsolete. Please use *integration\_key*. | | **state** string / required | **Choices:*** triggered * acknowledged * resolved | Type of event to be sent. | Examples -------- ``` - name: Trigger an incident with just the basic options community.general.pagerduty_alert: name: companyabc integration_key: xxx api_key: yourapikey service_id: PDservice state: triggered desc: problem that led to this trigger - name: Trigger an incident with more options community.general.pagerduty_alert: integration_key: xxx api_key: yourapikey service_id: PDservice state: triggered desc: problem that led to this trigger incident_key: somekey client: Sample Monitoring Service client_url: http://service.example.com - name: Acknowledge an incident based on incident_key community.general.pagerduty_alert: integration_key: xxx api_key: yourapikey service_id: PDservice state: acknowledged incident_key: somekey desc: "some text for incident's log" - name: Resolve an incident based on incident_key community.general.pagerduty_alert: integration_key: xxx api_key: yourapikey service_id: PDservice state: resolved incident_key: somekey desc: "some text for incident's log" ``` ### Authors * Amanpreet Singh (@ApsOps) ansible community.general.etcd – get info from an etcd server community.general.etcd – get info from an etcd server ===================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.etcd`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Retrieves data from an etcd server Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **\_terms** list / elements=string / required | | | the list of keys to lookup on the etcd server | | **url** string | **Default:**"http://127.0.0.1:4001" | env:ANSIBLE\_ETCD\_URL | Environment variable with the url for the etcd server | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | | toggle checking that the ssl certificates are valid, you normally only want to turn this off with self-signed certs. | | **version** string | **Default:**"v1" | env:ANSIBLE\_ETCD\_VERSION | Environment variable with the etcd protocol version | Examples -------- ``` - name: "a value from a locally running etcd" ansible.builtin.debug: msg: "{{ lookup('community.general.etcd', 'foo/bar') }}" - name: "values from multiple folders on a locally running etcd" ansible.builtin.debug: msg: "{{ lookup('community.general.etcd', 'foo', 'bar', 'baz') }}" - name: "since Ansible 2.5 you can set server options inline" ansible.builtin.debug: msg: "{{ lookup('community.general.etcd', 'foo', version='v2', url='http://192.168.0.27:4001') }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **\_raw** list / elements=string | success | list of values associated with input keys | ### Authors * Jan-Piet Mens (@jpmens) ansible Community.General Community.General ================= Collection version 3.8.1 Guides ------ * [community.general Filter Guide](docsite/filter_guide) Plugin Index ------------ These are the plugins in the community.general collection ### Become Plugins * [doas](doas_become#ansible-collections-community-general-doas-become) – Do As user * [dzdo](dzdo_become#ansible-collections-community-general-dzdo-become) – Centrify’s Direct Authorize * [ksu](ksu_become#ansible-collections-community-general-ksu-become) – Kerberos substitute user * [machinectl](machinectl_become#ansible-collections-community-general-machinectl-become) – Systemd’s machinectl privilege escalation * [pbrun](pbrun_become#ansible-collections-community-general-pbrun-become) – PowerBroker run * [pfexec](pfexec_become#ansible-collections-community-general-pfexec-become) – profile based execution * [pmrun](pmrun_become#ansible-collections-community-general-pmrun-become) – Privilege Manager run * [sesu](sesu_become#ansible-collections-community-general-sesu-become) – CA Privileged Access Manager * [sudosu](sudosu_become#ansible-collections-community-general-sudosu-become) – Run tasks using sudo su - ### Cache Plugins * [memcached](memcached_cache#ansible-collections-community-general-memcached-cache) – Use memcached DB for cache * [pickle](pickle_cache#ansible-collections-community-general-pickle-cache) – Pickle formatted files. * [redis](redis_cache#ansible-collections-community-general-redis-cache) – Use Redis DB for cache * [yaml](yaml_cache#ansible-collections-community-general-yaml-cache) – YAML formatted files. ### Callback Plugins * [cgroup\_memory\_recap](cgroup_memory_recap_callback#ansible-collections-community-general-cgroup-memory-recap-callback) – Profiles maximum memory usage of tasks and full execution using cgroups * [context\_demo](context_demo_callback#ansible-collections-community-general-context-demo-callback) – demo callback that adds play/task context * [counter\_enabled](counter_enabled_callback#ansible-collections-community-general-counter-enabled-callback) – adds counters to the output items (tasks and hosts/task) * [dense](dense_callback#ansible-collections-community-general-dense-callback) – minimal stdout output * [diy](diy_callback#ansible-collections-community-general-diy-callback) – Customize the output * [elastic](elastic_callback#ansible-collections-community-general-elastic-callback) – Create distributed traces for each Ansible task in Elastic APM * [hipchat](hipchat_callback#ansible-collections-community-general-hipchat-callback) – post task events to hipchat * [jabber](jabber_callback#ansible-collections-community-general-jabber-callback) – post task events to a jabber server * [log\_plays](log_plays_callback#ansible-collections-community-general-log-plays-callback) – write playbook output to log file * [loganalytics](loganalytics_callback#ansible-collections-community-general-loganalytics-callback) – Posts task results to Azure Log Analytics * [logdna](logdna_callback#ansible-collections-community-general-logdna-callback) – Sends playbook logs to LogDNA * [logentries](logentries_callback#ansible-collections-community-general-logentries-callback) – Sends events to Logentries * [logstash](logstash_callback#ansible-collections-community-general-logstash-callback) – Sends events to Logstash * [mail](mail_callback#ansible-collections-community-general-mail-callback) – Sends failure events via email * [nrdp](nrdp_callback#ansible-collections-community-general-nrdp-callback) – Post task results to a Nagios server through nrdp * [null](null_callback#ansible-collections-community-general-null-callback) – Don’t display stuff to screen * [opentelemetry](opentelemetry_callback#ansible-collections-community-general-opentelemetry-callback) – Create distributed traces with OpenTelemetry * [say](say_callback#ansible-collections-community-general-say-callback) – notify using software speech synthesizer * [selective](selective_callback#ansible-collections-community-general-selective-callback) – only print certain tasks * [slack](slack_callback#ansible-collections-community-general-slack-callback) – Sends play events to a Slack channel * [splunk](splunk_callback#ansible-collections-community-general-splunk-callback) – Sends task result events to Splunk HTTP Event Collector * [sumologic](sumologic_callback#ansible-collections-community-general-sumologic-callback) – Sends task result events to Sumologic * [syslog\_json](syslog_json_callback#ansible-collections-community-general-syslog-json-callback) – sends JSON events to syslog * [unixy](unixy_callback#ansible-collections-community-general-unixy-callback) – condensed Ansible output * [yaml](yaml_callback#ansible-collections-community-general-yaml-callback) – yaml-ized Ansible screen output ### Connection Plugins * [chroot](chroot_connection#ansible-collections-community-general-chroot-connection) – Interact with local chroot * [funcd](funcd_connection#ansible-collections-community-general-funcd-connection) – Use funcd to connect to target * [iocage](iocage_connection#ansible-collections-community-general-iocage-connection) – Run tasks in iocage jails * [jail](jail_connection#ansible-collections-community-general-jail-connection) – Run tasks in jails * [lxc](lxc_connection#ansible-collections-community-general-lxc-connection) – Run tasks in lxc containers via lxc python library * [lxd](lxd_connection#ansible-collections-community-general-lxd-connection) – Run tasks in lxc containers via lxc CLI * [qubes](qubes_connection#ansible-collections-community-general-qubes-connection) – Interact with an existing QubesOS AppVM * [saltstack](saltstack_connection#ansible-collections-community-general-saltstack-connection) – Allow ansible to piggyback on salt minions * [zone](zone_connection#ansible-collections-community-general-zone-connection) – Run tasks in a zone instance ### Inventory Plugins * [cobbler](cobbler_inventory#ansible-collections-community-general-cobbler-inventory) – Cobbler inventory source * [gitlab\_runners](gitlab_runners_inventory#ansible-collections-community-general-gitlab-runners-inventory) – Ansible dynamic inventory plugin for GitLab runners. * [icinga2](icinga2_inventory#ansible-collections-community-general-icinga2-inventory) – Icinga2 inventory source * [linode](linode_inventory#ansible-collections-community-general-linode-inventory) – Ansible dynamic inventory plugin for Linode. * [lxd](lxd_inventory#ansible-collections-community-general-lxd-inventory) – Returns Ansible inventory from lxd host * [nmap](nmap_inventory#ansible-collections-community-general-nmap-inventory) – Uses nmap to find hosts to target * [online](online_inventory#ansible-collections-community-general-online-inventory) – Scaleway (previously Online SAS or Online.net) inventory source * [opennebula](opennebula_inventory#ansible-collections-community-general-opennebula-inventory) – OpenNebula inventory source * [proxmox](proxmox_inventory#ansible-collections-community-general-proxmox-inventory) – Proxmox inventory source * [scaleway](scaleway_inventory#ansible-collections-community-general-scaleway-inventory) – Scaleway inventory source * [stackpath\_compute](stackpath_compute_inventory#ansible-collections-community-general-stackpath-compute-inventory) – StackPath Edge Computing inventory source * [virtualbox](virtualbox_inventory#ansible-collections-community-general-virtualbox-inventory) – virtualbox inventory source ### Lookup Plugins * [cartesian](cartesian_lookup#ansible-collections-community-general-cartesian-lookup) – returns the cartesian product of lists * [chef\_databag](chef_databag_lookup#ansible-collections-community-general-chef-databag-lookup) – fetches data from a Chef Databag * [consul\_kv](consul_kv_lookup#ansible-collections-community-general-consul-kv-lookup) – Fetch metadata from a Consul key value store. * [credstash](credstash_lookup#ansible-collections-community-general-credstash-lookup) – retrieve secrets from Credstash on AWS * [cyberarkpassword](cyberarkpassword_lookup#ansible-collections-community-general-cyberarkpassword-lookup) – get secrets from CyberArk AIM * [dependent](dependent_lookup#ansible-collections-community-general-dependent-lookup) – Composes a list with nested elements of other lists or dicts which can depend on previous loop variables * [dig](dig_lookup#ansible-collections-community-general-dig-lookup) – query DNS using the dnspython library * [dnstxt](dnstxt_lookup#ansible-collections-community-general-dnstxt-lookup) – query a domain(s)’s DNS txt fields * [dsv](dsv_lookup#ansible-collections-community-general-dsv-lookup) – Get secrets from Thycotic DevOps Secrets Vault * [etcd](etcd_lookup#ansible-collections-community-general-etcd-lookup) – get info from an etcd server * [etcd3](etcd3_lookup#ansible-collections-community-general-etcd3-lookup) – Get key values from etcd3 server * [filetree](filetree_lookup#ansible-collections-community-general-filetree-lookup) – recursively match all files in a directory tree * [flattened](flattened_lookup#ansible-collections-community-general-flattened-lookup) – return single list completely flattened * [hiera](hiera_lookup#ansible-collections-community-general-hiera-lookup) – get info from hiera data * [keyring](keyring_lookup#ansible-collections-community-general-keyring-lookup) – grab secrets from the OS keyring * [lastpass](lastpass_lookup#ansible-collections-community-general-lastpass-lookup) – fetch data from lastpass * [lmdb\_kv](lmdb_kv_lookup#ansible-collections-community-general-lmdb-kv-lookup) – fetch data from LMDB * [manifold](manifold_lookup#ansible-collections-community-general-manifold-lookup) – get credentials from Manifold.co * [nios](nios_lookup#ansible-collections-community-general-nios-lookup) – Query Infoblox NIOS objects * [nios\_next\_ip](nios_next_ip_lookup#ansible-collections-community-general-nios-next-ip-lookup) – Return the next available IP address for a network * [nios\_next\_network](nios_next_network_lookup#ansible-collections-community-general-nios-next-network-lookup) – Return the next available network range for a network-container * [onepassword](onepassword_lookup#ansible-collections-community-general-onepassword-lookup) – fetch field values from 1Password * [onepassword\_raw](onepassword_raw_lookup#ansible-collections-community-general-onepassword-raw-lookup) – fetch an entire item from 1Password * [passwordstore](passwordstore_lookup#ansible-collections-community-general-passwordstore-lookup) – manage passwords with passwordstore.org’s pass utility * [random\_pet](random_pet_lookup#ansible-collections-community-general-random-pet-lookup) – Generates random pet names * [random\_string](random_string_lookup#ansible-collections-community-general-random-string-lookup) – Generates random string * [redis](redis_lookup#ansible-collections-community-general-redis-lookup) – fetch data from Redis * [shelvefile](shelvefile_lookup#ansible-collections-community-general-shelvefile-lookup) – read keys from Python shelve file * [tss](tss_lookup#ansible-collections-community-general-tss-lookup) – Get secrets from Thycotic Secret Server ### Modules * [aerospike\_migrations](aerospike_migrations_module#ansible-collections-community-general-aerospike-migrations-module) – Check or wait for migrations between nodes * [airbrake\_deployment](airbrake_deployment_module#ansible-collections-community-general-airbrake-deployment-module) – Notify airbrake about app deployments * [aix\_devices](aix_devices_module#ansible-collections-community-general-aix-devices-module) – Manages AIX devices * [aix\_filesystem](aix_filesystem_module#ansible-collections-community-general-aix-filesystem-module) – Configure LVM and NFS file systems for AIX * [aix\_inittab](aix_inittab_module#ansible-collections-community-general-aix-inittab-module) – Manages the inittab on AIX * [aix\_lvg](aix_lvg_module#ansible-collections-community-general-aix-lvg-module) – Manage LVM volume groups on AIX * [aix\_lvol](aix_lvol_module#ansible-collections-community-general-aix-lvol-module) – Configure AIX LVM logical volumes * [ali\_instance](ali_instance_module#ansible-collections-community-general-ali-instance-module) – Create, Start, Stop, Restart or Terminate an Instance in ECS. Add or Remove Instance to/from a Security Group. * [ali\_instance\_info](ali_instance_info_module#ansible-collections-community-general-ali-instance-info-module) – Gather information on instances of Alibaba Cloud ECS. * [alternatives](alternatives_module#ansible-collections-community-general-alternatives-module) – Manages alternative programs for common commands * [ansible\_galaxy\_install](ansible_galaxy_install_module#ansible-collections-community-general-ansible-galaxy-install-module) – Install Ansible roles or collections using ansible-galaxy * [apache2\_mod\_proxy](apache2_mod_proxy_module#ansible-collections-community-general-apache2-mod-proxy-module) – Set and/or get members’ attributes of an Apache httpd 2.4 mod\_proxy balancer pool * [apache2\_module](apache2_module_module#ansible-collections-community-general-apache2-module-module) – Enables/disables a module of the Apache2 webserver. * [apk](apk_module#ansible-collections-community-general-apk-module) – Manages apk packages * [apt\_repo](apt_repo_module#ansible-collections-community-general-apt-repo-module) – Manage APT repositories via apt-repo * [apt\_rpm](apt_rpm_module#ansible-collections-community-general-apt-rpm-module) – apt\_rpm package manager * [archive](archive_module#ansible-collections-community-general-archive-module) – Creates a compressed archive of one or more files or trees * [atomic\_container](atomic_container_module#ansible-collections-community-general-atomic-container-module) – Manage the containers on the atomic host platform * [atomic\_host](atomic_host_module#ansible-collections-community-general-atomic-host-module) – Manage the atomic host platform * [atomic\_image](atomic_image_module#ansible-collections-community-general-atomic-image-module) – Manage the container images on the atomic host platform * [awall](awall_module#ansible-collections-community-general-awall-module) – Manage awall policies * [beadm](beadm_module#ansible-collections-community-general-beadm-module) – Manage ZFS boot environments on FreeBSD/Solaris/illumos systems. * [bearychat](bearychat_module#ansible-collections-community-general-bearychat-module) – Send BearyChat notifications * [bigpanda](bigpanda_module#ansible-collections-community-general-bigpanda-module) – Notify BigPanda about deployments * [bitbucket\_access\_key](bitbucket_access_key_module#ansible-collections-community-general-bitbucket-access-key-module) – Manages Bitbucket repository access keys * [bitbucket\_pipeline\_key\_pair](bitbucket_pipeline_key_pair_module#ansible-collections-community-general-bitbucket-pipeline-key-pair-module) – Manages Bitbucket pipeline SSH key pair * [bitbucket\_pipeline\_known\_host](bitbucket_pipeline_known_host_module#ansible-collections-community-general-bitbucket-pipeline-known-host-module) – Manages Bitbucket pipeline known hosts * [bitbucket\_pipeline\_variable](bitbucket_pipeline_variable_module#ansible-collections-community-general-bitbucket-pipeline-variable-module) – Manages Bitbucket pipeline variables * [bower](bower_module#ansible-collections-community-general-bower-module) – Manage bower packages with bower * [bundler](bundler_module#ansible-collections-community-general-bundler-module) – Manage Ruby Gem dependencies with Bundler * [bzr](bzr_module#ansible-collections-community-general-bzr-module) – Deploy software (or files) from bzr branches * [campfire](campfire_module#ansible-collections-community-general-campfire-module) – Send a message to Campfire * [capabilities](capabilities_module#ansible-collections-community-general-capabilities-module) – Manage Linux capabilities * [catapult](catapult_module#ansible-collections-community-general-catapult-module) – Send a sms / mms using the catapult bandwidth api * [circonus\_annotation](circonus_annotation_module#ansible-collections-community-general-circonus-annotation-module) – create an annotation in circonus * [cisco\_webex](cisco_webex_module#ansible-collections-community-general-cisco-webex-module) – Send a message to a Cisco Webex Teams Room or Individual * [clc\_aa\_policy](clc_aa_policy_module#ansible-collections-community-general-clc-aa-policy-module) – Create or Delete Anti Affinity Policies at CenturyLink Cloud. * [clc\_alert\_policy](clc_alert_policy_module#ansible-collections-community-general-clc-alert-policy-module) – Create or Delete Alert Policies at CenturyLink Cloud. * [clc\_blueprint\_package](clc_blueprint_package_module#ansible-collections-community-general-clc-blueprint-package-module) – deploys a blue print package on a set of servers in CenturyLink Cloud. * [clc\_firewall\_policy](clc_firewall_policy_module#ansible-collections-community-general-clc-firewall-policy-module) – Create/delete/update firewall policies * [clc\_group](clc_group_module#ansible-collections-community-general-clc-group-module) – Create/delete Server Groups at Centurylink Cloud * [clc\_loadbalancer](clc_loadbalancer_module#ansible-collections-community-general-clc-loadbalancer-module) – Create, Delete shared loadbalancers in CenturyLink Cloud. * [clc\_modify\_server](clc_modify_server_module#ansible-collections-community-general-clc-modify-server-module) – modify servers in CenturyLink Cloud. * [clc\_publicip](clc_publicip_module#ansible-collections-community-general-clc-publicip-module) – Add and Delete public ips on servers in CenturyLink Cloud. * [clc\_server](clc_server_module#ansible-collections-community-general-clc-server-module) – Create, Delete, Start and Stop servers in CenturyLink Cloud. * [clc\_server\_snapshot](clc_server_snapshot_module#ansible-collections-community-general-clc-server-snapshot-module) – Create, Delete and Restore server snapshots in CenturyLink Cloud. * [cloud\_init\_data\_facts](cloud_init_data_facts_module#ansible-collections-community-general-cloud-init-data-facts-module) – Retrieve facts of cloud-init. * [cloudflare\_dns](cloudflare_dns_module#ansible-collections-community-general-cloudflare-dns-module) – Manage Cloudflare DNS records * [cobbler\_sync](cobbler_sync_module#ansible-collections-community-general-cobbler-sync-module) – Sync Cobbler * [cobbler\_system](cobbler_system_module#ansible-collections-community-general-cobbler-system-module) – Manage system objects in Cobbler * [composer](composer_module#ansible-collections-community-general-composer-module) – Dependency Manager for PHP * [consul](consul_module#ansible-collections-community-general-consul-module) – Add, modify & delete services within a consul cluster. * [consul\_acl](consul_acl_module#ansible-collections-community-general-consul-acl-module) – Manipulate Consul ACL keys and rules * [consul\_kv](consul_kv_module#ansible-collections-community-general-consul-kv-module) – Manipulate entries in the key/value store of a consul cluster * [consul\_session](consul_session_module#ansible-collections-community-general-consul-session-module) – Manipulate consul sessions * [copr](copr_module#ansible-collections-community-general-copr-module) – Manage one of the Copr repositories * [cpanm](cpanm_module#ansible-collections-community-general-cpanm-module) – Manages Perl library dependencies. * [cronvar](cronvar_module#ansible-collections-community-general-cronvar-module) – Manage variables in crontabs * [crypttab](crypttab_module#ansible-collections-community-general-crypttab-module) – Encrypted Linux block devices * [datadog\_downtime](datadog_downtime_module#ansible-collections-community-general-datadog-downtime-module) – Manages Datadog downtimes * [datadog\_event](datadog_event_module#ansible-collections-community-general-datadog-event-module) – Posts events to Datadog service * [datadog\_monitor](datadog_monitor_module#ansible-collections-community-general-datadog-monitor-module) – Manages Datadog monitors * [dconf](dconf_module#ansible-collections-community-general-dconf-module) – Modify and read dconf database * [deploy\_helper](deploy_helper_module#ansible-collections-community-general-deploy-helper-module) – Manages some of the steps common in deploying projects. * [dimensiondata\_network](dimensiondata_network_module#ansible-collections-community-general-dimensiondata-network-module) – Create, update, and delete MCP 1.0 & 2.0 networks * [dimensiondata\_vlan](dimensiondata_vlan_module#ansible-collections-community-general-dimensiondata-vlan-module) – Manage a VLAN in a Cloud Control network domain. * [discord](discord_module#ansible-collections-community-general-discord-module) – Send Discord messages * [django\_manage](django_manage_module#ansible-collections-community-general-django-manage-module) – Manages a Django application. * [dnsimple](dnsimple_module#ansible-collections-community-general-dnsimple-module) – Interface with dnsimple.com (a DNS hosting service) * [dnsmadeeasy](dnsmadeeasy_module#ansible-collections-community-general-dnsmadeeasy-module) – Interface with dnsmadeeasy.com (a DNS hosting service). * [dpkg\_divert](dpkg_divert_module#ansible-collections-community-general-dpkg-divert-module) – Override a debian package’s version of a file * [easy\_install](easy_install_module#ansible-collections-community-general-easy-install-module) – Installs Python libraries * [ejabberd\_user](ejabberd_user_module#ansible-collections-community-general-ejabberd-user-module) – Manages users for ejabberd servers * [elasticsearch\_plugin](elasticsearch_plugin_module#ansible-collections-community-general-elasticsearch-plugin-module) – Manage Elasticsearch plugins * [emc\_vnx\_sg\_member](emc_vnx_sg_member_module#ansible-collections-community-general-emc-vnx-sg-member-module) – Manage storage group member on EMC VNX * [etcd3](etcd3_module#ansible-collections-community-general-etcd3-module) – Set or delete key value pairs from an etcd3 cluster * [facter](facter_module#ansible-collections-community-general-facter-module) – Runs the discovery program *facter* on the remote system * [filesize](filesize_module#ansible-collections-community-general-filesize-module) – Create a file with a given size, or resize it if it exists * [filesystem](filesystem_module#ansible-collections-community-general-filesystem-module) – Makes a filesystem * [flatpak](flatpak_module#ansible-collections-community-general-flatpak-module) – Manage flatpaks * [flatpak\_remote](flatpak_remote_module#ansible-collections-community-general-flatpak-remote-module) – Manage flatpak repository remotes * [flowdock](flowdock_module#ansible-collections-community-general-flowdock-module) – Send a message to a flowdock * [gandi\_livedns](gandi_livedns_module#ansible-collections-community-general-gandi-livedns-module) – Manage Gandi LiveDNS records * [gconftool2](gconftool2_module#ansible-collections-community-general-gconftool2-module) – Edit GNOME Configurations * [gem](gem_module#ansible-collections-community-general-gem-module) – Manage Ruby gems * [git\_config](git_config_module#ansible-collections-community-general-git-config-module) – Read and write git configuration * [github\_deploy\_key](github_deploy_key_module#ansible-collections-community-general-github-deploy-key-module) – Manages deploy keys for GitHub repositories. * [github\_issue](github_issue_module#ansible-collections-community-general-github-issue-module) – View GitHub issue. * [github\_key](github_key_module#ansible-collections-community-general-github-key-module) – Manage GitHub access keys. * [github\_release](github_release_module#ansible-collections-community-general-github-release-module) – Interact with GitHub Releases * [github\_repo](github_repo_module#ansible-collections-community-general-github-repo-module) – Manage your repositories on Github * [github\_webhook](github_webhook_module#ansible-collections-community-general-github-webhook-module) – Manage GitHub webhooks * [github\_webhook\_info](github_webhook_info_module#ansible-collections-community-general-github-webhook-info-module) – Query information about GitHub webhooks * [gitlab\_deploy\_key](gitlab_deploy_key_module#ansible-collections-community-general-gitlab-deploy-key-module) – Manages GitLab project deploy keys. * [gitlab\_group](gitlab_group_module#ansible-collections-community-general-gitlab-group-module) – Creates/updates/deletes GitLab Groups * [gitlab\_group\_members](gitlab_group_members_module#ansible-collections-community-general-gitlab-group-members-module) – Manage group members on GitLab Server * [gitlab\_group\_variable](gitlab_group_variable_module#ansible-collections-community-general-gitlab-group-variable-module) – Creates, updates, or deletes GitLab groups variables * [gitlab\_hook](gitlab_hook_module#ansible-collections-community-general-gitlab-hook-module) – Manages GitLab project hooks. * [gitlab\_project](gitlab_project_module#ansible-collections-community-general-gitlab-project-module) – Creates/updates/deletes GitLab Projects * [gitlab\_project\_members](gitlab_project_members_module#ansible-collections-community-general-gitlab-project-members-module) – Manage project members on GitLab Server * [gitlab\_project\_variable](gitlab_project_variable_module#ansible-collections-community-general-gitlab-project-variable-module) – Creates/updates/deletes GitLab Projects Variables * [gitlab\_protected\_branch](gitlab_protected_branch_module#ansible-collections-community-general-gitlab-protected-branch-module) – (un)Marking existing branches for protection * [gitlab\_runner](gitlab_runner_module#ansible-collections-community-general-gitlab-runner-module) – Create, modify and delete GitLab Runners. * [gitlab\_user](gitlab_user_module#ansible-collections-community-general-gitlab-user-module) – Creates/updates/deletes/blocks/unblocks GitLab Users * [grove](grove_module#ansible-collections-community-general-grove-module) – Sends a notification to a grove.io channel * [gunicorn](gunicorn_module#ansible-collections-community-general-gunicorn-module) – Run gunicorn with various settings. * [hana\_query](hana_query_module#ansible-collections-community-general-hana-query-module) – Execute SQL on HANA * [haproxy](haproxy_module#ansible-collections-community-general-haproxy-module) – Enable, disable, and set weights for HAProxy backend servers using socket commands * [heroku\_collaborator](heroku_collaborator_module#ansible-collections-community-general-heroku-collaborator-module) – Add or delete app collaborators on Heroku * [hg](hg_module#ansible-collections-community-general-hg-module) – Manages Mercurial (hg) repositories * [hipchat](hipchat_module#ansible-collections-community-general-hipchat-module) – Send a message to Hipchat. * [homebrew](homebrew_module#ansible-collections-community-general-homebrew-module) – Package manager for Homebrew * [homebrew\_cask](homebrew_cask_module#ansible-collections-community-general-homebrew-cask-module) – Install and uninstall homebrew casks * [homebrew\_tap](homebrew_tap_module#ansible-collections-community-general-homebrew-tap-module) – Tap a Homebrew repository. * [honeybadger\_deployment](honeybadger_deployment_module#ansible-collections-community-general-honeybadger-deployment-module) – Notify Honeybadger.io about app deployments * [hpilo\_boot](hpilo_boot_module#ansible-collections-community-general-hpilo-boot-module) – Boot system using specific media through HP iLO interface * [hpilo\_info](hpilo_info_module#ansible-collections-community-general-hpilo-info-module) – Gather information through an HP iLO interface * [hponcfg](hponcfg_module#ansible-collections-community-general-hponcfg-module) – Configure HP iLO interface using hponcfg * [htpasswd](htpasswd_module#ansible-collections-community-general-htpasswd-module) – manage user files for basic authentication * [hwc\_ecs\_instance](hwc_ecs_instance_module#ansible-collections-community-general-hwc-ecs-instance-module) – Creates a resource of Ecs/Instance in Huawei Cloud * [hwc\_evs\_disk](hwc_evs_disk_module#ansible-collections-community-general-hwc-evs-disk-module) – Creates a resource of Evs/Disk in Huawei Cloud * [hwc\_network\_vpc](hwc_network_vpc_module#ansible-collections-community-general-hwc-network-vpc-module) – Creates a Huawei Cloud VPC * [hwc\_smn\_topic](hwc_smn_topic_module#ansible-collections-community-general-hwc-smn-topic-module) – Creates a resource of SMNTopic in Huaweicloud Cloud * [hwc\_vpc\_eip](hwc_vpc_eip_module#ansible-collections-community-general-hwc-vpc-eip-module) – Creates a resource of Vpc/EIP in Huawei Cloud * [hwc\_vpc\_peering\_connect](hwc_vpc_peering_connect_module#ansible-collections-community-general-hwc-vpc-peering-connect-module) – Creates a resource of Vpc/PeeringConnect in Huawei Cloud * [hwc\_vpc\_port](hwc_vpc_port_module#ansible-collections-community-general-hwc-vpc-port-module) – Creates a resource of Vpc/Port in Huawei Cloud * [hwc\_vpc\_private\_ip](hwc_vpc_private_ip_module#ansible-collections-community-general-hwc-vpc-private-ip-module) – Creates a resource of Vpc/PrivateIP in Huawei Cloud * [hwc\_vpc\_route](hwc_vpc_route_module#ansible-collections-community-general-hwc-vpc-route-module) – Creates a resource of Vpc/Route in Huawei Cloud * [hwc\_vpc\_security\_group](hwc_vpc_security_group_module#ansible-collections-community-general-hwc-vpc-security-group-module) – Creates a resource of Vpc/SecurityGroup in Huawei Cloud * [hwc\_vpc\_security\_group\_rule](hwc_vpc_security_group_rule_module#ansible-collections-community-general-hwc-vpc-security-group-rule-module) – Creates a resource of Vpc/SecurityGroupRule in Huawei Cloud * [hwc\_vpc\_subnet](hwc_vpc_subnet_module#ansible-collections-community-general-hwc-vpc-subnet-module) – Creates a resource of Vpc/Subnet in Huawei Cloud * [ibm\_sa\_domain](ibm_sa_domain_module#ansible-collections-community-general-ibm-sa-domain-module) – Manages domains on IBM Spectrum Accelerate Family storage systems * [ibm\_sa\_host](ibm_sa_host_module#ansible-collections-community-general-ibm-sa-host-module) – Adds hosts to or removes them from IBM Spectrum Accelerate Family storage systems. * [ibm\_sa\_host\_ports](ibm_sa_host_ports_module#ansible-collections-community-general-ibm-sa-host-ports-module) – Add host ports on IBM Spectrum Accelerate Family storage systems. * [ibm\_sa\_pool](ibm_sa_pool_module#ansible-collections-community-general-ibm-sa-pool-module) – Handles pools on IBM Spectrum Accelerate Family storage systems. * [ibm\_sa\_vol](ibm_sa_vol_module#ansible-collections-community-general-ibm-sa-vol-module) – Handle volumes on IBM Spectrum Accelerate Family storage systems. * [ibm\_sa\_vol\_map](ibm_sa_vol_map_module#ansible-collections-community-general-ibm-sa-vol-map-module) – Handles volume mapping on IBM Spectrum Accelerate Family storage systems. * [icinga2\_feature](icinga2_feature_module#ansible-collections-community-general-icinga2-feature-module) – Manage Icinga2 feature * [icinga2\_host](icinga2_host_module#ansible-collections-community-general-icinga2-host-module) – Manage a host in Icinga2 * [idrac\_redfish\_command](idrac_redfish_command_module#ansible-collections-community-general-idrac-redfish-command-module) – Manages Out-Of-Band controllers using iDRAC OEM Redfish APIs * [idrac\_redfish\_config](idrac_redfish_config_module#ansible-collections-community-general-idrac-redfish-config-module) – Manages servers through iDRAC using Dell Redfish APIs * [idrac\_redfish\_info](idrac_redfish_info_module#ansible-collections-community-general-idrac-redfish-info-module) – Gather PowerEdge server information through iDRAC using Redfish APIs * [imc\_rest](imc_rest_module#ansible-collections-community-general-imc-rest-module) – Manage Cisco IMC hardware through its REST API * [imgadm](imgadm_module#ansible-collections-community-general-imgadm-module) – Manage SmartOS images * [infinity](infinity_module#ansible-collections-community-general-infinity-module) – Manage Infinity IPAM using Rest API * [influxdb\_database](influxdb_database_module#ansible-collections-community-general-influxdb-database-module) – Manage InfluxDB databases * [influxdb\_query](influxdb_query_module#ansible-collections-community-general-influxdb-query-module) – Query data points from InfluxDB * [influxdb\_retention\_policy](influxdb_retention_policy_module#ansible-collections-community-general-influxdb-retention-policy-module) – Manage InfluxDB retention policies * [influxdb\_user](influxdb_user_module#ansible-collections-community-general-influxdb-user-module) – Manage InfluxDB users * [influxdb\_write](influxdb_write_module#ansible-collections-community-general-influxdb-write-module) – Write data points into InfluxDB * [ini\_file](ini_file_module#ansible-collections-community-general-ini-file-module) – Tweak settings in INI files * [installp](installp_module#ansible-collections-community-general-installp-module) – Manage packages on AIX * [interfaces\_file](interfaces_file_module#ansible-collections-community-general-interfaces-file-module) – Tweak settings in /etc/network/interfaces files * [ip\_netns](ip_netns_module#ansible-collections-community-general-ip-netns-module) – Manage network namespaces * [ipa\_config](ipa_config_module#ansible-collections-community-general-ipa-config-module) – Manage Global FreeIPA Configuration Settings * [ipa\_dnsrecord](ipa_dnsrecord_module#ansible-collections-community-general-ipa-dnsrecord-module) – Manage FreeIPA DNS records * [ipa\_dnszone](ipa_dnszone_module#ansible-collections-community-general-ipa-dnszone-module) – Manage FreeIPA DNS Zones * [ipa\_group](ipa_group_module#ansible-collections-community-general-ipa-group-module) – Manage FreeIPA group * [ipa\_hbacrule](ipa_hbacrule_module#ansible-collections-community-general-ipa-hbacrule-module) – Manage FreeIPA HBAC rule * [ipa\_host](ipa_host_module#ansible-collections-community-general-ipa-host-module) – Manage FreeIPA host * [ipa\_hostgroup](ipa_hostgroup_module#ansible-collections-community-general-ipa-hostgroup-module) – Manage FreeIPA host-group * [ipa\_otpconfig](ipa_otpconfig_module#ansible-collections-community-general-ipa-otpconfig-module) – Manage FreeIPA OTP Configuration Settings * [ipa\_otptoken](ipa_otptoken_module#ansible-collections-community-general-ipa-otptoken-module) – Manage FreeIPA OTPs * [ipa\_pwpolicy](ipa_pwpolicy_module#ansible-collections-community-general-ipa-pwpolicy-module) – Manage FreeIPA password policies * [ipa\_role](ipa_role_module#ansible-collections-community-general-ipa-role-module) – Manage FreeIPA role * [ipa\_service](ipa_service_module#ansible-collections-community-general-ipa-service-module) – Manage FreeIPA service * [ipa\_subca](ipa_subca_module#ansible-collections-community-general-ipa-subca-module) – Manage FreeIPA Lightweight Sub Certificate Authorities. * [ipa\_sudocmd](ipa_sudocmd_module#ansible-collections-community-general-ipa-sudocmd-module) – Manage FreeIPA sudo command * [ipa\_sudocmdgroup](ipa_sudocmdgroup_module#ansible-collections-community-general-ipa-sudocmdgroup-module) – Manage FreeIPA sudo command group * [ipa\_sudorule](ipa_sudorule_module#ansible-collections-community-general-ipa-sudorule-module) – Manage FreeIPA sudo rule * [ipa\_user](ipa_user_module#ansible-collections-community-general-ipa-user-module) – Manage FreeIPA users * [ipa\_vault](ipa_vault_module#ansible-collections-community-general-ipa-vault-module) – Manage FreeIPA vaults * [ipify\_facts](ipify_facts_module#ansible-collections-community-general-ipify-facts-module) – Retrieve the public IP of your internet gateway * [ipinfoio\_facts](ipinfoio_facts_module#ansible-collections-community-general-ipinfoio-facts-module) – Retrieve IP geolocation facts of a host’s IP address * [ipmi\_boot](ipmi_boot_module#ansible-collections-community-general-ipmi-boot-module) – Management of order of boot devices * [ipmi\_power](ipmi_power_module#ansible-collections-community-general-ipmi-power-module) – Power management for machine * [iptables\_state](iptables_state_module#ansible-collections-community-general-iptables-state-module) – Save iptables state into a file or restore it from a file * [ipwcli\_dns](ipwcli_dns_module#ansible-collections-community-general-ipwcli-dns-module) – Manage DNS Records for Ericsson IPWorks via ipwcli * [irc](irc_module#ansible-collections-community-general-irc-module) – Send a message to an IRC channel or a nick * [iso\_create](iso_create_module#ansible-collections-community-general-iso-create-module) – Generate ISO file with specified files or folders * [iso\_extract](iso_extract_module#ansible-collections-community-general-iso-extract-module) – Extract files from an ISO image * [jabber](jabber_module#ansible-collections-community-general-jabber-module) – Send a message to jabber user or chat room * [java\_cert](java_cert_module#ansible-collections-community-general-java-cert-module) – Uses keytool to import/remove certificate to/from java keystore (cacerts) * [java\_keystore](java_keystore_module#ansible-collections-community-general-java-keystore-module) – Create a Java keystore in JKS format * [jboss](jboss_module#ansible-collections-community-general-jboss-module) – Deploy applications to JBoss * [jenkins\_build](jenkins_build_module#ansible-collections-community-general-jenkins-build-module) – Manage jenkins builds * [jenkins\_job](jenkins_job_module#ansible-collections-community-general-jenkins-job-module) – Manage jenkins jobs * [jenkins\_job\_info](jenkins_job_info_module#ansible-collections-community-general-jenkins-job-info-module) – Get information about Jenkins jobs * [jenkins\_plugin](jenkins_plugin_module#ansible-collections-community-general-jenkins-plugin-module) – Add or remove Jenkins plugin * [jenkins\_script](jenkins_script_module#ansible-collections-community-general-jenkins-script-module) – Executes a groovy script in the jenkins instance * [jira](jira_module#ansible-collections-community-general-jira-module) – create and modify issues in a JIRA instance * [kernel\_blacklist](kernel_blacklist_module#ansible-collections-community-general-kernel-blacklist-module) – Blacklist kernel modules * [keycloak\_authentication](keycloak_authentication_module#ansible-collections-community-general-keycloak-authentication-module) – Configure authentication in Keycloak * [keycloak\_client](keycloak_client_module#ansible-collections-community-general-keycloak-client-module) – Allows administration of Keycloak clients via Keycloak API * [keycloak\_client\_rolemapping](keycloak_client_rolemapping_module#ansible-collections-community-general-keycloak-client-rolemapping-module) – Allows administration of Keycloak client\_rolemapping with the Keycloak API * [keycloak\_clientscope](keycloak_clientscope_module#ansible-collections-community-general-keycloak-clientscope-module) – Allows administration of Keycloak client\_scopes via Keycloak API * [keycloak\_clienttemplate](keycloak_clienttemplate_module#ansible-collections-community-general-keycloak-clienttemplate-module) – Allows administration of Keycloak client templates via Keycloak API * [keycloak\_group](keycloak_group_module#ansible-collections-community-general-keycloak-group-module) – Allows administration of Keycloak groups via Keycloak API * [keycloak\_identity\_provider](keycloak_identity_provider_module#ansible-collections-community-general-keycloak-identity-provider-module) – Allows administration of Keycloak identity providers via Keycloak API * [keycloak\_realm](keycloak_realm_module#ansible-collections-community-general-keycloak-realm-module) – Allows administration of Keycloak realm via Keycloak API * [keycloak\_role](keycloak_role_module#ansible-collections-community-general-keycloak-role-module) – Allows administration of Keycloak roles via Keycloak API * [keycloak\_user\_federation](keycloak_user_federation_module#ansible-collections-community-general-keycloak-user-federation-module) – Allows administration of Keycloak user federations via Keycloak API * [kibana\_plugin](kibana_plugin_module#ansible-collections-community-general-kibana-plugin-module) – Manage Kibana plugins * [launchd](launchd_module#ansible-collections-community-general-launchd-module) – Manage macOS services * [layman](layman_module#ansible-collections-community-general-layman-module) – Manage Gentoo overlays * [lbu](lbu_module#ansible-collections-community-general-lbu-module) – Local Backup Utility for Alpine Linux * [ldap\_attrs](ldap_attrs_module#ansible-collections-community-general-ldap-attrs-module) – Add or remove multiple LDAP attribute values * [ldap\_entry](ldap_entry_module#ansible-collections-community-general-ldap-entry-module) – Add or remove LDAP entries. * [ldap\_passwd](ldap_passwd_module#ansible-collections-community-general-ldap-passwd-module) – Set passwords in LDAP. * [ldap\_search](ldap_search_module#ansible-collections-community-general-ldap-search-module) – Search for entries in a LDAP server * [librato\_annotation](librato_annotation_module#ansible-collections-community-general-librato-annotation-module) – create an annotation in librato * [linode](linode_module#ansible-collections-community-general-linode-module) – Manage instances on the Linode Public Cloud * [linode\_v4](linode_v4_module#ansible-collections-community-general-linode-v4-module) – Manage instances on the Linode cloud. * [listen\_ports\_facts](listen_ports_facts_module#ansible-collections-community-general-listen-ports-facts-module) – Gather facts on processes listening on TCP and UDP ports. * [lldp](lldp_module#ansible-collections-community-general-lldp-module) – get details reported by lldp * [locale\_gen](locale_gen_module#ansible-collections-community-general-locale-gen-module) – Creates or removes locales * [logentries](logentries_module#ansible-collections-community-general-logentries-module) – Module for tracking logs via logentries.com * [logentries\_msg](logentries_msg_module#ansible-collections-community-general-logentries-msg-module) – Send a message to logentries. * [logstash\_plugin](logstash_plugin_module#ansible-collections-community-general-logstash-plugin-module) – Manage Logstash plugins * [lvg](lvg_module#ansible-collections-community-general-lvg-module) – Configure LVM volume groups * [lvol](lvol_module#ansible-collections-community-general-lvol-module) – Configure LVM logical volumes * [lxc\_container](lxc_container_module#ansible-collections-community-general-lxc-container-module) – Manage LXC Containers * [lxca\_cmms](lxca_cmms_module#ansible-collections-community-general-lxca-cmms-module) – Custom module for lxca cmms inventory utility * [lxca\_nodes](lxca_nodes_module#ansible-collections-community-general-lxca-nodes-module) – Custom module for lxca nodes inventory utility * [lxd\_container](lxd_container_module#ansible-collections-community-general-lxd-container-module) – Manage LXD Containers * [lxd\_profile](lxd_profile_module#ansible-collections-community-general-lxd-profile-module) – Manage LXD profiles * [macports](macports_module#ansible-collections-community-general-macports-module) – Package manager for MacPorts * [mail](mail_module#ansible-collections-community-general-mail-module) – Send an email * [make](make_module#ansible-collections-community-general-make-module) – Run targets in a Makefile * [manageiq\_alert\_profiles](manageiq_alert_profiles_module#ansible-collections-community-general-manageiq-alert-profiles-module) – Configuration of alert profiles for ManageIQ * [manageiq\_alerts](manageiq_alerts_module#ansible-collections-community-general-manageiq-alerts-module) – Configuration of alerts in ManageIQ * [manageiq\_group](manageiq_group_module#ansible-collections-community-general-manageiq-group-module) – Management of groups in ManageIQ. * [manageiq\_policies](manageiq_policies_module#ansible-collections-community-general-manageiq-policies-module) – Management of resource policy\_profiles in ManageIQ. * [manageiq\_provider](manageiq_provider_module#ansible-collections-community-general-manageiq-provider-module) – Management of provider in ManageIQ. * [manageiq\_tags](manageiq_tags_module#ansible-collections-community-general-manageiq-tags-module) – Management of resource tags in ManageIQ. * [manageiq\_tenant](manageiq_tenant_module#ansible-collections-community-general-manageiq-tenant-module) – Management of tenants in ManageIQ. * [manageiq\_user](manageiq_user_module#ansible-collections-community-general-manageiq-user-module) – Management of users in ManageIQ. * [mas](mas_module#ansible-collections-community-general-mas-module) – Manage Mac App Store applications with mas-cli * [matrix](matrix_module#ansible-collections-community-general-matrix-module) – Send notifications to matrix * [mattermost](mattermost_module#ansible-collections-community-general-mattermost-module) – Send Mattermost notifications * [maven\_artifact](maven_artifact_module#ansible-collections-community-general-maven-artifact-module) – Downloads an Artifact from a Maven Repository * [memset\_dns\_reload](memset_dns_reload_module#ansible-collections-community-general-memset-dns-reload-module) – Request reload of Memset’s DNS infrastructure, * [memset\_memstore\_info](memset_memstore_info_module#ansible-collections-community-general-memset-memstore-info-module) – Retrieve Memstore product usage information. * [memset\_server\_info](memset_server_info_module#ansible-collections-community-general-memset-server-info-module) – Retrieve server information. * [memset\_zone](memset_zone_module#ansible-collections-community-general-memset-zone-module) – Creates and deletes Memset DNS zones. * [memset\_zone\_domain](memset_zone_domain_module#ansible-collections-community-general-memset-zone-domain-module) – Create and delete domains in Memset DNS zones. * [memset\_zone\_record](memset_zone_record_module#ansible-collections-community-general-memset-zone-record-module) – Create and delete records in Memset DNS zones. * [mksysb](mksysb_module#ansible-collections-community-general-mksysb-module) – Generates AIX mksysb rootvg backups. * [modprobe](modprobe_module#ansible-collections-community-general-modprobe-module) – Load or unload kernel modules * [monit](monit_module#ansible-collections-community-general-monit-module) – Manage the state of a program monitored via Monit * [mqtt](mqtt_module#ansible-collections-community-general-mqtt-module) – Publish a message on an MQTT topic for the IoT * [mssql\_db](mssql_db_module#ansible-collections-community-general-mssql-db-module) – Add or remove MSSQL databases from a remote host. * [nagios](nagios_module#ansible-collections-community-general-nagios-module) – Perform common tasks in Nagios related to downtime and notifications. * [netcup\_dns](netcup_dns_module#ansible-collections-community-general-netcup-dns-module) – manage Netcup DNS records * [newrelic\_deployment](newrelic_deployment_module#ansible-collections-community-general-newrelic-deployment-module) – Notify newrelic about app deployments * [nexmo](nexmo_module#ansible-collections-community-general-nexmo-module) – Send a SMS via nexmo * [nginx\_status\_info](nginx_status_info_module#ansible-collections-community-general-nginx-status-info-module) – Retrieve information on nginx status. * [nictagadm](nictagadm_module#ansible-collections-community-general-nictagadm-module) – Manage nic tags on SmartOS systems * [nios\_a\_record](nios_a_record_module#ansible-collections-community-general-nios-a-record-module) – Configure Infoblox NIOS A records * [nios\_aaaa\_record](nios_aaaa_record_module#ansible-collections-community-general-nios-aaaa-record-module) – Configure Infoblox NIOS AAAA records * [nios\_cname\_record](nios_cname_record_module#ansible-collections-community-general-nios-cname-record-module) – Configure Infoblox NIOS CNAME records * [nios\_dns\_view](nios_dns_view_module#ansible-collections-community-general-nios-dns-view-module) – Configure Infoblox NIOS DNS views * [nios\_fixed\_address](nios_fixed_address_module#ansible-collections-community-general-nios-fixed-address-module) – Configure Infoblox NIOS DHCP Fixed Address * [nios\_host\_record](nios_host_record_module#ansible-collections-community-general-nios-host-record-module) – Configure Infoblox NIOS host records * [nios\_member](nios_member_module#ansible-collections-community-general-nios-member-module) – Configure Infoblox NIOS members * [nios\_mx\_record](nios_mx_record_module#ansible-collections-community-general-nios-mx-record-module) – Configure Infoblox NIOS MX records * [nios\_naptr\_record](nios_naptr_record_module#ansible-collections-community-general-nios-naptr-record-module) – Configure Infoblox NIOS NAPTR records * [nios\_network](nios_network_module#ansible-collections-community-general-nios-network-module) – Configure Infoblox NIOS network object * [nios\_network\_view](nios_network_view_module#ansible-collections-community-general-nios-network-view-module) – Configure Infoblox NIOS network views * [nios\_nsgroup](nios_nsgroup_module#ansible-collections-community-general-nios-nsgroup-module) – Configure InfoBlox DNS Nameserver Groups * [nios\_ptr\_record](nios_ptr_record_module#ansible-collections-community-general-nios-ptr-record-module) – Configure Infoblox NIOS PTR records * [nios\_srv\_record](nios_srv_record_module#ansible-collections-community-general-nios-srv-record-module) – Configure Infoblox NIOS SRV records * [nios\_txt\_record](nios_txt_record_module#ansible-collections-community-general-nios-txt-record-module) – Configure Infoblox NIOS txt records * [nios\_zone](nios_zone_module#ansible-collections-community-general-nios-zone-module) – Configure Infoblox NIOS DNS zones * [nmcli](nmcli_module#ansible-collections-community-general-nmcli-module) – Manage Networking * [nomad\_job](nomad_job_module#ansible-collections-community-general-nomad-job-module) – Launch a Nomad Job * [nomad\_job\_info](nomad_job_info_module#ansible-collections-community-general-nomad-job-info-module) – Get Nomad Jobs info * [nosh](nosh_module#ansible-collections-community-general-nosh-module) – Manage services with nosh * [npm](npm_module#ansible-collections-community-general-npm-module) – Manage node.js packages with npm * [nsupdate](nsupdate_module#ansible-collections-community-general-nsupdate-module) – Manage DNS records. * [oci\_vcn](oci_vcn_module#ansible-collections-community-general-oci-vcn-module) – Manage Virtual Cloud Networks(VCN) in OCI * [odbc](odbc_module#ansible-collections-community-general-odbc-module) – Execute SQL via ODBC * [office\_365\_connector\_card](office_365_connector_card_module#ansible-collections-community-general-office-365-connector-card-module) – Use webhooks to create Connector Card messages within an Office 365 group * [ohai](ohai_module#ansible-collections-community-general-ohai-module) – Returns inventory data from *Ohai* * [omapi\_host](omapi_host_module#ansible-collections-community-general-omapi-host-module) – Setup OMAPI hosts. * [one\_host](one_host_module#ansible-collections-community-general-one-host-module) – Manages OpenNebula Hosts * [one\_image](one_image_module#ansible-collections-community-general-one-image-module) – Manages OpenNebula images * [one\_image\_info](one_image_info_module#ansible-collections-community-general-one-image-info-module) – Gather information on OpenNebula images * [one\_service](one_service_module#ansible-collections-community-general-one-service-module) – Deploy and manage OpenNebula services * [one\_template](one_template_module#ansible-collections-community-general-one-template-module) – Manages OpenNebula templates * [one\_vm](one_vm_module#ansible-collections-community-general-one-vm-module) – Creates or terminates OpenNebula instances * [oneandone\_firewall\_policy](oneandone_firewall_policy_module#ansible-collections-community-general-oneandone-firewall-policy-module) – Configure 1&1 firewall policy. * [oneandone\_load\_balancer](oneandone_load_balancer_module#ansible-collections-community-general-oneandone-load-balancer-module) – Configure 1&1 load balancer. * [oneandone\_monitoring\_policy](oneandone_monitoring_policy_module#ansible-collections-community-general-oneandone-monitoring-policy-module) – Configure 1&1 monitoring policy. * [oneandone\_private\_network](oneandone_private_network_module#ansible-collections-community-general-oneandone-private-network-module) – Configure 1&1 private networking. * [oneandone\_public\_ip](oneandone_public_ip_module#ansible-collections-community-general-oneandone-public-ip-module) – Configure 1&1 public IPs. * [oneandone\_server](oneandone_server_module#ansible-collections-community-general-oneandone-server-module) – Create, destroy, start, stop, and reboot a 1&1 Host server. * [onepassword\_info](onepassword_info_module#ansible-collections-community-general-onepassword-info-module) – Gather items from 1Password * [oneview\_datacenter\_info](oneview_datacenter_info_module#ansible-collections-community-general-oneview-datacenter-info-module) – Retrieve information about the OneView Data Centers * [oneview\_enclosure\_info](oneview_enclosure_info_module#ansible-collections-community-general-oneview-enclosure-info-module) – Retrieve information about one or more Enclosures * [oneview\_ethernet\_network](oneview_ethernet_network_module#ansible-collections-community-general-oneview-ethernet-network-module) – Manage OneView Ethernet Network resources * [oneview\_ethernet\_network\_info](oneview_ethernet_network_info_module#ansible-collections-community-general-oneview-ethernet-network-info-module) – Retrieve the information about one or more of the OneView Ethernet Networks * [oneview\_fc\_network](oneview_fc_network_module#ansible-collections-community-general-oneview-fc-network-module) – Manage OneView Fibre Channel Network resources. * [oneview\_fc\_network\_info](oneview_fc_network_info_module#ansible-collections-community-general-oneview-fc-network-info-module) – Retrieve the information about one or more of the OneView Fibre Channel Networks * [oneview\_fcoe\_network](oneview_fcoe_network_module#ansible-collections-community-general-oneview-fcoe-network-module) – Manage OneView FCoE Network resources * [oneview\_fcoe\_network\_info](oneview_fcoe_network_info_module#ansible-collections-community-general-oneview-fcoe-network-info-module) – Retrieve the information about one or more of the OneView FCoE Networks * [oneview\_logical\_interconnect\_group](oneview_logical_interconnect_group_module#ansible-collections-community-general-oneview-logical-interconnect-group-module) – Manage OneView Logical Interconnect Group resources * [oneview\_logical\_interconnect\_group\_info](oneview_logical_interconnect_group_info_module#ansible-collections-community-general-oneview-logical-interconnect-group-info-module) – Retrieve information about one or more of the OneView Logical Interconnect Groups * [oneview\_network\_set](oneview_network_set_module#ansible-collections-community-general-oneview-network-set-module) – Manage HPE OneView Network Set resources * [oneview\_network\_set\_info](oneview_network_set_info_module#ansible-collections-community-general-oneview-network-set-info-module) – Retrieve information about the OneView Network Sets * [oneview\_san\_manager](oneview_san_manager_module#ansible-collections-community-general-oneview-san-manager-module) – Manage OneView SAN Manager resources * [oneview\_san\_manager\_info](oneview_san_manager_info_module#ansible-collections-community-general-oneview-san-manager-info-module) – Retrieve information about one or more of the OneView SAN Managers * [online\_server\_info](online_server_info_module#ansible-collections-community-general-online-server-info-module) – Gather information about Online servers. * [online\_user\_info](online_user_info_module#ansible-collections-community-general-online-user-info-module) – Gather information about Online user. * [open\_iscsi](open_iscsi_module#ansible-collections-community-general-open-iscsi-module) – Manage iSCSI targets with Open-iSCSI * [openbsd\_pkg](openbsd_pkg_module#ansible-collections-community-general-openbsd-pkg-module) – Manage packages on OpenBSD * [opendj\_backendprop](opendj_backendprop_module#ansible-collections-community-general-opendj-backendprop-module) – Will update the backend configuration of OpenDJ via the dsconfig set-backend-prop command. * [openwrt\_init](openwrt_init_module#ansible-collections-community-general-openwrt-init-module) – Manage services on OpenWrt. * [opkg](opkg_module#ansible-collections-community-general-opkg-module) – Package manager for OpenWrt * [osx\_defaults](osx_defaults_module#ansible-collections-community-general-osx-defaults-module) – Manage macOS user defaults * [ovh\_ip\_failover](ovh_ip_failover_module#ansible-collections-community-general-ovh-ip-failover-module) – Manage OVH IP failover address * [ovh\_ip\_loadbalancing\_backend](ovh_ip_loadbalancing_backend_module#ansible-collections-community-general-ovh-ip-loadbalancing-backend-module) – Manage OVH IP LoadBalancing backends * [ovh\_monthly\_billing](ovh_monthly_billing_module#ansible-collections-community-general-ovh-monthly-billing-module) – Manage OVH monthly billing * [pacemaker\_cluster](pacemaker_cluster_module#ansible-collections-community-general-pacemaker-cluster-module) – Manage pacemaker clusters * [packet\_device](packet_device_module#ansible-collections-community-general-packet-device-module) – Manage a bare metal server in the Packet Host. * [packet\_ip\_subnet](packet_ip_subnet_module#ansible-collections-community-general-packet-ip-subnet-module) – Assign IP subnet to a bare metal server. * [packet\_project](packet_project_module#ansible-collections-community-general-packet-project-module) – Create/delete a project in Packet host. * [packet\_sshkey](packet_sshkey_module#ansible-collections-community-general-packet-sshkey-module) – Create/delete an SSH key in Packet host. * [packet\_volume](packet_volume_module#ansible-collections-community-general-packet-volume-module) – Create/delete a volume in Packet host. * [packet\_volume\_attachment](packet_volume_attachment_module#ansible-collections-community-general-packet-volume-attachment-module) – Attach/detach a volume to a device in the Packet host. * [pacman](pacman_module#ansible-collections-community-general-pacman-module) – Manage packages with *pacman* * [pacman\_key](pacman_key_module#ansible-collections-community-general-pacman-key-module) – Manage pacman’s list of trusted keys * [pagerduty](pagerduty_module#ansible-collections-community-general-pagerduty-module) – Create PagerDuty maintenance windows * [pagerduty\_alert](pagerduty_alert_module#ansible-collections-community-general-pagerduty-alert-module) – Trigger, acknowledge or resolve PagerDuty incidents * [pagerduty\_change](pagerduty_change_module#ansible-collections-community-general-pagerduty-change-module) – Track a code or infrastructure change as a PagerDuty change event * [pagerduty\_user](pagerduty_user_module#ansible-collections-community-general-pagerduty-user-module) – Manage a user account on PagerDuty * [pam\_limits](pam_limits_module#ansible-collections-community-general-pam-limits-module) – Modify Linux PAM limits * [pamd](pamd_module#ansible-collections-community-general-pamd-module) – Manage PAM Modules * [parted](parted_module#ansible-collections-community-general-parted-module) – Configure block device partitions * [pear](pear_module#ansible-collections-community-general-pear-module) – Manage pear/pecl packages * [pids](pids_module#ansible-collections-community-general-pids-module) – Retrieves process IDs list if the process is running otherwise return empty list * [pingdom](pingdom_module#ansible-collections-community-general-pingdom-module) – Pause/unpause Pingdom alerts * [pip\_package\_info](pip_package_info_module#ansible-collections-community-general-pip-package-info-module) – pip package information * [pipx](pipx_module#ansible-collections-community-general-pipx-module) – Manages applications installed with pipx * [pkg5](pkg5_module#ansible-collections-community-general-pkg5-module) – Manages packages with the Solaris 11 Image Packaging System * [pkg5\_publisher](pkg5_publisher_module#ansible-collections-community-general-pkg5-publisher-module) – Manages Solaris 11 Image Packaging System publishers * [pkgin](pkgin_module#ansible-collections-community-general-pkgin-module) – Package manager for SmartOS, NetBSD, et al. * [pkgng](pkgng_module#ansible-collections-community-general-pkgng-module) – Package manager for FreeBSD >= 9.0 * [pkgutil](pkgutil_module#ansible-collections-community-general-pkgutil-module) – OpenCSW package management on Solaris * [portage](portage_module#ansible-collections-community-general-portage-module) – Package manager for Gentoo * [portinstall](portinstall_module#ansible-collections-community-general-portinstall-module) – Installing packages from FreeBSD’s ports system * [pritunl\_org](pritunl_org_module#ansible-collections-community-general-pritunl-org-module) – Manages Pritunl Organizations using the Pritunl API * [pritunl\_org\_info](pritunl_org_info_module#ansible-collections-community-general-pritunl-org-info-module) – List Pritunl Organizations using the Pritunl API * [pritunl\_user](pritunl_user_module#ansible-collections-community-general-pritunl-user-module) – Manage Pritunl Users using the Pritunl API * [pritunl\_user\_info](pritunl_user_info_module#ansible-collections-community-general-pritunl-user-info-module) – List Pritunl Users using the Pritunl API * [profitbricks](profitbricks_module#ansible-collections-community-general-profitbricks-module) – Create, destroy, start, stop, and reboot a ProfitBricks virtual machine. * [profitbricks\_datacenter](profitbricks_datacenter_module#ansible-collections-community-general-profitbricks-datacenter-module) – Create or destroy a ProfitBricks Virtual Datacenter. * [profitbricks\_nic](profitbricks_nic_module#ansible-collections-community-general-profitbricks-nic-module) – Create or Remove a NIC. * [profitbricks\_volume](profitbricks_volume_module#ansible-collections-community-general-profitbricks-volume-module) – Create or destroy a volume. * [profitbricks\_volume\_attachments](profitbricks_volume_attachments_module#ansible-collections-community-general-profitbricks-volume-attachments-module) – Attach or detach a volume. * [proxmox](proxmox_module#ansible-collections-community-general-proxmox-module) – management of instances in Proxmox VE cluster * [proxmox\_domain\_info](proxmox_domain_info_module#ansible-collections-community-general-proxmox-domain-info-module) – Retrieve information about one or more Proxmox VE domains * [proxmox\_group\_info](proxmox_group_info_module#ansible-collections-community-general-proxmox-group-info-module) – Retrieve information about one or more Proxmox VE groups * [proxmox\_kvm](proxmox_kvm_module#ansible-collections-community-general-proxmox-kvm-module) – Management of Qemu(KVM) Virtual Machines in Proxmox VE cluster. * [proxmox\_nic](proxmox_nic_module#ansible-collections-community-general-proxmox-nic-module) – Management of a NIC of a Qemu(KVM) VM in a Proxmox VE cluster. * [proxmox\_snap](proxmox_snap_module#ansible-collections-community-general-proxmox-snap-module) – Snapshot management of instances in Proxmox VE cluster * [proxmox\_storage\_info](proxmox_storage_info_module#ansible-collections-community-general-proxmox-storage-info-module) – Retrieve information about one or more Proxmox VE storages * [proxmox\_tasks\_info](proxmox_tasks_info_module#ansible-collections-community-general-proxmox-tasks-info-module) – Retrieve information about one or more Proxmox VE tasks * [proxmox\_template](proxmox_template_module#ansible-collections-community-general-proxmox-template-module) – management of OS templates in Proxmox VE cluster * [proxmox\_user\_info](proxmox_user_info_module#ansible-collections-community-general-proxmox-user-info-module) – Retrieve information about one or more Proxmox VE users * [pubnub\_blocks](pubnub_blocks_module#ansible-collections-community-general-pubnub-blocks-module) – PubNub blocks management module. * [pulp\_repo](pulp_repo_module#ansible-collections-community-general-pulp-repo-module) – Add or remove Pulp repos from a remote host. * [puppet](puppet_module#ansible-collections-community-general-puppet-module) – Runs puppet * [pushbullet](pushbullet_module#ansible-collections-community-general-pushbullet-module) – Sends notifications to Pushbullet * [pushover](pushover_module#ansible-collections-community-general-pushover-module) – Send notifications via <https://pushover.net> * [python\_requirements\_info](python_requirements_info_module#ansible-collections-community-general-python-requirements-info-module) – Show python path and assert dependency versions * [rax](rax_module#ansible-collections-community-general-rax-module) – create / delete an instance in Rackspace Public Cloud * [rax\_cbs](rax_cbs_module#ansible-collections-community-general-rax-cbs-module) – Manipulate Rackspace Cloud Block Storage Volumes * [rax\_cbs\_attachments](rax_cbs_attachments_module#ansible-collections-community-general-rax-cbs-attachments-module) – Manipulate Rackspace Cloud Block Storage Volume Attachments * [rax\_cdb](rax_cdb_module#ansible-collections-community-general-rax-cdb-module) – create/delete or resize a Rackspace Cloud Databases instance * [rax\_cdb\_database](rax_cdb_database_module#ansible-collections-community-general-rax-cdb-database-module) – create / delete a database in the Cloud Databases * [rax\_cdb\_user](rax_cdb_user_module#ansible-collections-community-general-rax-cdb-user-module) – create / delete a Rackspace Cloud Database * [rax\_clb](rax_clb_module#ansible-collections-community-general-rax-clb-module) – create / delete a load balancer in Rackspace Public Cloud * [rax\_clb\_nodes](rax_clb_nodes_module#ansible-collections-community-general-rax-clb-nodes-module) – add, modify and remove nodes from a Rackspace Cloud Load Balancer * [rax\_clb\_ssl](rax_clb_ssl_module#ansible-collections-community-general-rax-clb-ssl-module) – Manage SSL termination for a Rackspace Cloud Load Balancer. * [rax\_dns](rax_dns_module#ansible-collections-community-general-rax-dns-module) – Manage domains on Rackspace Cloud DNS * [rax\_dns\_record](rax_dns_record_module#ansible-collections-community-general-rax-dns-record-module) – Manage DNS records on Rackspace Cloud DNS * [rax\_facts](rax_facts_module#ansible-collections-community-general-rax-facts-module) – Gather facts for Rackspace Cloud Servers * [rax\_files](rax_files_module#ansible-collections-community-general-rax-files-module) – Manipulate Rackspace Cloud Files Containers * [rax\_files\_objects](rax_files_objects_module#ansible-collections-community-general-rax-files-objects-module) – Upload, download, and delete objects in Rackspace Cloud Files * [rax\_identity](rax_identity_module#ansible-collections-community-general-rax-identity-module) – Load Rackspace Cloud Identity * [rax\_keypair](rax_keypair_module#ansible-collections-community-general-rax-keypair-module) – Create a keypair for use with Rackspace Cloud Servers * [rax\_meta](rax_meta_module#ansible-collections-community-general-rax-meta-module) – Manipulate metadata for Rackspace Cloud Servers * [rax\_mon\_alarm](rax_mon_alarm_module#ansible-collections-community-general-rax-mon-alarm-module) – Create or delete a Rackspace Cloud Monitoring alarm. * [rax\_mon\_check](rax_mon_check_module#ansible-collections-community-general-rax-mon-check-module) – Create or delete a Rackspace Cloud Monitoring check for an existing entity. * [rax\_mon\_entity](rax_mon_entity_module#ansible-collections-community-general-rax-mon-entity-module) – Create or delete a Rackspace Cloud Monitoring entity * [rax\_mon\_notification](rax_mon_notification_module#ansible-collections-community-general-rax-mon-notification-module) – Create or delete a Rackspace Cloud Monitoring notification. * [rax\_mon\_notification\_plan](rax_mon_notification_plan_module#ansible-collections-community-general-rax-mon-notification-plan-module) – Create or delete a Rackspace Cloud Monitoring notification plan. * [rax\_network](rax_network_module#ansible-collections-community-general-rax-network-module) – create / delete an isolated network in Rackspace Public Cloud * [rax\_queue](rax_queue_module#ansible-collections-community-general-rax-queue-module) – create / delete a queue in Rackspace Public Cloud * [rax\_scaling\_group](rax_scaling_group_module#ansible-collections-community-general-rax-scaling-group-module) – Manipulate Rackspace Cloud Autoscale Groups * [rax\_scaling\_policy](rax_scaling_policy_module#ansible-collections-community-general-rax-scaling-policy-module) – Manipulate Rackspace Cloud Autoscale Scaling Policy * [read\_csv](read_csv_module#ansible-collections-community-general-read-csv-module) – Read a CSV file * [redfish\_command](redfish_command_module#ansible-collections-community-general-redfish-command-module) – Manages Out-Of-Band controllers using Redfish APIs * [redfish\_config](redfish_config_module#ansible-collections-community-general-redfish-config-module) – Manages Out-Of-Band controllers using Redfish APIs * [redfish\_info](redfish_info_module#ansible-collections-community-general-redfish-info-module) – Manages Out-Of-Band controllers using Redfish APIs * [redhat\_subscription](redhat_subscription_module#ansible-collections-community-general-redhat-subscription-module) – Manage registration and subscriptions to RHSM using the `subscription-manager` command * [redis](redis_module#ansible-collections-community-general-redis-module) – Various redis commands, replica and flush * [redis\_data](redis_data_module#ansible-collections-community-general-redis-data-module) – Set key value pairs in Redis * [redis\_data\_info](redis_data_info_module#ansible-collections-community-general-redis-data-info-module) – Get value of key in Redis database * [redis\_info](redis_info_module#ansible-collections-community-general-redis-info-module) – Gather information about Redis servers * [rhevm](rhevm_module#ansible-collections-community-general-rhevm-module) – RHEV/oVirt automation * [rhn\_channel](rhn_channel_module#ansible-collections-community-general-rhn-channel-module) – Adds or removes Red Hat software channels * [rhn\_register](rhn_register_module#ansible-collections-community-general-rhn-register-module) – Manage Red Hat Network registration using the `rhnreg_ks` command * [rhsm\_release](rhsm_release_module#ansible-collections-community-general-rhsm-release-module) – Set or Unset RHSM Release version * [rhsm\_repository](rhsm_repository_module#ansible-collections-community-general-rhsm-repository-module) – Manage RHSM repositories using the subscription-manager command * [riak](riak_module#ansible-collections-community-general-riak-module) – This module handles some common Riak operations * [rocketchat](rocketchat_module#ansible-collections-community-general-rocketchat-module) – Send notifications to Rocket Chat * [rollbar\_deployment](rollbar_deployment_module#ansible-collections-community-general-rollbar-deployment-module) – Notify Rollbar about app deployments * [rpm\_ostree\_pkg](rpm_ostree_pkg_module#ansible-collections-community-general-rpm-ostree-pkg-module) – Install or uninstall overlay additional packages * [rundeck\_acl\_policy](rundeck_acl_policy_module#ansible-collections-community-general-rundeck-acl-policy-module) – Manage Rundeck ACL policies. * [rundeck\_job\_executions\_info](rundeck_job_executions_info_module#ansible-collections-community-general-rundeck-job-executions-info-module) – Query executions for a Rundeck job * [rundeck\_job\_run](rundeck_job_run_module#ansible-collections-community-general-rundeck-job-run-module) – Run a Rundeck job * [rundeck\_project](rundeck_project_module#ansible-collections-community-general-rundeck-project-module) – Manage Rundeck projects. * [runit](runit_module#ansible-collections-community-general-runit-module) – Manage runit services * [sap\_task\_list\_execute](sap_task_list_execute_module#ansible-collections-community-general-sap-task-list-execute-module) – Perform SAP Task list execution * [sapcar\_extract](sapcar_extract_module#ansible-collections-community-general-sapcar-extract-module) – Manages SAP SAPCAR archives * [say](say_module#ansible-collections-community-general-say-module) – Makes a computer to speak. * [scaleway\_compute](scaleway_compute_module#ansible-collections-community-general-scaleway-compute-module) – Scaleway compute management module * [scaleway\_database\_backup](scaleway_database_backup_module#ansible-collections-community-general-scaleway-database-backup-module) – Scaleway database backups management module * [scaleway\_image\_info](scaleway_image_info_module#ansible-collections-community-general-scaleway-image-info-module) – Gather information about the Scaleway images available. * [scaleway\_ip](scaleway_ip_module#ansible-collections-community-general-scaleway-ip-module) – Scaleway IP management module * [scaleway\_ip\_info](scaleway_ip_info_module#ansible-collections-community-general-scaleway-ip-info-module) – Gather information about the Scaleway ips available. * [scaleway\_lb](scaleway_lb_module#ansible-collections-community-general-scaleway-lb-module) – Scaleway load-balancer management module * [scaleway\_organization\_info](scaleway_organization_info_module#ansible-collections-community-general-scaleway-organization-info-module) – Gather information about the Scaleway organizations available. * [scaleway\_security\_group](scaleway_security_group_module#ansible-collections-community-general-scaleway-security-group-module) – Scaleway Security Group management module * [scaleway\_security\_group\_info](scaleway_security_group_info_module#ansible-collections-community-general-scaleway-security-group-info-module) – Gather information about the Scaleway security groups available. * [scaleway\_security\_group\_rule](scaleway_security_group_rule_module#ansible-collections-community-general-scaleway-security-group-rule-module) – Scaleway Security Group Rule management module * [scaleway\_server\_info](scaleway_server_info_module#ansible-collections-community-general-scaleway-server-info-module) – Gather information about the Scaleway servers available. * [scaleway\_snapshot\_info](scaleway_snapshot_info_module#ansible-collections-community-general-scaleway-snapshot-info-module) – Gather information about the Scaleway snapshots available. * [scaleway\_sshkey](scaleway_sshkey_module#ansible-collections-community-general-scaleway-sshkey-module) – Scaleway SSH keys management module * [scaleway\_user\_data](scaleway_user_data_module#ansible-collections-community-general-scaleway-user-data-module) – Scaleway user\_data management module * [scaleway\_volume](scaleway_volume_module#ansible-collections-community-general-scaleway-volume-module) – Scaleway volumes management module * [scaleway\_volume\_info](scaleway_volume_info_module#ansible-collections-community-general-scaleway-volume-info-module) – Gather information about the Scaleway volumes available. * [sefcontext](sefcontext_module#ansible-collections-community-general-sefcontext-module) – Manages SELinux file context mapping definitions * [selinux\_permissive](selinux_permissive_module#ansible-collections-community-general-selinux-permissive-module) – Change permissive domain in SELinux policy * [selogin](selogin_module#ansible-collections-community-general-selogin-module) – Manages linux user to SELinux user mapping * [sendgrid](sendgrid_module#ansible-collections-community-general-sendgrid-module) – Sends an email with the SendGrid API * [sensu\_check](sensu_check_module#ansible-collections-community-general-sensu-check-module) – Manage Sensu checks * [sensu\_client](sensu_client_module#ansible-collections-community-general-sensu-client-module) – Manages Sensu client configuration * [sensu\_handler](sensu_handler_module#ansible-collections-community-general-sensu-handler-module) – Manages Sensu handler configuration * [sensu\_silence](sensu_silence_module#ansible-collections-community-general-sensu-silence-module) – Manage Sensu silence entries * [sensu\_subscription](sensu_subscription_module#ansible-collections-community-general-sensu-subscription-module) – Manage Sensu subscriptions * [seport](seport_module#ansible-collections-community-general-seport-module) – Manages SELinux network port type definitions * [serverless](serverless_module#ansible-collections-community-general-serverless-module) – Manages a Serverless Framework project * [shutdown](shutdown_module#ansible-collections-community-general-shutdown-module) – Shut down a machine * [sl\_vm](sl_vm_module#ansible-collections-community-general-sl-vm-module) – create or cancel a virtual instance in SoftLayer * [slack](slack_module#ansible-collections-community-general-slack-module) – Send Slack notifications * [slackpkg](slackpkg_module#ansible-collections-community-general-slackpkg-module) – Package manager for Slackware >= 12.2 * [smartos\_image\_info](smartos_image_info_module#ansible-collections-community-general-smartos-image-info-module) – Get SmartOS image details. * [snap](snap_module#ansible-collections-community-general-snap-module) – Manages snaps * [snmp\_facts](snmp_facts_module#ansible-collections-community-general-snmp-facts-module) – Retrieve facts for a device using SNMP * [solaris\_zone](solaris_zone_module#ansible-collections-community-general-solaris-zone-module) – Manage Solaris zones * [sorcery](sorcery_module#ansible-collections-community-general-sorcery-module) – Package manager for Source Mage GNU/Linux * [spectrum\_device](spectrum_device_module#ansible-collections-community-general-spectrum-device-module) – Creates/deletes devices in CA Spectrum. * [spectrum\_model\_attrs](spectrum_model_attrs_module#ansible-collections-community-general-spectrum-model-attrs-module) – Enforce a model’s attributes in CA Spectrum. * [spotinst\_aws\_elastigroup](spotinst_aws_elastigroup_module#ansible-collections-community-general-spotinst-aws-elastigroup-module) – Create, update or delete Spotinst AWS Elastigroups * [ss\_3par\_cpg](ss_3par_cpg_module#ansible-collections-community-general-ss-3par-cpg-module) – Manage HPE StoreServ 3PAR CPG * [ssh\_config](ssh_config_module#ansible-collections-community-general-ssh-config-module) – Manage SSH config for user * [stackdriver](stackdriver_module#ansible-collections-community-general-stackdriver-module) – Send code deploy and annotation events to stackdriver * [stacki\_host](stacki_host_module#ansible-collections-community-general-stacki-host-module) – Add or remove host to stacki front-end * [statsd](statsd_module#ansible-collections-community-general-statsd-module) – Send metrics to StatsD * [statusio\_maintenance](statusio_maintenance_module#ansible-collections-community-general-statusio-maintenance-module) – Create maintenance windows for your status.io dashboard * [supervisorctl](supervisorctl_module#ansible-collections-community-general-supervisorctl-module) – Manage the state of a program or group of programs running via supervisord * [svc](svc_module#ansible-collections-community-general-svc-module) – Manage daemontools services * [svr4pkg](svr4pkg_module#ansible-collections-community-general-svr4pkg-module) – Manage Solaris SVR4 packages * [swdepot](swdepot_module#ansible-collections-community-general-swdepot-module) – Manage packages with swdepot package manager (HP-UX) * [swupd](swupd_module#ansible-collections-community-general-swupd-module) – Manages updates and bundles in ClearLinux systems. * [syslogger](syslogger_module#ansible-collections-community-general-syslogger-module) – Log messages in the syslog * [syspatch](syspatch_module#ansible-collections-community-general-syspatch-module) – Manage OpenBSD system patches * [sysrc](sysrc_module#ansible-collections-community-general-sysrc-module) – Manage FreeBSD using sysrc * [sysupgrade](sysupgrade_module#ansible-collections-community-general-sysupgrade-module) – Manage OpenBSD system upgrades * [taiga\_issue](taiga_issue_module#ansible-collections-community-general-taiga-issue-module) – Creates/deletes an issue in a Taiga Project Management Platform * [telegram](telegram_module#ansible-collections-community-general-telegram-module) – module for sending notifications via telegram * [terraform](terraform_module#ansible-collections-community-general-terraform-module) – Manages a Terraform deployment (and plans) * [timezone](timezone_module#ansible-collections-community-general-timezone-module) – Configure timezone setting * [twilio](twilio_module#ansible-collections-community-general-twilio-module) – Sends a text message to a mobile phone through Twilio. * [typetalk](typetalk_module#ansible-collections-community-general-typetalk-module) – Send a message to typetalk * [udm\_dns\_record](udm_dns_record_module#ansible-collections-community-general-udm-dns-record-module) – Manage dns entries on a univention corporate server * [udm\_dns\_zone](udm_dns_zone_module#ansible-collections-community-general-udm-dns-zone-module) – Manage dns zones on a univention corporate server * [udm\_group](udm_group_module#ansible-collections-community-general-udm-group-module) – Manage of the posix group * [udm\_share](udm_share_module#ansible-collections-community-general-udm-share-module) – Manage samba shares on a univention corporate server * [udm\_user](udm_user_module#ansible-collections-community-general-udm-user-module) – Manage posix users on a univention corporate server * [ufw](ufw_module#ansible-collections-community-general-ufw-module) – Manage firewall with UFW * [uptimerobot](uptimerobot_module#ansible-collections-community-general-uptimerobot-module) – Pause and start Uptime Robot monitoring * [urpmi](urpmi_module#ansible-collections-community-general-urpmi-module) – Urpmi manager * [utm\_aaa\_group](utm_aaa_group_module#ansible-collections-community-general-utm-aaa-group-module) – Create, update or destroy an aaa group object in Sophos UTM. * [utm\_aaa\_group\_info](utm_aaa_group_info_module#ansible-collections-community-general-utm-aaa-group-info-module) – get info for reverse\_proxy frontend entry in Sophos UTM * [utm\_ca\_host\_key\_cert](utm_ca_host_key_cert_module#ansible-collections-community-general-utm-ca-host-key-cert-module) – create, update or destroy ca host\_key\_cert entry in Sophos UTM * [utm\_ca\_host\_key\_cert\_info](utm_ca_host_key_cert_info_module#ansible-collections-community-general-utm-ca-host-key-cert-info-module) – Get info for a ca host\_key\_cert entry in Sophos UTM * [utm\_dns\_host](utm_dns_host_module#ansible-collections-community-general-utm-dns-host-module) – create, update or destroy dns entry in Sophos UTM * [utm\_network\_interface\_address](utm_network_interface_address_module#ansible-collections-community-general-utm-network-interface-address-module) – Create, update or destroy network/interface\_address object * [utm\_network\_interface\_address\_info](utm_network_interface_address_info_module#ansible-collections-community-general-utm-network-interface-address-info-module) – Get info for a network/interface\_address object * [utm\_proxy\_auth\_profile](utm_proxy_auth_profile_module#ansible-collections-community-general-utm-proxy-auth-profile-module) – create, update or destroy reverse\_proxy auth\_profile entry in Sophos UTM * [utm\_proxy\_exception](utm_proxy_exception_module#ansible-collections-community-general-utm-proxy-exception-module) – Create, update or destroy reverse\_proxy exception entry in Sophos UTM * [utm\_proxy\_frontend](utm_proxy_frontend_module#ansible-collections-community-general-utm-proxy-frontend-module) – create, update or destroy reverse\_proxy frontend entry in Sophos UTM * [utm\_proxy\_frontend\_info](utm_proxy_frontend_info_module#ansible-collections-community-general-utm-proxy-frontend-info-module) – create, update or destroy reverse\_proxy frontend entry in Sophos UTM * [utm\_proxy\_location](utm_proxy_location_module#ansible-collections-community-general-utm-proxy-location-module) – create, update or destroy reverse\_proxy location entry in Sophos UTM * [utm\_proxy\_location\_info](utm_proxy_location_info_module#ansible-collections-community-general-utm-proxy-location-info-module) – create, update or destroy reverse\_proxy location entry in Sophos UTM * [vdo](vdo_module#ansible-collections-community-general-vdo-module) – Module to control VDO * [vertica\_configuration](vertica_configuration_module#ansible-collections-community-general-vertica-configuration-module) – Updates Vertica configuration parameters. * [vertica\_info](vertica_info_module#ansible-collections-community-general-vertica-info-module) – Gathers Vertica database facts. * [vertica\_role](vertica_role_module#ansible-collections-community-general-vertica-role-module) – Adds or removes Vertica database roles and assigns roles to them. * [vertica\_schema](vertica_schema_module#ansible-collections-community-general-vertica-schema-module) – Adds or removes Vertica database schema and roles. * [vertica\_user](vertica_user_module#ansible-collections-community-general-vertica-user-module) – Adds or removes Vertica database users and assigns roles. * [vexata\_eg](vexata_eg_module#ansible-collections-community-general-vexata-eg-module) – Manage export groups on Vexata VX100 storage arrays * [vexata\_volume](vexata_volume_module#ansible-collections-community-general-vexata-volume-module) – Manage volumes on Vexata VX100 storage arrays * [vmadm](vmadm_module#ansible-collections-community-general-vmadm-module) – Manage SmartOS virtual machines and zones. * [wakeonlan](wakeonlan_module#ansible-collections-community-general-wakeonlan-module) – Send a magic Wake-on-LAN (WoL) broadcast packet * [webfaction\_app](webfaction_app_module#ansible-collections-community-general-webfaction-app-module) – Add or remove applications on a Webfaction host * [webfaction\_db](webfaction_db_module#ansible-collections-community-general-webfaction-db-module) – Add or remove a database on Webfaction * [webfaction\_domain](webfaction_domain_module#ansible-collections-community-general-webfaction-domain-module) – Add or remove domains and subdomains on Webfaction * [webfaction\_mailbox](webfaction_mailbox_module#ansible-collections-community-general-webfaction-mailbox-module) – Add or remove mailboxes on Webfaction * [webfaction\_site](webfaction_site_module#ansible-collections-community-general-webfaction-site-module) – Add or remove a website on a Webfaction host * [xattr](xattr_module#ansible-collections-community-general-xattr-module) – Manage user defined extended attributes * [xbps](xbps_module#ansible-collections-community-general-xbps-module) – Manage packages with XBPS * [xcc\_redfish\_command](xcc_redfish_command_module#ansible-collections-community-general-xcc-redfish-command-module) – Manages Lenovo Out-Of-Band controllers using Redfish APIs * [xenserver\_facts](xenserver_facts_module#ansible-collections-community-general-xenserver-facts-module) – get facts reported on xenserver * [xenserver\_guest](xenserver_guest_module#ansible-collections-community-general-xenserver-guest-module) – Manages virtual machines running on Citrix Hypervisor/XenServer host or pool * [xenserver\_guest\_info](xenserver_guest_info_module#ansible-collections-community-general-xenserver-guest-info-module) – Gathers information for virtual machines running on Citrix Hypervisor/XenServer host or pool * [xenserver\_guest\_powerstate](xenserver_guest_powerstate_module#ansible-collections-community-general-xenserver-guest-powerstate-module) – Manages power states of virtual machines running on Citrix Hypervisor/XenServer host or pool * [xfconf](xfconf_module#ansible-collections-community-general-xfconf-module) – Edit XFCE4 Configurations * [xfconf\_info](xfconf_info_module#ansible-collections-community-general-xfconf-info-module) – Retrieve XFCE4 configurations * [xfs\_quota](xfs_quota_module#ansible-collections-community-general-xfs-quota-module) – Manage quotas on XFS filesystems * [xml](xml_module#ansible-collections-community-general-xml-module) – Manage bits and pieces of XML files or strings * [yarn](yarn_module#ansible-collections-community-general-yarn-module) – Manage node.js packages with Yarn * [yum\_versionlock](yum_versionlock_module#ansible-collections-community-general-yum-versionlock-module) – Locks / unlocks a installed package(s) from being updated by yum package manager * [zfs](zfs_module#ansible-collections-community-general-zfs-module) – Manage zfs * [zfs\_delegate\_admin](zfs_delegate_admin_module#ansible-collections-community-general-zfs-delegate-admin-module) – Manage ZFS delegated administration (user admin privileges) * [zfs\_facts](zfs_facts_module#ansible-collections-community-general-zfs-facts-module) – Gather facts about ZFS datasets. * [znode](znode_module#ansible-collections-community-general-znode-module) – Create, delete, retrieve, and update znodes using ZooKeeper * [zpool\_facts](zpool_facts_module#ansible-collections-community-general-zpool-facts-module) – Gather facts about ZFS pools. * [zypper](zypper_module#ansible-collections-community-general-zypper-module) – Manage packages on SUSE and openSUSE * [zypper\_repository](zypper_repository_module#ansible-collections-community-general-zypper-repository-module) – Add and remove Zypper repositories See also List of [collections](../../index#list-of-collections) with docs hosted here.
programming_docs
ansible community.general.ipa_otpconfig – Manage FreeIPA OTP Configuration Settings community.general.ipa\_otpconfig – Manage FreeIPA OTP Configuration Settings ============================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ipa_otpconfig`. New in version 2.5.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Modify global configuration settings of a FreeIPA Server with respect to OTP (One Time Passwords). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_prot** string | **Choices:*** http * **https** ← | Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. | | **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipatokenhotpauthwindow** integer | | HOTP authentication window in number of hops. aliases: hotpauthwindow | | **ipatokenhotpsyncwindow** integer | | HOTP synchronization window in hops. aliases: hotpsyncwindow | | **ipatokentotpauthwindow** integer | | TOTP authentication window in seconds. aliases: totpauthwindow | | **ipatokentotpsyncwindow** integer | | TOTP synchronization window in seconds. aliases: totpsyncwindow | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | This only applies if `ipa_prot` is *https*. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Ensure the TOTP authentication window is set to 300 seconds community.general.ipa_otpconfig: ipatokentotpauthwindow: '300' ipa_host: localhost ipa_user: admin ipa_pass: supersecret - name: Ensure the TOTP syncronization window is set to 86400 seconds community.general.ipa_otpconfig: ipatokentotpsyncwindow: '86400' ipa_host: localhost ipa_user: admin ipa_pass: supersecret - name: Ensure the HOTP authentication window is set to 10 hops community.general.ipa_otpconfig: ipatokenhotpauthwindow: '10' ipa_host: localhost ipa_user: admin ipa_pass: supersecret - name: Ensure the HOTP syncronization window is set to 100 hops community.general.ipa_otpconfig: ipatokenhotpsyncwindow: '100' ipa_host: localhost ipa_user: admin ipa_pass: supersecret ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **otpconfig** dictionary | always | OTP configuration as returned by IPA API. | ### Authors * justchris1 (@justchris1) ansible community.general.redis – Various redis commands, replica and flush community.general.redis – Various redis commands, replica and flush =================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.redis`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Unified utility to interact with redis instances. Requirements ------------ The below requirements are needed on the host that executes this module. * redis Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **command** string | **Choices:*** config * flush * replica * slave | The selected redis command `config` ensures a configuration setting on an instance. `flush` flushes all the instance or a specified db. `replica` sets a redis instance in replica or master mode. (`slave` is an alias for `replica`.) | | **db** integer | | The database to flush (used in db mode) [flush command] | | **flush\_mode** string | **Choices:*** **all** ← * db | Type of flush (all the dbs in a redis instance or a specific one) [flush command] | | **login\_host** string | **Default:**"localhost" | The host running the database | | **login\_password** string | | The password used to authenticate with (usually not used) | | **login\_port** integer | **Default:**6379 | The port to connect to | | **master\_host** string | | The host of the master instance [replica command] | | **master\_port** integer | | The port of the master instance [replica command] | | **name** string | | A redis config key. | | **replica\_mode** string | **Choices:*** master * **replica** ← * slave | The mode of the redis instance [replica command] `slave` is an alias for `replica`. aliases: slave\_mode | | **value** string | | A redis config value. When memory size is needed, it is possible to specify it in the usal form of 1KB, 2M, 400MB where the base is 1024. Units are case insensitive i.e. 1m = 1mb = 1M = 1MB. | Notes ----- Note * Requires the redis-py Python package on the remote host. You can install it with pip (pip install redis) or with a package manager. <https://github.com/andymccurdy/redis-py> * If the redis master instance we are making replica of is password protected this needs to be in the redis.conf in the masterauth variable See Also -------- See also [community.general.redis\_info](redis_info_module#ansible-collections-community-general-redis-info-module) The official documentation on the **community.general.redis\_info** module. Examples -------- ``` - name: Set local redis instance to be a replica of melee.island on port 6377 community.general.redis: command: replica master_host: melee.island master_port: 6377 - name: Deactivate replica mode community.general.redis: command: replica replica_mode: master - name: Flush all the redis db community.general.redis: command: flush flush_mode: all - name: Flush only one db in a redis instance community.general.redis: command: flush db: 1 flush_mode: db - name: Configure local redis to have 10000 max clients community.general.redis: command: config name: maxclients value: 10000 - name: Configure local redis maxmemory to 4GB community.general.redis: command: config name: maxmemory value: 4GB - name: Configure local redis to have lua time limit of 100 ms community.general.redis: command: config name: lua-time-limit value: 100 ``` ### Authors * Xabier Larrakoetxea (@slok) ansible community.general.pkgng – Package manager for FreeBSD >= 9.0 community.general.pkgng – Package manager for FreeBSD >= 9.0 ============================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pkgng`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage binary packages for FreeBSD using ‘pkgng’ which is available in versions after 9.0. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotation** string | | A comma-separated list of keyvalue-pairs of the form `<+/-/:><key>[=<value>]`. A `+` denotes adding an annotation, a `-` denotes removing an annotation, and `:` denotes modifying an annotation. If setting or modifying annotations, a value must be provided. | | **autoremove** boolean | **Choices:*** **no** ← * yes | Remove automatically installed packages which are no longer needed. | | **cached** boolean | **Choices:*** **no** ← * yes | Use local package base instead of fetching an updated one. | | **chroot** path | | Pkg will chroot in the specified environment. Can not be used together with *rootdir* or *jail* options. | | **ignore\_osver** boolean added in 1.3.0 of community.general | **Choices:*** **no** ← * yes | Ignore FreeBSD OS version check, useful on -STABLE and -CURRENT branches. Defines the `IGNORE_OSVERSION` environment variable. | | **jail** string | | Pkg will execute in the given jail name or id. Can not be used together with *chroot* or *rootdir* options. | | **name** list / elements=string / required | | Name or list of names of packages to install/remove. With *name=\**, *state: latest* will operate, but *state: present* and *state: absent* will be noops. Warning: In Ansible 2.9 and earlier this module had a misfeature where *name=\** with *state: latest* or *state: present* would install every package from every package repository, filling up the machines disk. Avoid using them unless you are certain that your role will only be used with newer versions. aliases: pkg | | **pkgsite** string | | For pkgng versions before 1.1.4, specify packagesite to use for downloading packages. If not specified, use settings from `/usr/local/etc/pkg.conf`. For newer pkgng versions, specify a the name of a repository configured in `/usr/local/etc/pkg/repos`. | | **rootdir** path | | For pkgng versions 1.5 and later, pkg will install all packages within the specified root directory. Can not be used together with *chroot* or *jail* options. | | **state** string | **Choices:*** **present** ← * latest * absent | State of the package. Note: "latest" added in 2.7 | Notes ----- Note * When using pkgsite, be careful that already in cache packages won’t be downloaded again. * When used with a `loop:` each package will be processed individually, it is much more efficient to pass the list directly to the `name` option. Examples -------- ``` - name: Install package foo community.general.pkgng: name: foo state: present - name: Annotate package foo and bar community.general.pkgng: name: foo,bar annotation: '+test1=baz,-test2,:test3=foobar' - name: Remove packages foo and bar community.general.pkgng: name: foo,bar state: absent # "latest" support added in 2.7 - name: Upgrade package baz community.general.pkgng: name: baz state: latest - name: Upgrade all installed packages (see warning for the name option first!) community.general.pkgng: name: "*" state: latest ``` ### Authors * bleader (@bleader) ansible community.general.cpanm – Manages Perl library dependencies. community.general.cpanm – Manages Perl library dependencies. ============================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.cpanm`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage Perl library dependencies using cpanminus. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **executable** path | | Override the path to the cpanm executable. | | **from\_path** path | | The local directory or `tar.gz` file to install from. | | **installdeps** boolean | **Choices:*** **no** ← * yes | Only install dependencies. | | **locallib** path | | Specify the install base to install modules. | | **mirror** string | | Specifies the base URL for the CPAN mirror to use. | | **mirror\_only** boolean | **Choices:*** **no** ← * yes | Use the mirror's index file instead of the CPAN Meta DB. | | **mode** string added in 3.0.0 of community.general | **Choices:*** **compatibility** ← * new | Controls the module behavior. See notes below for more details. | | **name** string | | The Perl library to install. Valid values change according to the *mode*, see notes for more details. Note that for installing from a local path the parameter *from\_path* should be used. aliases: pkg | | **name\_check** string added in 3.0.0 of community.general | | When in `new` mode, this parameter can be used to check if there is a module *name* installed (at *version*, when specified). | | **notest** boolean | **Choices:*** **no** ← * yes | Do not run unit tests. | | **system\_lib** boolean | **Choices:*** **no** ← * yes | Use this if you want to install modules to the system perl include path. You must be root or have "passwordless" sudo for this to work. This uses the cpanm commandline option `--sudo`, which has nothing to do with ansible privilege escalation. This option is not recommended for use and it will be deprecated in the future. If you need to escalate privileges please consider using any of the multiple mechanisms available in Ansible. aliases: use\_sudo | | **version** string | | Version specification for the perl module. When *mode* is `new`, `cpanm` version operators are accepted. | Notes ----- Note * Please note that <http://search.cpan.org/dist/App-cpanminus/bin/cpanm>, cpanm must be installed on the remote host. * This module now comes with a choice of execution *mode*: `compatibility` or `new`. * `compatibility` mode: * When using `compatibility` mode, the module will keep backward compatibility. This is the default mode. * *name* must be either a module name or a distribution file. * If the perl module given by *name* is installed (at the exact *version* when specified), then nothing happens. Otherwise, it will be installed using the `cpanm` executable. * *name* cannot be an URL, or a git URL. * `cpanm` version specifiers do not work in this mode. * `new` mode: * When using `new` mode, the module will behave differently * The *name* parameter may refer to a module name, a distribution file, a HTTP URL or a git repository URL as described in `cpanminus` documentation. * `cpanm` version specifiers are recognized. Examples -------- ``` - name: Install Dancer perl package community.general.cpanm: name: Dancer - name: Install version 0.99_05 of the Plack perl package community.general.cpanm: name: MIYAGAWA/Plack-0.99_05.tar.gz - name: Install Dancer into the specified locallib community.general.cpanm: name: Dancer locallib: /srv/webapps/my_app/extlib - name: Install perl dependencies from local directory community.general.cpanm: from_path: /srv/webapps/my_app/src/ - name: Install Dancer perl package without running the unit tests in indicated locallib community.general.cpanm: name: Dancer notest: True locallib: /srv/webapps/my_app/extlib - name: Install Dancer perl package from a specific mirror community.general.cpanm: name: Dancer mirror: 'http://cpan.cpantesters.org/' - name: Install Dancer perl package into the system root path become: yes community.general.cpanm: name: Dancer - name: Install Dancer if it is not already installed OR the installed version is older than version 1.0 community.general.cpanm: name: Dancer version: '1.0' ``` ### Authors * Franck Cuny (@fcuny) * Alexei Znamensky (@russoz) ansible community.general.datadog_downtime – Manages Datadog downtimes community.general.datadog\_downtime – Manages Datadog downtimes =============================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.datadog_downtime`. New in version 2.0.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages downtimes within Datadog. * Options as described on <https://docs.datadoghq.com/api/v1/downtimes/s>. Requirements ------------ The below requirements are needed on the host that executes this module. * datadog-api-client * Python 3.6+ Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_host** string | **Default:**"https://api.datadoghq.com" | The URL to the Datadog API. This value can also be set with the `DATADOG_HOST` environment variable. | | **api\_key** string / required | | Your Datadog API key. | | **app\_key** string / required | | Your Datadog app key. | | **downtime\_message** string | | A message to include with notifications for this downtime. Email notifications can be sent to specific users by using the same "@username" notation as events. | | **end** integer | | POSIX timestamp to end the downtime. If not provided, the downtime is in effect until you cancel it. | | **id** integer | | The identifier of the downtime. If empty, a new downtime gets created, otherwise it is either updated or deleted depending of the `state`. To keep your playbook idempotent, you should save the identifier in a file and read it in a lookup. | | **monitor\_id** integer | | The ID of the monitor to mute. If not provided, the downtime applies to all monitors. | | **monitor\_tags** list / elements=string | | A list of monitor tags to which the downtime applies. The resulting downtime applies to monitors that match ALL provided monitor tags. | | **rrule** string | | The `RRULE` standard for defining recurring events. For example, to have a recurring event on the first day of each month, select a type of rrule and set the `FREQ` to `MONTHLY` and `BYMONTHDAY` to `1`. Most common rrule options from the iCalendar Spec are supported. Attributes specifying the duration in `RRULE` are not supported (e.g. `DTSTART`, `DTEND`, `DURATION`). | | **scope** list / elements=string | | A list of scopes to which the downtime applies. The resulting downtime applies to sources that matches ALL provided scopes. | | **start** integer | | POSIX timestamp to start the downtime. If not provided, the downtime starts the moment it is created. | | **state** string | **Choices:*** **present** ← * absent | The designated state of the downtime. | | **timezone** string | | The timezone for the downtime. | Examples -------- ``` - name: Create a downtime register: downtime_var community.general.datadog_downtime: state: present monitor_tags: - "foo:bar" downtime_message: "Downtime for foo:bar" scope: "test" api_key: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" app_key: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" # Lookup the id in the file and ignore errors if the file doesn't exits, so downtime gets created id: "{{ lookup('file', inventory_hostname ~ '_downtime_id.txt', errors='ignore') }}" - name: Save downtime id to file for later updates and idempotence delegate_to: localhost copy: content: "{{ downtime.downtime.id }}" dest: "{{ inventory_hostname ~ '_downtime_id.txt' }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **downtime** dictionary | always | The downtime returned by the API. **Sample:** {'active': True, 'canceled': None, 'creator\_id': 1445416, 'disabled': False, 'downtime\_type': 2, 'end': None, 'id': 1055751000, 'message': 'Downtime for foo:bar', 'monitor\_id': None, 'monitor\_tags': ['foo:bar'], 'parent\_id': None, 'recurrence': None, 'scope': ['test'], 'start': 1607015009, 'timezone': 'UTC', 'updater\_id': None} | ### Authors * Datadog (@Datadog)
programming_docs
ansible community.general.pritunl_org – Manages Pritunl Organizations using the Pritunl API community.general.pritunl\_org – Manages Pritunl Organizations using the Pritunl API ==================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pritunl_org`. New in version 2.5.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * A module to manage Pritunl organizations using the Pritunl API. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **force** boolean | **Choices:*** **no** ← * yes | If *force* is `true` and *state* is `absent`, the module will delete the organization, no matter if it contains users or not. By default *force* is `false`, which will cause the module to fail the deletion of the organization when it contains users. | | **name** string / required | | The name of the organization to manage in Pritunl. aliases: org | | **pritunl\_api\_secret** string / required | | API Secret found in Administrators > USERNAME > API Secret. | | **pritunl\_api\_token** string / required | | API Token of a Pritunl admin user. It needs to be enabled in Administrators > USERNAME > Enable Token Authentication. | | **pritunl\_url** string / required | | URL and port of the Pritunl server on which the API is enabled. | | **state** string | **Choices:*** **present** ← * absent | If `present`, the module adds organization *name* to Pritunl. If `absent`, attempt to delete the organization from Pritunl (please read about *force* usage). | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If certificates should be validated or not. This should never be set to `false`, except if you are very sure that your connection to the server can not be subject to a Man In The Middle attack. | Examples -------- ``` - name: Ensure the organization named MyOrg exists community.general.pritunl_org: state: present name: MyOrg - name: Ensure the organization named MyOrg does not exist community.general.pritunl_org: state: absent name: MyOrg ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **response** dictionary | success | JSON representation of a Pritunl Organization. **Sample:** {'auth\_api': False, 'auth\_secret': 'None', 'auth\_token': 'None', 'id': 'csftwlu6uhralzi2dpmhekz3', 'name': 'Foo', 'user\_count': 0} | ### Authors * Florian Dambrine (@Lowess) ansible community.general.pkg5 – Manages packages with the Solaris 11 Image Packaging System community.general.pkg5 – Manages packages with the Solaris 11 Image Packaging System ==================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pkg5`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * IPS packages are the native packages in Solaris 11 and higher. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **accept\_licenses** boolean | **Choices:*** **no** ← * yes | Accept any licences. aliases: accept, accept\_licences | | **be\_name** string | | Creates a new boot environment with the given name. | | **name** list / elements=string / required | | An FRMI of the package(s) to be installed/removed/updated. Multiple packages may be specified, separated by `,`. | | **refresh** boolean | **Choices:*** no * **yes** ← | Refresh publishers before execution. | | **state** string | **Choices:*** absent * latest * **present** ← * installed * removed * uninstalled | Whether to install (*present*, *latest*), or remove (*absent*) a package. | Notes ----- Note * The naming of IPS packages is explained at <http://www.oracle.com/technetwork/articles/servers-storage-admin/ips-package-versioning-2232906.html>. Examples -------- ``` - name: Install Vim community.general.pkg5: name: editor/vim - name: Install Vim without refreshing publishers community.general.pkg5: name: editor/vim refresh: no - name: Remove finger daemon community.general.pkg5: name: service/network/finger state: absent - name: Install several packages at once community.general.pkg5: name: - /file/gnu-findutils - /text/gnu-grep ``` ### Authors * Peter Oliver (@mavit) ansible community.general.oneview_san_manager_info – Retrieve information about one or more of the OneView SAN Managers community.general.oneview\_san\_manager\_info – Retrieve information about one or more of the OneView SAN Managers ================================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneview_san_manager_info`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Retrieve information about one or more of the SAN Managers from OneView * This module was called `oneview_san_manager_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [community.general.oneview\_san\_manager\_info](#ansible-collections-community-general-oneview-san-manager-info-module) module no longer returns `ansible_facts`! Requirements ------------ The below requirements are needed on the host that executes this module. * hpOneView >= 2.0.1 * python >= 2.7.9 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_version** integer | | OneView API Version. | | **config** path | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional and when used should be present in the host running the ansible commands. If the file path is not provided, the configuration will be loaded from environment variables. For links to example configuration files or how to use the environment variables verify the notes section. | | **hostname** string | | IP address or hostname for the appliance. | | **image\_streamer\_hostname** string | | IP address or hostname for the HPE Image Streamer REST API. | | **params** dictionary | | List of params to delimit, filter and sort the list of resources. params allowed: - `start`: The first item to return, using 0-based indexing. - `count`: The number of resources to return. - `query`: A general query string to narrow the list of resources returned. - `sort`: The sort order of the returned data set. | | **password** string | | Password for API authentication. | | **provider\_display\_name** string | | Provider Display Name. | | **username** string | | Username for API authentication. | Notes ----- Note * A sample configuration file for the config parameter can be found at: <https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json> * Check how to use environment variables for configuration at: <https://github.com/HewlettPackard/oneview-ansible#environment-variables> * Additional Playbooks for the HPE OneView Ansible modules can be found at: <https://github.com/HewlettPackard/oneview-ansible/tree/master/examples> * The OneView API version used will directly affect returned and expected fields in resources. Information on setting the desired API version and can be found at: <https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version> Examples -------- ``` - name: Gather information about all SAN Managers community.general.oneview_san_manager_info: config: /etc/oneview/oneview_config.json delegate_to: localhost register: result - name: Print fetched information about SAN Managers ansible.builtin.debug: msg: "{{ result.san_managers }}" - name: Gather paginated, filtered and sorted information about SAN Managers community.general.oneview_san_manager_info: config: /etc/oneview/oneview_config.json params: start: 0 count: 3 sort: name:ascending query: isInternal eq false delegate_to: localhost register: result - name: Print fetched information about paginated, filtered and sorted list of SAN Managers ansible.builtin.debug: msg: "{{ result.san_managers }}" - name: Gather information about a SAN Manager by provider display name community.general.oneview_san_manager_info: config: /etc/oneview/oneview_config.json provider_display_name: Brocade Network Advisor delegate_to: localhost register: result - name: Print fetched information about SAN Manager found by provider display name ansible.builtin.debug: msg: "{{ result.san_managers }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **san\_managers** dictionary | Always, but can be null. | Has all the OneView information about the SAN Managers. | ### Authors * Felipe Bulsoni (@fgbulsoni) * Thiago Miotto (@tmiotto) * Adriane Cardozo (@adriane-cardozo) ansible community.general.iso_create – Generate ISO file with specified files or folders community.general.iso\_create – Generate ISO file with specified files or folders ================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.iso_create`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module is used to generate ISO file with specified path of files. Requirements ------------ The below requirements are needed on the host that executes this module. * pycdlib * python >= 2.7 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **dest\_iso** path / required | | The absolute path with file name of the new generated ISO file on local machine. Will create intermediate folders when they does not exist. | | **interchange\_level** integer | **Choices:*** 1 * 2 * 3 * 4 **Default:**1 | The ISO9660 interchange level to use, it dictates the rules on the names of files. Levels and valid values `1`, `2`, `3`, `4` are supported. The default value is level `1`, which is the most conservative, level `3` is recommended. ISO9660 file names at interchange level `1` cannot have more than 8 characters or 3 characters in the extension. | | **joliet** integer | **Choices:*** 1 * 2 * 3 | Support levels and valid values are `1`, `2`, or `3`. Level `3` is by far the most common. If not specified, then no Joliet support is added. | | **rock\_ridge** string | **Choices:*** 1.09 * 1.10 * 1.12 | Whether to make this ISO have the Rock Ridge extensions or not. Valid values are `1.09`, `1.10` or `1.12`, means adding the specified Rock Ridge version to the ISO. If unsure, set `1.09` to ensure maximum compatibility. If not specified, then not add Rock Ridge extension to the ISO. | | **src\_files** list / elements=path / required | | This is a list of absolute paths of source files or folders which will be contained in the new generated ISO file. Will fail if specified file or folder in `src_files` does not exist on local machine. Note: With all ISO9660 levels from 1 to 3, all file names are restricted to uppercase letters, numbers and underscores (\_). File names are limited to 31 characters, directory nesting is limited to 8 levels, and path names are limited to 255 characters. | | **udf** boolean | **Choices:*** **no** ← * yes | Whether to add UDF support to this ISO. If set to `True`, then version 2.60 of the UDF spec is used. If not specified or set to `False`, then no UDF support is added. | | **vol\_ident** string | | The volume identification string to use on the new generated ISO image. | Examples -------- ``` - name: Create an ISO file community.general.iso_create: src_files: - /root/testfile.yml - /root/testfolder dest_iso: /tmp/test.iso interchange_level: 3 - name: Create an ISO file with Rock Ridge extension community.general.iso_create: src_files: - /root/testfile.yml - /root/testfolder dest_iso: /tmp/test.iso rock_ridge: 1.09 - name: Create an ISO file with Joliet support community.general.iso_create: src_files: - ./windows_config/Autounattend.xml dest_iso: ./test.iso interchange_level: 3 joliet: 3 vol_ident: WIN_AUTOINSTALL ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **created\_iso** string | on success | Created iso file path. **Sample:** /path/to/test.iso | | **interchange\_level** integer | on success | Configured interchange level. **Sample:** 3 | | **joliet** integer | on success | Configured Joliet support level. **Sample:** 3 | | **rock\_ridge** string | on success | Configured Rock Ridge version. **Sample:** 1.09 | | **source\_file** list / elements=path | on success | Configured source files or directories list. **Sample:** ['/path/to/file.txt', '/path/to/folder'] | | **udf** boolean | on success | Configured UDF support. | | **vol\_ident** string | on success | Configured volume identification string. **Sample:** OEMDRV | ### Authors * Diane Wang (@Tomorrow9) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#3e5a575f505b49181d0d0905181d0b0c05181d0a06054853495f4c5b181d0a08055d5153)> ansible community.general.rax_mon_alarm – Create or delete a Rackspace Cloud Monitoring alarm. community.general.rax\_mon\_alarm – Create or delete a Rackspace Cloud Monitoring alarm. ======================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rax_mon_alarm`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Create or delete a Rackspace Cloud Monitoring alarm that associates an existing rax\_mon\_entity, rax\_mon\_check, and rax\_mon\_notification\_plan with criteria that specify what conditions will trigger which levels of notifications. Rackspace monitoring module flow | rax\_mon\_entity -> rax\_mon\_check -> rax\_mon\_notification -> rax\_mon\_notification\_plan -> *rax\_mon\_alarm* Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * pyrax Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string | | Rackspace API key, overrides *credentials*. aliases: password | | **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/> | | **check\_id** string / required | | ID of the check that should be alerted on. May be acquired by registering the value of a rax\_mon\_check task. | | **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided. aliases: creds\_file | | **criteria** string | | Alarm DSL that describes alerting conditions and their output states. Must be between 1 and 16384 characters long. See http://docs.rackspace.com/cm/api/v1.0/cm-devguide/content/alerts-language.html for a reference on the alerting language. | | **disabled** boolean | **Choices:*** **no** ← * yes | If yes, create this alarm, but leave it in an inactive state. Defaults to no. | | **entity\_id** string / required | | ID of the entity this alarm is attached to. May be acquired by registering the value of a rax\_mon\_entity task. | | **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. | | **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. | | **label** string / required | | Friendly name for this alarm, used to achieve idempotence. Must be a String between 1 and 255 characters long. | | **metadata** dictionary | | Arbitrary key/value pairs to accompany the alarm. Must be a hash of String keys and values between 1 and 255 characters long. | | **notification\_plan\_id** string / required | | ID of the notification plan to trigger if this alarm fires. May be acquired by registering the value of a rax\_mon\_notification\_plan task. | | **region** string | | Region to create an instance in. | | **state** string | **Choices:*** **present** ← * absent | Ensure that the alarm with this `label` exists or does not exist. | | **tenant\_id** string | | The tenant ID used for authentication. | | **tenant\_name** string | | The tenant name used for authentication. | | **username** string | | Rackspace username, overrides *credentials*. | | **validate\_certs** boolean | **Choices:*** no * yes | Whether or not to require SSL validation of API endpoints. aliases: verify\_ssl | Notes ----- Note * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) Examples -------- ``` - name: Alarm example gather_facts: False hosts: local connection: local tasks: - name: Ensure that a specific alarm exists. community.general.rax_mon_alarm: credentials: ~/.rax_pub state: present label: uhoh entity_id: "{{ the_entity['entity']['id'] }}" check_id: "{{ the_check['check']['id'] }}" notification_plan_id: "{{ defcon1['notification_plan']['id'] }}" criteria: > if (rate(metric['average']) > 10) { return new AlarmStatus(WARNING); } return new AlarmStatus(OK); register: the_alarm ``` ### Authors * Ash Wilson (@smashwilson)
programming_docs
ansible community.general.nios_network_view – Configure Infoblox NIOS network views community.general.nios\_network\_view – Configure Infoblox NIOS network views ============================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nios_network_view`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Status](#status) DEPRECATED ---------- Removed in version 5.0.0 Why Please install the infoblox.nios\_modules collection and use the corresponding module from it. Alternative infoblox.nios\_modules.nios\_network\_view Synopsis -------- * Adds and/or removes instances of network view objects from Infoblox NIOS servers. This module manages NIOS `networkview` objects using the Infoblox WAPI interface over REST. * Updates instances of network view object from Infoblox NIOS servers. Requirements ------------ The below requirements are needed on the host that executes this module. * infoblox-client Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **comment** string | | Configures a text string comment to be associated with the instance of this object. The provided text string will be configured on the object instance. | | **extattrs** dictionary | | Allows for the configuration of Extensible Attributes on the instance of the object. This argument accepts a set of key / value pairs for configuration. | | **name** string / required | | Specifies the fully qualified hostname to add or remove from the system. User can also update the hostname as it is possible to pass a dict containing *new\_name*, *old\_name*. See examples. aliases: network\_view | | **provider** dictionary | | A dict object containing connection details. | | | **host** string | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. | | | **http\_pool\_connections** integer | **Default:**10 | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_pool\_maxsize** integer | **Default:**10 | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_request\_timeout** integer | **Default:**10 | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. | | | **max\_results** integer | **Default:**1000 | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. | | | **max\_retries** integer | **Default:**3 | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. | | | **password** string | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. | | | **silent\_ssl\_warnings** boolean | **Choices:*** no * **yes** ← | Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **username** string | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. | | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable. aliases: ssl\_verify | | | **wapi\_version** string | **Default:**"2.1" | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 | | **state** string | **Choices:*** **present** ← * absent | Configures the intended state of the instance of the object on the NIOS server. When this value is set to `present`, the object is configured on the device and when this value is set to `absent` the value is removed (if necessary) from the device. | Notes ----- Note * This module must be run locally, which can be achieved by specifying `connection: local`. * Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible. Examples -------- ``` - name: Configure a new network view community.general.nios_network_view: name: ansible state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Update the comment for network view community.general.nios_network_view: name: ansible comment: this is an example comment state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Remove the network view community.general.nios_network_view: name: ansible state: absent provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Update a existing network view community.general.nios_network_view: name: {new_name: ansible-new, old_name: ansible} state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local ``` Status ------ * This module will be removed in version 5.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Peter Sprygada (@privateip) ansible community.general.selinux_permissive – Change permissive domain in SELinux policy community.general.selinux\_permissive – Change permissive domain in SELinux policy ================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.selinux_permissive`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Add and remove a domain from the list of permissive domains. Requirements ------------ The below requirements are needed on the host that executes this module. * policycoreutils-python Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **domain** string / required | **Default:**"" | The domain that will be added or removed from the list of permissive domains. aliases: name | | **no\_reload** boolean | **Choices:*** **no** ← * yes | Disable reloading of the SELinux policy after making change to a domain's permissive setting. The default is `no`, which causes policy to be reloaded when a domain changes state. Reloading the policy does not work on older versions of the `policycoreutils-python` library, for example in EL 6." | | **permissive** boolean / required | **Choices:*** no * yes | Indicate if the domain should or should not be set as permissive. | | **store** string | | Name of the SELinux policy store to use. | Notes ----- Note * Requires a recent version of SELinux and `policycoreutils-python` (EL 6 or newer). Examples -------- ``` - name: Change the httpd_t domain to permissive community.general.selinux_permissive: name: httpd_t permissive: true ``` ### Authors * Michael Scherer (@mscherer) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#cda0a4beaeebeefefaf6ebeef8fff6ebeef9f5f6b7acbfafebeef9fbf6a2bfaa)> ansible community.general.nios – Query Infoblox NIOS objects community.general.nios – Query Infoblox NIOS objects ==================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nios`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 5.0.0 Why Please install the infoblox.nios\_modules collection and use the corresponding lookup from it. Alternative infoblox.nios\_modules.nios\_lookup Synopsis -------- * Uses the Infoblox WAPI API to fetch NIOS specified objects. This lookup supports adding additional keywords to filter the return data and specify the desired set of returned fields. Requirements ------------ The below requirements are needed on the local controller node that executes this lookup. * infoblox-client Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **\_terms** string / required | | | The name of the object to return from NIOS | | **extattrs** string | | | a dict object that is used to filter on extattrs | | **filter** string | | | a dict object that is used to filter the return objects | | **provider** dictionary | | | A dict object containing connection details. | | | **host** string | | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. | | | **http\_pool\_connections** integer | **Default:**10 | | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_pool\_maxsize** integer | **Default:**10 | | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_request\_timeout** integer | **Default:**10 | | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. | | | **max\_results** integer | **Default:**1000 | | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. | | | **max\_retries** integer | **Default:**3 | | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. | | | **password** string | | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. | | | **silent\_ssl\_warnings** boolean | **Choices:*** no * **yes** ← | | Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **username** string | | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. | | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | | Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable. aliases: ssl\_verify | | | **wapi\_version** string | **Default:**"2.1" | | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 | | **return\_fields** string | | | The list of field names to return for the specified object. | Notes ----- Note * This module must be run locally, which can be achieved by specifying `connection: local`. * Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible. Examples -------- ``` - name: fetch all networkview objects ansible.builtin.set_fact: networkviews: "{{ lookup('community.general.nios', 'networkview', provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}" - name: fetch the default dns view ansible.builtin.set_fact: dns_views: "{{ lookup('community.general.nios', 'view', filter={'name': 'default'}, provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}" # all of the examples below use credentials that are set using env variables # export INFOBLOX_HOST=nios01 # export INFOBLOX_USERNAME=admin # export INFOBLOX_PASSWORD=admin - name: fetch all host records and include extended attributes ansible.builtin.set_fact: host_records: "{{ lookup('community.general.nios', 'record:host', return_fields=['extattrs', 'name', 'view', 'comment']}) }}" - name: use env variables to pass credentials ansible.builtin.set_fact: networkviews: "{{ lookup('community.general.nios', 'networkview') }}" - name: get a host record ansible.builtin.set_fact: host: "{{ lookup('community.general.nios', 'record:host', filter={'name': 'hostname.ansible.com'}) }}" - name: get the authoritative zone from a non default dns view ansible.builtin.set_fact: host: "{{ lookup('community.general.nios', 'zone_auth', filter={'fqdn': 'ansible.com', 'view': 'ansible-dns'}) }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **obj\_type** dictionary | success | The object type specified in the terms argument | | | **obj\_field** string | success | One or more obj\_type fields as specified by return\_fields argument or the default set of fields as per the object type | Status ------ * This lookup will be removed in version 5.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Unknown (!UNKNOWN) ansible community.general.campfire – Send a message to Campfire community.general.campfire – Send a message to Campfire ======================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.campfire`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Send a message to Campfire. * Messages with newlines will result in a “Paste” message being sent. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **msg** string / required | | The message body. | | **notify** string | **Choices:*** 56k * bell * bezos * bueller * clowntown * cottoneyejoe * crickets * dadgummit * dangerzone * danielsan * deeper * drama * greatjob * greyjoy * guarantee * heygirl * horn * horror * inconceivable * live * loggins * makeitso * noooo * nyan * ohmy * ohyeah * pushit * rimshot * rollout * rumble * sax * secret * sexyback * story * tada * tmyk * trololo * trombone * unix * vuvuzela * what * whoomp * yeah * yodel | Send a notification sound before the message. | | **room** string / required | | Room number to which the message should be sent. | | **subscription** string / required | | The subscription name to use. | | **token** string / required | | API token. | Examples -------- ``` - name: Send a message to Campfire community.general.campfire: subscription: foo token: 12345 room: 123 msg: Task completed. - name: Send a message to Campfire community.general.campfire: subscription: foo token: 12345 room: 123 notify: loggins msg: Task completed ... with feeling. ``` ### Authors * Adam Garside (@fabulops) ansible community.general.rax – create / delete an instance in Rackspace Public Cloud community.general.rax – create / delete an instance in Rackspace Public Cloud ============================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rax`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * creates / deletes a Rackspace Public Cloud instance and optionally waits for it to be ‘running’. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * pyrax Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string | | Rackspace API key, overrides *credentials*. aliases: password | | **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/> | | **auto\_increment** boolean | **Choices:*** no * **yes** ← | Whether or not to increment a single number with the name of the created servers. Only applicable when used with the *group* attribute or meta key. | | **boot\_from\_volume** boolean | **Choices:*** **no** ← * yes | Whether or not to boot the instance from a Cloud Block Storage volume. If `yes` and *image* is specified a new volume will be created at boot time. *boot\_volume\_size* is required with *image* to create a new volume at boot time. | | **boot\_volume** string | | Cloud Block Storage ID or Name to use as the boot volume of the instance | | **boot\_volume\_size** integer | **Default:**100 | Size of the volume to create in Gigabytes. This is only required with *image* and *boot\_from\_volume*. | | **boot\_volume\_terminate** boolean | **Choices:*** **no** ← * yes | Whether the *boot\_volume* or newly created volume from *image* will be terminated when the server is terminated | | **config\_drive** boolean | **Choices:*** **no** ← * yes | Attach read-only configuration drive to server as label config-2 | | **count** integer | **Default:**1 | number of instances to launch | | **count\_offset** integer | **Default:**1 | number count to start at | | **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided. aliases: creds\_file | | **disk\_config** string | **Choices:*** auto * manual | Disk partitioning strategy If not specified it will assume the value `auto`. | | **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. | | **exact\_count** boolean | **Choices:*** **no** ← * yes | Explicitly ensure an exact count of instances, used with state=active/present. If specified as `yes` and *count* is less than the servers matched, servers will be deleted to match the count. If the number of matched servers is fewer than specified in *count* additional servers will be added. | | **extra\_client\_args** dictionary | | A hash of key/value pairs to be used when creating the cloudservers client. This is considered an advanced option, use it wisely and with caution. | | **extra\_create\_args** dictionary | | A hash of key/value pairs to be used when creating a new server. This is considered an advanced option, use it wisely and with caution. | | **files** dictionary | | Files to insert into the instance. remotefilename:localcontent | | **flavor** string | | flavor to use for the instance | | **group** string | | host group to assign to server, is also used for idempotent operations to ensure a specific number of instances | | **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. | | **image** string | | image to use for the instance. Can be an `id`, `human_id` or `name`. With *boot\_from\_volume*, a Cloud Block Storage volume will be created with this image | | **instance\_ids** list / elements=string | | list of instance ids, currently only used when state='absent' to remove instances | | **key\_name** string | | key pair to use on the instance aliases: keypair | | **meta** dictionary | | A hash of metadata to associate with the instance | | **name** string | | Name to give the instance | | **networks** list / elements=string | **Default:**["public", "private"] | The network to attach to the instances. If specified, you must include ALL networks including the public and private interfaces. Can be `id` or `label`. | | **region** string | | Region to create an instance in. | | **state** string | **Choices:*** **present** ← * absent | Indicate desired state of the resource | | **tenant\_id** string | | The tenant ID used for authentication. | | **tenant\_name** string | | The tenant name used for authentication. | | **user\_data** string | | Data to be uploaded to the servers config drive. This option implies *config\_drive*. Can be a file path or a string | | **username** string | | Rackspace username, overrides *credentials*. | | **validate\_certs** boolean | **Choices:*** no * yes | Whether or not to require SSL validation of API endpoints. aliases: verify\_ssl | | **wait** boolean | **Choices:*** **no** ← * yes | wait for the instance to be in state 'running' before returning | | **wait\_timeout** integer | **Default:**300 | how long before wait gives up, in seconds | Notes ----- Note * *exact\_count* can be “destructive” if the number of running servers in the *group* is larger than that specified in *count*. In such a case, the *state* is effectively set to `absent` and the extra servers are deleted. In the case of deletion, the returned data structure will have `action` set to `delete`, and the oldest servers in the group will be deleted. * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) Examples -------- ``` - name: Build a Cloud Server gather_facts: False tasks: - name: Server build request local_action: module: rax credentials: ~/.raxpub name: rax-test1 flavor: 5 image: b11d9567-e412-4255-96b9-bd63ab23bcfe key_name: my_rackspace_key files: /root/test.txt: /home/localuser/test.txt wait: yes state: present networks: - private - public register: rax - name: Build an exact count of cloud servers with incremented names hosts: local gather_facts: False tasks: - name: Server build requests local_action: module: rax credentials: ~/.raxpub name: test%03d.example.org flavor: performance1-1 image: ubuntu-1204-lts-precise-pangolin state: present count: 10 count_offset: 10 exact_count: yes group: test wait: yes register: rax ``` ### Authors * Jesse Keating (@omgjlk) * Matt Martz (@sivel)
programming_docs
ansible community.general.jenkins_plugin – Add or remove Jenkins plugin community.general.jenkins\_plugin – Add or remove Jenkins plugin ================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.jenkins_plugin`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Ansible module which helps to manage Jenkins plugins. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **attributes** string added in 2.3 of ansible.builtin | | The attributes the resulting file or directory should have. To get supported flags look at the man page for *chattr* on the target system. This string should contain the attributes in the same order as the one displayed by *lsattr*. The `=` operator is assumed as default, otherwise `+` or `-` operators need to be included in the string. aliases: attr | | **client\_cert** path | | PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, `client_key` is not required. | | **client\_key** path | | PEM formatted file that contains your private key to be used for SSL client authentication. If `client_cert` contains both the certificate and key, this option is not required. | | **force** boolean | **Choices:*** **no** ← * yes | If `yes` do not get a cached copy. Alias `thirsty` has been deprecated and will be removed in 2.13. aliases: thirsty | | **force\_basic\_auth** boolean | **Choices:*** **no** ← * yes | Credentials specified with *url\_username* and *url\_password* should be passed in HTTP Header. | | **group** string | **Default:**"jenkins" | Name of the Jenkins group on the OS. | | **http\_agent** string | **Default:**"ansible-httpget" | Header to identify as, generally appears in web server logs. | | **jenkins\_home** path | **Default:**"/var/lib/jenkins" | Home directory of the Jenkins user. | | **latest\_plugins\_url\_segments** list / elements=string added in 3.3.0 of community.general | **Default:**["latest"] | Path inside the *updates\_url* to get latest plugins from. | | **mode** raw | **Default:**"0644" | File mode applied on versioned plugins. | | **name** string / required | | Plugin name. | | **owner** string | **Default:**"jenkins" | Name of the Jenkins user on the OS. | | **selevel** string | | The level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the `range`. When set to `_default`, it will use the `level` portion of the policy if available. | | **serole** string | | The role part of the SELinux file context. When set to `_default`, it will use the `role` portion of the policy if available. | | **setype** string | | The type part of the SELinux file context. When set to `_default`, it will use the `type` portion of the policy if available. | | **seuser** string | | The user part of the SELinux file context. By default it uses the `system` policy, where applicable. When set to `_default`, it will use the `user` portion of the policy if available. | | **state** string | **Choices:*** absent * **present** ← * pinned * unpinned * enabled * disabled * latest | Desired plugin state. If the `latest` is set, the check for new version will be performed every time. This is suitable to keep the plugin up-to-date. | | **timeout** integer | **Default:**30 | Server connection timeout in secs. | | **unsafe\_writes** boolean added in 2.2 of ansible.builtin | **Choices:*** **no** ← * yes | Influence when to use atomic operation to prevent data corruption or inconsistent reads from the target file. By default this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, which cannot be updated atomically from inside the container and can only be written in an unsafe manner. This option allows Ansible to fall back to unsafe methods of updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes). IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption. | | **update\_json\_url\_segment** list / elements=string added in 3.3.0 of community.general | **Default:**["update-center.json", "updates/update-center.json"] | A list of URL segment(s) to retrieve the update center json file from. | | **updates\_expiration** integer | **Default:**86400 | Number of seconds after which a new copy of the *update-center.json* file is downloaded. This is used to avoid the need to download the plugin to calculate its checksum when `latest` is specified. Set it to `0` if no cache file should be used. In that case, the plugin file will always be downloaded to calculate its checksum when `latest` is specified. | | **updates\_url** list / elements=string | **Default:**["https://updates.jenkins.io", "http://mirrors.jenkins.io"] | A list of base URL(s) to retrieve *update-center.json*, and direct plugin files from. This can be a list since community.general 3.3.0. | | **url** string | **Default:**"http://localhost:8080" | URL of the Jenkins server. | | **url\_password** string | | The password for use in HTTP basic authentication. If the *url\_username* parameter is not specified, the *url\_password* parameter will not be used. | | **url\_username** string | | The username for use in HTTP basic authentication. This parameter can be used without *url\_password* for sites that allow empty passwords | | **use\_gssapi** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** ← * yes | Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication. Requires the Python library [gssapi](https://github.com/pythongssapi/python-gssapi) to be installed. Credentials for GSSAPI can be specified with *url\_username*/*url\_password* or with the GSSAPI env var `KRB5CCNAME` that specified a custom Kerberos credential cache. NTLM authentication is `not` supported even if the GSSAPI mech for NTLM has been installed. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | | **version** string | | Plugin version number. If this option is specified, all plugin dependencies must be installed manually. It might take longer to verify that the correct version is installed. This is especially true if a specific version number is specified. Quote the version to prevent the value to be interpreted as float. For example if `1.20` would be unquoted, it would become `1.2`. | | **versioned\_plugins\_url\_segments** list / elements=string added in 3.3.0 of community.general | **Default:**["download/plugins", "plugins"] | Path inside the *updates\_url* to get specific version of plugins from. | | **with\_dependencies** boolean | **Choices:*** no * **yes** ← | Defines whether to install plugin dependencies. This option takes effect only if the *version* is not defined. | Notes ----- Note * Plugin installation should be run under root or the same user which owns the plugin files on the disk. Only if the plugin is not installed yet and no version is specified, the API installation is performed which requires only the Web UI credentials. * It’s necessary to notify the handler or call the *service* module to restart the Jenkins service after a new plugin was installed. * Pinning works only if the plugin is installed and Jenkins service was successfully restarted after the plugin installation. * It is not possible to run the module remotely by changing the *url* parameter to point to the Jenkins server. The module must be used on the host where Jenkins runs as it needs direct access to the plugin files. Examples -------- ``` - name: Install plugin community.general.jenkins_plugin: name: build-pipeline-plugin - name: Install plugin without its dependencies community.general.jenkins_plugin: name: build-pipeline-plugin with_dependencies: no - name: Make sure the plugin is always up-to-date community.general.jenkins_plugin: name: token-macro state: latest - name: Install specific version of the plugin community.general.jenkins_plugin: name: token-macro version: "1.15" - name: Pin the plugin community.general.jenkins_plugin: name: token-macro state: pinned - name: Unpin the plugin community.general.jenkins_plugin: name: token-macro state: unpinned - name: Enable the plugin community.general.jenkins_plugin: name: token-macro state: enabled - name: Disable the plugin community.general.jenkins_plugin: name: token-macro state: disabled - name: Uninstall plugin community.general.jenkins_plugin: name: build-pipeline-plugin state: absent # # Example of how to authenticate # - name: Install plugin community.general.jenkins_plugin: name: build-pipeline-plugin url_username: admin url_password: p4ssw0rd url: http://localhost:8888 # # Example of a Play which handles Jenkins restarts during the state changes # - name: Jenkins Master play hosts: jenkins-master vars: my_jenkins_plugins: token-macro: enabled: yes build-pipeline-plugin: version: "1.4.9" pinned: no enabled: yes tasks: - name: Install plugins without a specific version community.general.jenkins_plugin: name: "{{ item.key }}" register: my_jenkins_plugin_unversioned when: > 'version' not in item.value with_dict: "{{ my_jenkins_plugins }}" - name: Install plugins with a specific version community.general.jenkins_plugin: name: "{{ item.key }}" version: "{{ item.value['version'] }}" register: my_jenkins_plugin_versioned when: > 'version' in item.value with_dict: "{{ my_jenkins_plugins }}" - name: Initiate the fact ansible.builtin.set_fact: jenkins_restart_required: no - name: Check if restart is required by any of the versioned plugins ansible.builtin.set_fact: jenkins_restart_required: yes when: item.changed with_items: "{{ my_jenkins_plugin_versioned.results }}" - name: Check if restart is required by any of the unversioned plugins ansible.builtin.set_fact: jenkins_restart_required: yes when: item.changed with_items: "{{ my_jenkins_plugin_unversioned.results }}" - name: Restart Jenkins if required ansible.builtin.service: name: jenkins state: restarted when: jenkins_restart_required - name: Wait for Jenkins to start up ansible.builtin.uri: url: http://localhost:8080 status_code: 200 timeout: 5 register: jenkins_service_status # Keep trying for 5 mins in 5 sec intervals retries: 60 delay: 5 until: > 'status' in jenkins_service_status and jenkins_service_status['status'] == 200 when: jenkins_restart_required - name: Reset the fact ansible.builtin.set_fact: jenkins_restart_required: no when: jenkins_restart_required - name: Plugin pinning community.general.jenkins_plugin: name: "{{ item.key }}" state: "{{ 'pinned' if item.value['pinned'] else 'unpinned'}}" when: > 'pinned' in item.value with_dict: "{{ my_jenkins_plugins }}" - name: Plugin enabling community.general.jenkins_plugin: name: "{{ item.key }}" state: "{{ 'enabled' if item.value['enabled'] else 'disabled'}}" when: > 'enabled' in item.value with_dict: "{{ my_jenkins_plugins }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **plugin** string | success | plugin name **Sample:** build-pipeline-plugin | | **state** string | success | state of the target, after execution **Sample:** present | ### Authors * Jiri Tyr (@jtyr) ansible community.general.ali_instance – Create, Start, Stop, Restart or Terminate an Instance in ECS. Add or Remove Instance to/from a Security Group. community.general.ali\_instance – Create, Start, Stop, Restart or Terminate an Instance in ECS. Add or Remove Instance to/from a Security Group. ================================================================================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ali_instance`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Create, start, stop, restart, modify or terminate ecs instances. * Add or remove ecs instances to/from security group. Requirements ------------ The below requirements are needed on the host that executes this module. * footmark >= 1.19.0 * python >= 3.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **alicloud\_access\_key** string | | Alibaba Cloud access key. If not set then the value of environment variable `ALICLOUD_ACCESS_KEY`, `ALICLOUD_ACCESS_KEY_ID` will be used instead. aliases: access\_key\_id, access\_key | | **alicloud\_assume\_role** dictionary | | If provided with a role ARN, Ansible will attempt to assume this role using the supplied credentials. The nested assume\_role block supports *alicloud\_assume\_role\_arn*, *alicloud\_assume\_role\_session\_name*, *alicloud\_assume\_role\_session\_expiration* and *alicloud\_assume\_role\_policy* aliases: assume\_role | | **alicloud\_assume\_role\_arn** string | | The Alibaba Cloud role\_arn. The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports environment variable ALICLOUD\_ASSUME\_ROLE\_ARN. ansible will execute with provided credentials. aliases: assume\_role\_arn | | **alicloud\_assume\_role\_session\_expiration** integer | | The Alibaba Cloud session\_expiration. The time after which the established session for assuming role expires. Valid value range 900-3600 seconds. Default to 3600 (in this case Alicloud use own default value). It supports environment variable ALICLOUD\_ASSUME\_ROLE\_SESSION\_EXPIRATION aliases: assume\_role\_session\_expiration | | **alicloud\_assume\_role\_session\_name** string | | The Alibaba Cloud session\_name. The session name to use when assuming the role. If omitted, 'ansible' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD\_ASSUME\_ROLE\_SESSION\_NAME aliases: assume\_role\_session\_name | | **alicloud\_region** string / required | | The Alibaba Cloud region to use. If not specified then the value of environment variable `ALICLOUD_REGION`, `ALICLOUD_REGION_ID` will be used instead. aliases: region, region\_id | | **alicloud\_secret\_key** string | | Alibaba Cloud secret key. If not set then the value of environment variable `ALICLOUD_SECRET_KEY`, `ALICLOUD_SECRET_ACCESS_KEY` will be used instead. aliases: secret\_access\_key, secret\_key | | **alicloud\_security\_token** string | | The Alibaba Cloud security token. If not specified then the value of environment variable `ALICLOUD_SECURITY_TOKEN` will be used instead. aliases: security\_token | | **allocate\_public\_ip** boolean | **Choices:*** **no** ← * yes | Whether allocate a public ip for the new instance. aliases: assign\_public\_ip | | **auto\_renew** boolean | **Choices:*** **no** ← * yes | Whether automate renew the charge of the instance. | | **auto\_renew\_period** integer | **Choices:*** 1 * 2 * 3 * 6 * 12 | The duration of the automatic renew the charge of the instance. Required when `auto_renew=True`. | | **availability\_zone** string | | Aliyun availability zone ID in which to launch the instance. If it is not specified, it will be allocated by system automatically. aliases: alicloud\_zone, zone\_id | | **count** integer | **Default:**1 | The number of the new instance. An integer value which indicates how many instances that match *count\_tag* should be running. Instances are either created or terminated based on this value. | | **count\_tag** string | | *count* determines how many instances based on a specific tag criteria should be present. This can be expressed in multiple ways and is shown in the EXAMPLES section. The specified count\_tag must already exist or be passed in as the *tags* option. If it is not specified, it will be replaced by *instance\_name*. | | **description** string | | The description of ECS instance, which is a string of 2 to 256 characters. It cannot begin with http:// or https://. | | **dry\_run** boolean added in 0.2.0 of community.general | **Choices:*** **no** ← * yes | Specifies whether to send a dry-run request. If *dry\_run=True*, Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned. If *dry\_run=False*, A request is sent. If the validation succeeds, the instance is created. | | **ecs\_role\_name** string | | The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console. If you're running Ansible from an ECS instance with RAM Instance using RAM Role, Ansible will just access the metadata [http://100.100.100.200/latest/meta-data/ram/security-credentials/<ecs\_role\_name>](#) to obtain the STS credential. This is a preferred approach over any other when running in ECS as you can avoid hard coding credentials. Instead these are leased on-the-fly by Ansible which reduces the chance of leakage. aliases: role\_name | | **force** boolean | **Choices:*** **no** ← * yes | Whether the current operation needs to be execute forcibly. | | **host\_name** string | | Instance host name. Ordered hostname is not supported. | | **image\_id** string | | Image ID used to launch instances. Required when `state=present` and creating new ECS instances. aliases: image | | **include\_data\_disks** boolean added in 0.2.0 of community.general | **Choices:*** no * **yes** ← | Whether to change instance disks charge type when changing instance charge type. | | **instance\_charge\_type** string | **Choices:*** PrePaid * **PostPaid** ← | The charge type of the instance. | | **instance\_ids** list / elements=string | | A list of instance ids. It is required when need to operate existing instances. If it is specified, *count* will lose efficacy. | | **instance\_name** string | | The name of ECS instance, which is a string of 2 to 128 Chinese or English characters. It must begin with an uppercase/lowercase letter or a Chinese character and can contain numerals, ".", "\_" or "-". It cannot begin with http:// or https://. aliases: name | | **instance\_type** string | | Instance type used to launch instances. Required when `state=present` and creating new ECS instances. aliases: type | | **internet\_charge\_type** string | **Choices:*** **PayByBandwidth** ← * PayByTraffic | Internet charge type of ECS instance. | | **key\_name** string | | The name of key pair which is used to access ECS instance in SSH. aliases: keypair | | **max\_bandwidth\_in** integer | **Default:**200 | Maximum incoming bandwidth from the public network, measured in Mbps (Megabits per second). | | **max\_bandwidth\_out** integer | **Default:**0 | Maximum outgoing bandwidth to the public network, measured in Mbps (Megabits per second). Required when `allocate_public_ip=True`. Ignored when `allocate_public_ip=False`. | | **password** string | | The password to login instance. After rebooting instances, modified password will take effect. | | **period** integer | **Default:**1 | The charge duration of the instance, in month. Required when `instance_charge_type=PrePaid`. The valid value are [1-9, 12, 24, 36]. | | **period\_unit** string added in 0.2.0 of community.general | **Choices:*** **Month** ← * Week | The duration unit that you will buy the resource. It is valid when `instance_charge_type=PrePaid` | | **profile** string | | This is the Alicloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD\_PROFILE environment variable. | | **purge\_tags** boolean added in 0.2.0 of community.general | **Choices:*** **no** ← * yes | Delete any tags not specified in the task that are on the instance. If True, it means you have to specify all the desired tags on each task affecting an instance. | | **ram\_role\_name** string added in 0.2.0 of community.general | | The name of the instance RAM role. | | **security\_groups** list / elements=string | | A list of security group IDs. aliases: group\_ids | | **shared\_credentials\_file** string | | This is the path to the shared credentials file. It can also be sourced from the ALICLOUD\_SHARED\_CREDENTIALS\_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used. | | **spot\_price\_limit** float added in 0.2.0 of community.general | | The maximum hourly price for the preemptible instance. This parameter supports a maximum of three decimal places and takes effect when the SpotStrategy parameter is set to SpotWithPriceLimit. | | **spot\_strategy** string added in 0.2.0 of community.general | **Choices:*** **NoSpot** ← * SpotWithPriceLimit * SpotAsPriceGo | The bidding mode of the pay-as-you-go instance. This parameter is valid when InstanceChargeType is set to PostPaid. | | **state** string | **Choices:*** **present** ← * running * stopped * restarted * absent | The state of the instance after operating. | | **system\_disk\_category** string | **Choices:*** **cloud\_efficiency** ← * cloud\_ssd | Category of the system disk. | | **system\_disk\_description** string | | Description of the system disk. | | **system\_disk\_name** string | | Name of the system disk. | | **system\_disk\_size** integer | **Default:**40 | Size of the system disk, in GB. The valid values are 40~500. | | **tags** dictionary added in 0.2.0 of community.general | | A hash/dictionaries of instance tags, to add to the new instance or for starting/stopping instance by tag. `{"key":"value"}` aliases: instance\_tags | | **unique\_suffix** boolean added in 0.2.0 of community.general | **Choices:*** **no** ← * yes | Specifies whether to add sequential suffixes to the host\_name. The sequential suffix ranges from 001 to 999. | | **user\_data** string | | User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It only will take effect when launching the new ECS instances. | | **vswitch\_id** string | | The subnet ID in which to launch the instances (VPC). aliases: subnet\_id | Notes ----- Note * If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `ALICLOUD_ACCESS_KEY` or `ALICLOUD_ACCESS_KEY_ID`, `ALICLOUD_SECRET_KEY` or `ALICLOUD_SECRET_ACCESS_KEY`, `ALICLOUD_REGION` or `ALICLOUD_REGION_ID`, `ALICLOUD_SECURITY_TOKEN`, `ALICLOUD_ECS_ROLE_NAME`, `ALICLOUD_SHARED_CREDENTIALS_FILE`, `ALICLOUD_PROFILE`, `ALICLOUD_ASSUME_ROLE_ARN`, `ALICLOUD_ASSUME_ROLE_SESSION_NAME`, `ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION`, * `ALICLOUD_REGION` or `ALICLOUD_REGION_ID` can be typically be used to specify the ALICLOUD region, when required, but this can also be configured in the footmark config file Examples -------- ``` # basic provisioning example vpc network - name: Basic provisioning example hosts: localhost vars: alicloud_access_key: <your-alicloud-access-key-id> alicloud_secret_key: <your-alicloud-access-secret-key> alicloud_region: cn-beijing image: ubuntu1404_64_40G_cloudinit_20160727.raw instance_type: ecs.n4.small vswitch_id: vsw-abcd1234 assign_public_ip: True max_bandwidth_out: 10 host_name: myhost password: mypassword system_disk_category: cloud_efficiency system_disk_size: 100 internet_charge_type: PayByBandwidth security_groups: ["sg-f2rwnfh23r"] instance_ids: ["i-abcd12346", "i-abcd12345"] force: True tasks: - name: Launch ECS instance in VPC network community.general.ali_instance: alicloud_access_key: '{{ alicloud_access_key }}' alicloud_secret_key: '{{ alicloud_secret_key }}' alicloud_region: '{{ alicloud_region }}' image: '{{ image }}' system_disk_category: '{{ system_disk_category }}' system_disk_size: '{{ system_disk_size }}' instance_type: '{{ instance_type }}' vswitch_id: '{{ vswitch_id }}' assign_public_ip: '{{ assign_public_ip }}' internet_charge_type: '{{ internet_charge_type }}' max_bandwidth_out: '{{ max_bandwidth_out }}' tags: Name: created_one host_name: '{{ host_name }}' password: '{{ password }}' - name: With count and count_tag to create a number of instances community.general.ali_instance: alicloud_access_key: '{{ alicloud_access_key }}' alicloud_secret_key: '{{ alicloud_secret_key }}' alicloud_region: '{{ alicloud_region }}' image: '{{ image }}' system_disk_category: '{{ system_disk_category }}' system_disk_size: '{{ system_disk_size }}' instance_type: '{{ instance_type }}' assign_public_ip: '{{ assign_public_ip }}' security_groups: '{{ security_groups }}' internet_charge_type: '{{ internet_charge_type }}' max_bandwidth_out: '{{ max_bandwidth_out }}' tags: Name: created_one Version: 0.1 count: 2 count_tag: Name: created_one host_name: '{{ host_name }}' password: '{{ password }}' - name: Start instance community.general.ali_instance: alicloud_access_key: '{{ alicloud_access_key }}' alicloud_secret_key: '{{ alicloud_secret_key }}' alicloud_region: '{{ alicloud_region }}' instance_ids: '{{ instance_ids }}' state: 'running' - name: Reboot instance forcibly ecs: alicloud_access_key: '{{ alicloud_access_key }}' alicloud_secret_key: '{{ alicloud_secret_key }}' alicloud_region: '{{ alicloud_region }}' instance_ids: '{{ instance_ids }}' state: 'restarted' force: '{{ force }}' - name: Add instances to an security group ecs: alicloud_access_key: '{{ alicloud_access_key }}' alicloud_secret_key: '{{ alicloud_secret_key }}' alicloud_region: '{{ alicloud_region }}' instance_ids: '{{ instance_ids }}' security_groups: '{{ security_groups }}' ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **ids** list / elements=string | always | List of ECS instance IDs **Sample:** ['i-12345er', 'i-3245fs'] | | **instances** complex | always | List of ECS instances | | | **availability\_zone** string | always | The availability zone of the instance is in. **Sample:** cn-beijing-a | | | **block\_device\_mappings** complex | always | Any block device mapping entries for the instance. | | | | **attach\_time** string | always | The time stamp when the attachment initiated. **Sample:** 2018-06-25T04:08:26Z | | | | **delete\_on\_termination** boolean | always | Indicates whether the volume is deleted on instance termination. **Sample:** True | | | | **device\_name** string | always | The device name exposed to the instance (for example, /dev/xvda). **Sample:** /dev/xvda | | | | **status** string | always | The attachment state. **Sample:** in\_use | | | | **volume\_id** string | always | The ID of the cloud disk. **Sample:** d-2zei53pjsi117y6gf9t6 | | | **cpu** integer | always | The CPU core count of the instance. **Sample:** 4 | | | **creation\_time** string | always | The time the instance was created. **Sample:** 2018-06-25T04:08Z | | | **description** string | always | The instance description. **Sample:** my ansible instance | | | **eip** complex | always | The attribution of EIP associated with the instance. | | | | **allocation\_id** string | always | The ID of the EIP. **Sample:** eip-12345 | | | | **internet\_charge\_type** string | always | The internet charge type of the EIP. **Sample:** paybybandwidth | | | | **ip\_address** string | always | EIP address. **Sample:** 42.10.2.2 | | | **expired\_time** string | always | The time the instance will expire. **Sample:** 2099-12-31T15:59Z | | | **gpu** complex | always | The attribution of instance GPU. | | | | **amount** integer | always | The count of the GPU. | | | | **spec** string | always | The specification of the GPU. | | | **host\_name** string | always | The host name of the instance. **Sample:** iZ2zewaoZ | | | **id** string | always | Alias of instance\_id. **Sample:** i-abc12345 | | | **image\_id** string | always | The ID of the image used to launch the instance. **Sample:** m-0011223344 | | | **inner\_ip\_address** string | always | The inner IPv4 address of the classic instance. **Sample:** 10.0.0.2 | | | **instance\_charge\_type** string | always | The instance charge type. **Sample:** PostPaid | | | **instance\_id** string | always | ECS instance resource ID. **Sample:** i-abc12345 | | | **instance\_name** string | always | The name of the instance. **Sample:** my-ecs | | | **instance\_type** string | always | The instance type of the running instance. **Sample:** ecs.sn1ne.xlarge | | | **instance\_type\_family** string | always | The instance type family of the instance belongs. **Sample:** ecs.sn1ne | | | **internet\_charge\_type** string | always | The billing method of the network bandwidth. **Sample:** PayByBandwidth | | | **internet\_max\_bandwidth\_in** integer | always | Maximum incoming bandwidth from the internet network. **Sample:** 200 | | | **internet\_max\_bandwidth\_out** integer | always | Maximum incoming bandwidth from the internet network. **Sample:** 20 | | | **io\_optimized** boolean | always | Indicates whether the instance is optimized for EBS I/O. | | | **memory** integer | always | Memory size of the instance. **Sample:** 8192 | | | **network\_interfaces** complex | always | One or more network interfaces for the instance. | | | | **mac\_address** string | always | The MAC address. **Sample:** 00:11:22:33:44:55 | | | | **network\_interface\_id** string | always | The ID of the network interface. **Sample:** eni-01234567 | | | | **primary\_ip\_address** string | always | The primary IPv4 address of the network interface within the vswitch. **Sample:** 10.0.0.1 | | | **osname** string | always | The operation system name of the instance owned. **Sample:** CentOS | | | **ostype** string | always | The operation system type of the instance owned. **Sample:** linux | | | **private\_ip\_address** string | always | The IPv4 address of the network interface within the subnet. **Sample:** 10.0.0.1 | | | **public\_ip\_address** string | always | The public IPv4 address assigned to the instance or eip address **Sample:** 43.0.0.1 | | | **resource\_group\_id** string | always | The id of the resource group to which the instance belongs. **Sample:** my-ecs-group | | | **security\_groups** list / elements=dictionary | always | One or more security groups for the instance. | | | | **group\_id** string | always | The ID of the security group. **Sample:** sg-0123456 | | | | **group\_name** string | always | The name of the security group. **Sample:** my-security-group | | | **spot\_price\_limit** float | always | The maximum hourly price for the preemptible instance. **Sample:** 0.97 | | | **spot\_strategy** string | always | The bidding mode of the pay-as-you-go instance. **Sample:** NoSpot | | | **status** string | always | The current status of the instance. **Sample:** running | | | **tags** dictionary | always | Any tags assigned to the instance. | | | **user\_data** dictionary | always | User-defined data. | | | **vpc\_id** string | always | The ID of the VPC the instance is in. **Sample:** vpc-0011223344 | | | **vswitch\_id** string | always | The ID of the vswitch in which the instance is running. **Sample:** vsw-dew00abcdef | ### Authors * He Guimin (@xiaozhu36)
programming_docs
ansible community.general.nios_dns_view – Configure Infoblox NIOS DNS views community.general.nios\_dns\_view – Configure Infoblox NIOS DNS views ===================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nios_dns_view`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Status](#status) DEPRECATED ---------- Removed in version 5.0.0 Why Please install the infoblox.nios\_modules collection and use the corresponding module from it. Alternative infoblox.nios\_modules.nios\_dns\_view Synopsis -------- * Adds and/or removes instances of DNS view objects from Infoblox NIOS servers. This module manages NIOS `view` objects using the Infoblox WAPI interface over REST. * Updates instances of DNS view object from Infoblox NIOS servers. Requirements ------------ The below requirements are needed on the host that executes this module. * infoblox-client Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **comment** string | | Configures a text string comment to be associated with the instance of this object. The provided text string will be configured on the object instance. | | **extattrs** dictionary | | Allows for the configuration of Extensible Attributes on the instance of the object. This argument accepts a set of key / value pairs for configuration. | | **name** string / required | | Specifies the fully qualified hostname to add or remove from the system. User can also update the hostname as it is possible to pass a dict containing *new\_name*, *old\_name*. See examples. aliases: view | | **network\_view** string | **Default:**"default" | Specifies the name of the network view to assign the configured DNS view to. The network view must already be configured on the target system. | | **provider** dictionary | | A dict object containing connection details. | | | **host** string | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. | | | **http\_pool\_connections** integer | **Default:**10 | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_pool\_maxsize** integer | **Default:**10 | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_request\_timeout** integer | **Default:**10 | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. | | | **max\_results** integer | **Default:**1000 | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. | | | **max\_retries** integer | **Default:**3 | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. | | | **password** string | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. | | | **silent\_ssl\_warnings** boolean | **Choices:*** no * **yes** ← | Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **username** string | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. | | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable. aliases: ssl\_verify | | | **wapi\_version** string | **Default:**"2.1" | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 | | **state** string | **Choices:*** **present** ← * absent | Configures the intended state of the instance of the object on the NIOS server. When this value is set to `present`, the object is configured on the device and when this value is set to `absent` the value is removed (if necessary) from the device. | Notes ----- Note * This module must be run locally, which can be achieved by specifying `connection: local`. * Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible. Examples -------- ``` - name: Configure a new dns view instance community.general.nios_dns_view: name: ansible-dns state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Update the comment for dns view community.general.nios_dns_view: name: ansible-dns comment: this is an example comment state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Remove the dns view instance community.general.nios_dns_view: name: ansible-dns state: absent provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Update the dns view instance community.general.nios_dns_view: name: {new_name: ansible-dns-new, old_name: ansible-dns} state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local ``` Status ------ * This module will be removed in version 5.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Peter Sprygada (@privateip) ansible community.general.stacki_host – Add or remove host to stacki front-end community.general.stacki\_host – Add or remove host to stacki front-end ======================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.stacki_host`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Use this module to add or remove hosts to a stacki front-end via API. * Information on stacki can be found at <https://github.com/StackIQ/stacki>. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **appliance** string | **Default:**"backend" | Applicance to be used in host creation. Required if *state* is `present` and host does not yet exist. | | **force\_install** boolean | **Choices:*** **no** ← * yes | Set value to `true` to force node into install state if it already exists in stacki. | | **name** string / required | | Name of the host to be added to Stacki. | | **network** string | **Default:**"private" | Network to be configured in the host. Currently not used by the module. | | **prim\_intf** string | | Name of the primary network interface. Currently not used by the module. | | **prim\_intf\_ip** string | | IP Address for the primary network interface. Currently not used by the module. | | **prim\_intf\_mac** string | | MAC Address for the primary PXE boot network interface. Currently not used by the module. | | **rack** integer | | Rack to be used in host creation. Required if *state* is `present` and host does not yet exist. | | **rank** integer | | Rank to be used in host creation. In Stacki terminology, the rank is the position of the machine in a rack. Required if *state* is `present` and host does not yet exist. | | **stacki\_endpoint** string / required | | URL for the Stacki API Endpoint. | | **stacki\_password** string / required | | Password for authenticating with Stacki API, but if not specified, the environment variable `stacki_password` is used instead. | | **stacki\_user** string / required | | Username for authenticating with Stacki API, but if not specified, the environment variable `stacki_user` is used instead. | | **state** string | **Choices:*** absent * **present** ← | Set value to the desired state for the specified host. | Examples -------- ``` - name: Add a host named test-1 community.general.stacki_host: name: test-1 stacki_user: usr stacki_password: pwd stacki_endpoint: url prim_intf_mac: mac_addr prim_intf_ip: x.x.x.x prim_intf: eth0 - name: Remove a host named test-1 community.general.stacki_host: name: test-1 stacki_user: usr stacki_password: pwd stacki_endpoint: url state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **changed** boolean | always | response to whether or not the api call completed successfully **Sample:** True | | **stdout** list / elements=string | always | the set of responses from the commands **Sample:** ['...', '...'] | | **stdout\_lines** list / elements=string | always | the value of stdout split into a list **Sample:** [['...', '...'], ['...'], ['...']] | ### Authors * Hugh Ma (@bbyhuy) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#59112c3e317f7a6d6f6214387f7a6a6e627f7a6c6b627f7a6d61623f353c212d2b3637303a2a7f7a6d6f623a3634)> ansible community.general.capabilities – Manage Linux capabilities community.general.capabilities – Manage Linux capabilities ========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.capabilities`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module manipulates files privileges using the Linux capabilities(7) system. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **capability** string / required | | Desired capability to set (with operator and flags, if state is `present`) or remove (if state is `absent`) aliases: cap | | **path** string / required | | Specifies the path to the file to be managed. aliases: key | | **state** string | **Choices:*** absent * **present** ← | Whether the entry should be present or absent in the file's capabilities. | Notes ----- Note * The capabilities system will automatically transform operators and flags into the effective set, so for example, `cap_foo=ep` will probably become `cap_foo+ep`. * This module does not attempt to determine the final operator and flags to compare, so you will want to ensure that your capabilities argument matches the final capabilities. Examples -------- ``` - name: Set cap_sys_chroot+ep on /foo community.general.capabilities: path: /foo capability: cap_sys_chroot+ep state: present - name: Remove cap_net_bind_service from /bar community.general.capabilities: path: /bar capability: cap_net_bind_service state: absent ``` ### Authors * Nate Coraor (@natefoo) ansible community.general.flattened – return single list completely flattened community.general.flattened – return single list completely flattened ===================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.flattened`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * given one or more lists, this lookup will flatten any list elements found recursively until only 1 list is left. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **\_terms** string / required | | | lists to flatten | Notes ----- Note * unlike ‘items’ which only flattens 1 level, this plugin will continue to flatten until it cannot find lists anymore. * aka highlander plugin, there can only be one (list). Examples -------- ``` - name: "'unnest' all elements into single list" ansible.builtin.debug: msg: "all in one list {{lookup('community.general.flattened', [1,2,3,[5,6]], [a,b,c], [[5,6,1,3], [34,a,b,c]])}}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **\_raw** list / elements=string | success | flattened list | ### Authors * Serge van Ginderachter (!UNKNOWN) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#116274637674373222262a373224232a373225292a67707f76787f757463707279657463373225272a7374)> ansible community.general.oneview_network_set – Manage HPE OneView Network Set resources community.general.oneview\_network\_set – Manage HPE OneView Network Set resources ================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneview_network_set`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Provides an interface to manage Network Set resources. Can create, update, or delete. Requirements ------------ The below requirements are needed on the host that executes this module. * hpOneView >= 4.0.0 * python >= 2.7.9 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_version** integer | | OneView API Version. | | **config** path | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional and when used should be present in the host running the ansible commands. If the file path is not provided, the configuration will be loaded from environment variables. For links to example configuration files or how to use the environment variables verify the notes section. | | **data** dictionary / required | | List with the Network Set properties. | | **hostname** string | | IP address or hostname for the appliance. | | **image\_streamer\_hostname** string | | IP address or hostname for the HPE Image Streamer REST API. | | **password** string | | Password for API authentication. | | **state** string | **Choices:*** **present** ← * absent | Indicates the desired state for the Network Set resource. - `present` will ensure data properties are compliant with OneView. - `absent` will remove the resource from OneView, if it exists. | | **username** string | | Username for API authentication. | | **validate\_etag** boolean | **Choices:*** no * **yes** ← | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. | Notes ----- Note * A sample configuration file for the config parameter can be found at: <https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json> * Check how to use environment variables for configuration at: <https://github.com/HewlettPackard/oneview-ansible#environment-variables> * Additional Playbooks for the HPE OneView Ansible modules can be found at: <https://github.com/HewlettPackard/oneview-ansible/tree/master/examples> * The OneView API version used will directly affect returned and expected fields in resources. Information on setting the desired API version and can be found at: <https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version> Examples -------- ``` - name: Create a Network Set community.general.oneview_network_set: config: /etc/oneview/oneview_config.json state: present data: name: OneViewSDK Test Network Set networkUris: - Test Ethernet Network_1 # can be a name - /rest/ethernet-networks/e4360c9d-051d-4931-b2aa-7de846450dd8 # or a URI delegate_to: localhost - name: Update the Network Set name to 'OneViewSDK Test Network Set - Renamed' and change the associated networks community.general.oneview_network_set: config: /etc/oneview/oneview_config.json state: present data: name: OneViewSDK Test Network Set newName: OneViewSDK Test Network Set - Renamed networkUris: - Test Ethernet Network_1 delegate_to: localhost - name: Delete the Network Set community.general.oneview_network_set: config: /etc/oneview/oneview_config.json state: absent data: name: OneViewSDK Test Network Set - Renamed delegate_to: localhost - name: Update the Network set with two scopes community.general.oneview_network_set: config: /etc/oneview/oneview_config.json state: present data: name: OneViewSDK Test Network Set scopeUris: - /rest/scopes/01SC123456 - /rest/scopes/02SC123456 delegate_to: localhost ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **network\_set** dictionary | On state 'present', but can be null. | Has the facts about the Network Set. | ### Authors * Felipe Bulsoni (@fgbulsoni) * Thiago Miotto (@tmiotto) * Adriane Cardozo (@adriane-cardozo)
programming_docs
ansible community.general.gitlab_user – Creates/updates/deletes/blocks/unblocks GitLab Users community.general.gitlab\_user – Creates/updates/deletes/blocks/unblocks GitLab Users ===================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.gitlab_user`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * When the user does not exist in GitLab, it will be created. * When the user exists and state=absent, the user will be deleted. * When the user exists and state=blocked, the user will be blocked. * When changes are made to user, the user will be updated. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * python-gitlab python module * administrator rights on the GitLab server Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **access\_level** string | **Choices:*** **guest** ← * reporter * developer * master * maintainer * owner | The access level to the group. One of the following can be used. guest reporter developer master (alias for maintainer) maintainer owner | | **api\_password** string | | The password to use for authentication against the API | | **api\_token** string | | GitLab token for logging in. | | **api\_url** string | | The resolvable endpoint for the API | | **api\_username** string | | The username to use for authentication against the API | | **confirm** boolean | **Choices:*** no * **yes** ← | Require confirmation. | | **email** string | | The email that belongs to the user. Required only if `state` is set to `present`. | | **external** boolean | **Choices:*** **no** ← * yes | Define external parameter for this user. | | **group** string | | Id or Full path of parent group in the form of group/name. Add user as a member to this group. | | **identities** list / elements=dictionary added in 3.3.0 of community.general | | List of identities to be added/updated for this user. To remove all other identities from this user, set *overwrite\_identities=true*. | | | **extern\_uid** string | | User ID for external identity. | | | **provider** string | | The name of the external identity provider | | **isadmin** boolean | **Choices:*** **no** ← * yes | Grant admin privileges to the user. | | **name** string | | Name of the user you want to create. Required only if `state` is set to `present`. | | **overwrite\_identities** boolean added in 3.3.0 of community.general | **Choices:*** **no** ← * yes | Overwrite identities with identities added in this module. This means that all identities that the user has and that are not listed in *identities* are removed from the user. This is only done if a list is provided for *identities*. To remove all identities, provide an empty list. | | **password** string | | The password of the user. GitLab server enforces minimum password length to 8, set this value with 8 or more characters. Required only if `state` is set to `present`. | | **reset\_password** boolean added in 3.3.0 of community.general | **Choices:*** **no** ← * yes | Whether the user can change its password or not. | | **sshkey\_expires\_at** string added in 3.1.0 of community.general | | The expiration date of the SSH public key in ISO 8601 format `YYYY-MM-DDTHH:MM:SSZ`. This is only used when adding new SSH public keys. | | **sshkey\_file** string | | The SSH public key itself. | | **sshkey\_name** string | | The name of the SSH public key. | | **state** string | **Choices:*** **present** ← * absent * blocked * unblocked | Create, delete or block a user. | | **username** string / required | | The username of the user. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether or not to validate SSL certs when supplying a https endpoint. | Notes ----- Note * From community.general 0.2.0 and onwards, name, email and password are optional while deleting the user. Examples -------- ``` - name: "Delete GitLab User" community.general.gitlab_user: api_url: https://gitlab.example.com/ api_token: "{{ access_token }}" validate_certs: False username: myusername state: absent - name: "Create GitLab User" community.general.gitlab_user: api_url: https://gitlab.example.com/ validate_certs: True api_username: dj-wasabi api_password: "MySecretPassword" name: My Name username: myusername password: mysecretpassword email: [email protected] sshkey_name: MySSH sshkey_file: ssh-rsa AAAAB3NzaC1yc... state: present group: super_group/mon_group access_level: owner - name: "Create GitLab User using external identity provider" community.general.gitlab_user: api_url: https://gitlab.example.com/ validate_certs: True api_token: "{{ access_token }}" name: My Name username: myusername password: mysecretpassword email: [email protected] identities: - provider: Keycloak extern_uid: f278f95c-12c7-4d51-996f-758cc2eb11bc state: present group: super_group/mon_group access_level: owner - name: "Block GitLab User" community.general.gitlab_user: api_url: https://gitlab.example.com/ api_token: "{{ access_token }}" validate_certs: False username: myusername state: blocked - name: "Unblock GitLab User" community.general.gitlab_user: api_url: https://gitlab.example.com/ api_token: "{{ access_token }}" validate_certs: False username: myusername state: unblocked ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **error** string | failed | the error message returned by the GitLab API **Sample:** 400: path is already in use | | **msg** string | always | Success or failure message **Sample:** Success | | **result** dictionary | always | json parsed response from the server | | **user** dictionary | always | API object | ### Authors * Werner Dijkerman (@dj-wasabi) * Guillaume Martinez (@Lunik) * Lennert Mertens (@LennertMertens) * Stef Graces (@stgrace) ansible community.general.hwc_vpc_eip – Creates a resource of Vpc/EIP in Huawei Cloud community.general.hwc\_vpc\_eip – Creates a resource of Vpc/EIP in Huawei Cloud =============================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.hwc_vpc_eip`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * elastic ip management. Requirements ------------ The below requirements are needed on the host that executes this module. * keystoneauth1 >= 3.6.0 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **dedicated\_bandwidth** dictionary | | Specifies the dedicated bandwidth object. | | | **charge\_mode** string / required | | Specifies whether the bandwidth is billed by traffic or by bandwidth size. The value can be bandwidth or traffic. If this parameter is left blank or is null character string, default value bandwidth is used. For IPv6 addresses, the default parameter value is bandwidth outside China and is traffic in China. | | | **name** string / required | | Specifies the bandwidth name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores `_`, hyphens (-), and periods (.). | | | **size** integer / required | | Specifies the bandwidth size. The value ranges from 1 Mbit/s to 2000 Mbit/s by default. (The specific range may vary depending on the configuration in each region. You can see the bandwidth range of each region on the management console.) The minimum unit for bandwidth adjustment varies depending on the bandwidth range. The details are as follows. The minimum unit is 1 Mbit/s if the allowed bandwidth size ranges from 0 to 300 Mbit/s (with 300 Mbit/s included). The minimum unit is 50 Mbit/s if the allowed bandwidth size ranges 300 Mbit/s to 1000 Mbit/s (with 1000 Mbit/s included). The minimum unit is 500 Mbit/s if the allowed bandwidth size is greater than 1000 Mbit/s. | | **domain** string / required | | The name of the Domain to scope to (Identity v3). (currently only domain names are supported, and not domain IDs). | | **enterprise\_project\_id** string | | Specifies the enterprise project ID. | | **id** string | | The id of resource to be managed. | | **identity\_endpoint** string / required | | The Identity authentication URL. | | **ip\_version** integer | | The value can be 4 (IPv4 address) or 6 (IPv6 address). If this parameter is left blank, an IPv4 address will be assigned. | | **ipv4\_address** string | | Specifies the obtained IPv4 EIP. The system automatically assigns an EIP if you do not specify it. | | **password** string / required | | The password to login with. | | **port\_id** string | | Specifies the port ID. This parameter is returned only when a private IP address is bound with the EIP. | | **project** string / required | | The name of the Tenant (Identity v2) or Project (Identity v3). (currently only project names are supported, and not project IDs). | | **region** string | | The region to which the project belongs. | | **shared\_bandwidth\_id** string | | Specifies the ID of shared bandwidth. | | **state** string | **Choices:*** **present** ← * absent | Whether the given object should exist in Huawei Cloud. | | **timeouts** dictionary | | The timeouts for each operations. | | | **create** string | **Default:**"5m" | The timeouts for create operation. | | | **update** string | **Default:**"5m" | The timeouts for update operation. | | **type** string / required | | Specifies the EIP type. | | **user** string / required | | The user name to login with (currently only user names are supported, and not user IDs). | Notes ----- Note * For authentication, you can set identity\_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT` env variable. * For authentication, you can set user using the `ANSIBLE_HWC_USER` env variable. * For authentication, you can set password using the `ANSIBLE_HWC_PASSWORD` env variable. * For authentication, you can set domain using the `ANSIBLE_HWC_DOMAIN` env variable. * For authentication, you can set project using the `ANSIBLE_HWC_PROJECT` env variable. * For authentication, you can set region using the `ANSIBLE_HWC_REGION` env variable. * Environment variables values will only be used if the playbook values are not set. Examples -------- ``` # create an eip and bind it to a port - name: Create vpc hwc_network_vpc: cidr: "192.168.100.0/24" name: "ansible_network_vpc_test" register: vpc - name: Create subnet hwc_vpc_subnet: gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" dhcp_enable: True vpc_id: "{{ vpc.id }}" cidr: "192.168.100.0/26" register: subnet - name: Create a port hwc_vpc_port: subnet_id: "{{ subnet.id }}" ip_address: "192.168.100.33" register: port - name: Create an eip and bind it to a port community.general.hwc_vpc_eip: type: "5_bgp" dedicated_bandwidth: charge_mode: "traffic" name: "ansible_test_dedicated_bandwidth" size: 1 port_id: "{{ port.id }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **create\_time** string | success | Specifies the time (UTC time) when the EIP was assigned. | | **dedicated\_bandwidth** dictionary | success | Specifies the dedicated bandwidth object. | | | **charge\_mode** string | success | Specifies whether the bandwidth is billed by traffic or by bandwidth size. The value can be bandwidth or traffic. If this parameter is left blank or is null character string, default value bandwidth is used. For IPv6 addresses, the default parameter value is bandwidth outside China and is traffic in China. | | | **id** string | success | Specifies the ID of dedicated bandwidth. | | | **name** string | success | Specifies the bandwidth name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores `_`, hyphens (-), and periods (.). | | | **size** integer | success | Specifies the bandwidth size. The value ranges from 1 Mbit/s to 2000 Mbit/s by default. (The specific range may vary depending on the configuration in each region. You can see the bandwidth range of each region on the management console.) The minimum unit for bandwidth adjustment varies depending on the bandwidth range. The details are as follows:. The minimum unit is 1 Mbit/s if the allowed bandwidth size ranges from 0 to 300 Mbit/s (with 300 Mbit/s included). The minimum unit is 50 Mbit/s if the allowed bandwidth size ranges 300 Mbit/s to 1000 Mbit/s (with 1000 Mbit/s included). The minimum unit is 500 Mbit/s if the allowed bandwidth size is greater than 1000 Mbit/s. | | **enterprise\_project\_id** string | success | Specifies the enterprise project ID. | | **ip\_version** integer | success | The value can be 4 (IPv4 address) or 6 (IPv6 address). If this parameter is left blank, an IPv4 address will be assigned. | | **ipv4\_address** string | success | Specifies the obtained IPv4 EIP. The system automatically assigns an EIP if you do not specify it. | | **ipv6\_address** string | success | Specifies the obtained IPv6 EIP. | | **port\_id** string | success | Specifies the port ID. This parameter is returned only when a private IP address is bound with the EIP. | | **private\_ip\_address** string | success | Specifies the private IP address bound with the EIP. This parameter is returned only when a private IP address is bound with the EIP. | | **shared\_bandwidth\_id** string | success | Specifies the ID of shared bandwidth. | | **type** string | success | Specifies the EIP type. | ### Authors * Huawei Inc. (@huaweicloud) ansible community.general.nginx_status_info – Retrieve information on nginx status. community.general.nginx\_status\_info – Retrieve information on nginx status. ============================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nginx_status_info`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Gathers information from nginx from an URL having `stub_status` enabled. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **timeout** integer | **Default:**10 | HTTP connection timeout in seconds. | | **url** string / required | | URL of the nginx status. | Notes ----- Note * See <http://nginx.org/en/docs/http/ngx_http_stub_status_module.html> for more information. Examples -------- ``` # Gather status info from nginx on localhost - name: Get current http stats community.general.nginx_status_info: url: http://localhost/nginx_status register: result # Gather status info from nginx on localhost with a custom timeout of 20 seconds - name: Get current http stats community.general.nginx_status_info: url: http://localhost/nginx_status timeout: 20 register: result ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **accepts** integer | success | The total number of accepted client connections. **Sample:** 81769947 | | **active\_connections** integer | success | Active connections. **Sample:** 2340 | | **data** string | success | HTTP response as is. **Sample:** Active connections: 2340 server accepts handled requests 81769947 81769947 144332345 Reading: 0 Writing: 241 Waiting: 2092 | | **handled** integer | success | The total number of handled connections. Generally, the parameter value is the same as accepts unless some resource limits have been reached. **Sample:** 81769947 | | **reading** integer | success | The current number of connections where nginx is reading the request header. | | **requests** integer | success | The total number of client requests. **Sample:** 144332345 | | **waiting** integer | success | The current number of idle client connections waiting for a request. **Sample:** 2092 | | **writing** integer | success | The current number of connections where nginx is writing the response back to the client. **Sample:** 241 | ### Authors * René Moser (@resmo) ansible community.general.alternatives – Manages alternative programs for common commands community.general.alternatives – Manages alternative programs for common commands ================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.alternatives`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manages symbolic links using the ‘update-alternatives’ tool. * Useful when multiple programs are installed but provide similar functionality (e.g. different editors). Requirements ------------ The below requirements are needed on the host that executes this module. * update-alternatives Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **link** path | | The path to the symbolic link that should point to the real executable. This option is always required on RHEL-based distributions. On Debian-based distributions this option is required when the alternative *name* is unknown to the system. | | **name** string / required | | The generic name of the link. | | **path** path / required | | The path to the real executable that the link should point to. | | **priority** integer | **Default:**50 | The priority of the alternative. | Examples -------- ``` - name: Correct java version selected community.general.alternatives: name: java path: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java - name: Alternatives link created community.general.alternatives: name: hadoop-conf link: /etc/hadoop/conf path: /etc/hadoop/conf.ansible - name: Make java 32 bit an alternative with low priority community.general.alternatives: name: java path: /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java priority: -10 ``` ### Authors * David Wittman (@DavidWittman) * Gabe Mulley (@mulby)
programming_docs
ansible community.general.webfaction_db – Add or remove a database on Webfaction community.general.webfaction\_db – Add or remove a database on Webfaction ========================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.webfaction_db`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Add or remove a database on a Webfaction host. Further documentation at <https://github.com/quentinsf/ansible-webfaction>. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **login\_name** string / required | | The webfaction account to use | | **login\_password** string / required | | The webfaction password to use | | **machine** string | | The machine name to use (optional for accounts with only one machine) | | **name** string / required | | The name of the database | | **password** string | | The password for the new database user. | | **state** string | **Choices:*** **present** ← * absent | Whether the database should exist | | **type** string / required | **Choices:*** mysql * postgresql | The type of database to create. | Notes ----- Note * You can run playbooks that use this on a local machine, or on a Webfaction host, or elsewhere, since the scripts use the remote webfaction API. The location is not important. However, running them on multiple hosts *simultaneously* is best avoided. If you don’t specify *localhost* as your host, you may want to add `serial: 1` to the plays. * See [the webfaction API](https://docs.webfaction.com/xmlrpc-api/) for more info. Examples -------- ``` # This will also create a default DB user with the same # name as the database, and the specified password. - name: Create a database community.general.webfaction_db: name: "{{webfaction_user}}_db1" password: mytestsql type: mysql login_name: "{{webfaction_user}}" login_password: "{{webfaction_passwd}}" machine: "{{webfaction_machine}}" # Note that, for symmetry's sake, deleting a database using # 'state: absent' will also delete the matching user. ``` ### Authors * Quentin Stafford-Fraser (@quentinsf) ansible community.general.crypttab – Encrypted Linux block devices community.general.crypttab – Encrypted Linux block devices ========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.crypttab`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Control Linux encrypted block devices that are set up during system boot in `/etc/crypttab`. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **backing\_device** string | | Path to the underlying block device or file, or the UUID of a block-device prefixed with *UUID=*. | | **name** string / required | | Name of the encrypted block device as it appears in the `/etc/crypttab` file, or optionally prefixed with `/dev/mapper/`, as it appears in the filesystem. */dev/mapper/* will be stripped from *name*. | | **opts** string | | A comma-delimited list of options. See `crypttab(5` ) for details. | | **password** path | | Encryption password, the path to a file containing the password, or `-` or unset if the password should be entered at boot. | | **path** path | **Default:**"/etc/crypttab" | Path to file to use instead of `/etc/crypttab`. This might be useful in a chroot environment. | | **state** string / required | **Choices:*** absent * opts\_absent * opts\_present * present | Use *present* to add a line to `/etc/crypttab` or update its definition if already present. Use *absent* to remove a line with matching *name*. Use *opts\_present* to add options to those already present; options with different values will be updated. Use *opts\_absent* to remove options from the existing set. | Examples -------- ``` - name: Set the options explicitly a device which must already exist community.general.crypttab: name: luks-home state: present opts: discard,cipher=aes-cbc-essiv:sha256 - name: Add the 'discard' option to any existing options for all devices community.general.crypttab: name: '{{ item.device }}' state: opts_present opts: discard loop: '{{ ansible_mounts }}' when: "'/dev/mapper/luks-' in {{ item.device }}" ``` ### Authors * Steve (@groks) ansible community.general.ipmi_boot – Management of order of boot devices community.general.ipmi\_boot – Management of order of boot devices ================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ipmi_boot`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Use this module to manage order of boot devices Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * pyghmi Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **bootdev** string / required | **Choices:*** network * floppy * hd * safe * optical * setup * default | Set boot device to use on next reboot The choices for the device are: - network -- Request network boot - floppy -- Boot from floppy - hd -- Boot from hard drive - safe -- Boot from hard drive, requesting 'safe mode' - optical -- boot from CD/DVD/BD drive - setup -- Boot into setup utility - default -- remove any IPMI directed boot device request | | **name** string / required | | Hostname or ip address of the BMC. | | **password** string / required | | Password to connect to the BMC. | | **persistent** boolean | **Choices:*** **no** ← * yes | If set, ask that system firmware uses this device beyond next boot. Be aware many systems do not honor this. | | **port** integer | **Default:**623 | Remote RMCP port. | | **state** string | **Choices:*** **present** ← * absent | Whether to ensure that boot devices is desired. The choices for the state are: - present -- Request system turn on - absent -- Request system turn on | | **uefiboot** boolean | **Choices:*** **no** ← * yes | If set, request UEFI boot explicitly. Strictly speaking, the spec suggests that if not set, the system should BIOS boot and offers no "don't care" option. In practice, this flag not being set does not preclude UEFI boot on any system I've encountered. | | **user** string / required | | Username to use to connect to the BMC. | Examples -------- ``` - name: Ensure bootdevice is HD community.general.ipmi_boot: name: test.testdomain.com user: admin password: password bootdev: hd - name: Ensure bootdevice is not Network community.general.ipmi_boot: name: test.testdomain.com user: admin password: password bootdev: network state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **bootdev** string | success | The boot device name which will be used beyond next boot. **Sample:** default | | **persistent** boolean | success | If True, system firmware will use this device beyond next boot. | | **uefimode** boolean | success | If True, system firmware will use UEFI boot explicitly beyond next boot. | ### Authors * Bulat Gaifullin (@bgaifullin) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#d7b0b6beb1a2bbbbbeb9b5b1f1f4e4e0ecf1f4e2e5ecf1f4e3efecb0bab6bebbf1f4e3e1ecb4b8ba)> ansible community.general.funcd – Use funcd to connect to target community.general.funcd – Use funcd to connect to target ======================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.funcd`. * [Synopsis](#synopsis) * [Parameters](#parameters) Synopsis -------- * This transport permits you to use Ansible over Func. * For people who have already setup func and that wish to play with ansible, this permit to move gradually to ansible without having to redo completely the setup of the network. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **remote\_addr** string | **Default:**"inventory\_hostname" | var: ansible\_host var: ansible\_func\_host | The path of the chroot you want to access. | ### Authors * Michael Scherer (@mscherer) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#f19c988292d7d2c2c6cad7d2c4c3cad7d2c5c9ca8b908393d7d2c5c7ca9e8396)> ansible community.general.rhsm_release – Set or Unset RHSM Release version community.general.rhsm\_release – Set or Unset RHSM Release version =================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rhsm_release`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Sets or unsets the release version used by RHSM repositories. Requirements ------------ The below requirements are needed on the host that executes this module. * Red Hat Enterprise Linux 6+ with subscription-manager installed Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **release** string / required | | RHSM release version to use (use null to unset) | Notes ----- Note * This module will fail on an unregistered system. Use the `redhat_subscription` module to register a system prior to setting the RHSM release. Examples -------- ``` # Set release version to 7.1 - name: Set RHSM release version community.general.rhsm_release: release: "7.1" # Set release version to 6Server - name: Set RHSM release version community.general.rhsm_release: release: "6Server" # Unset release version - name: Unset RHSM release release community.general.rhsm_release: release: null ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **current\_release** string | success | The current RHSM release version value | ### Authors * Sean Myers (@seandst) ansible community.general.statusio_maintenance – Create maintenance windows for your status.io dashboard community.general.statusio\_maintenance – Create maintenance windows for your status.io dashboard ================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.statusio_maintenance`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Creates a maintenance window for status.io * Deletes a maintenance window for status.io Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **all\_infrastructure\_affected** boolean | **Choices:*** **no** ← * yes | If it affects all components and containers | | **api\_id** string / required | | Your unique API ID from status.io | | **api\_key** string / required | | Your unique API Key from status.io | | **automation** boolean | **Choices:*** **no** ← * yes | Automatically start and end the maintenance window | | **components** list / elements=string | | The given name of your component (server name) aliases: component | | **containers** list / elements=string | | The given name of your container (data center) aliases: container | | **desc** string | **Default:**"Created by Ansible" | Message describing the maintenance window | | **maintenance\_id** string | | The maintenance id number when deleting a maintenance window | | **maintenance\_notify\_1\_hr** boolean | **Choices:*** **no** ← * yes | Notify subscribers 1 hour before maintenance start time | | **maintenance\_notify\_24\_hr** boolean | **Choices:*** **no** ← * yes | Notify subscribers 24 hours before maintenance start time | | **maintenance\_notify\_72\_hr** boolean | **Choices:*** **no** ← * yes | Notify subscribers 72 hours before maintenance start time | | **maintenance\_notify\_now** boolean | **Choices:*** **no** ← * yes | Notify subscribers now | | **minutes** integer | **Default:**10 | The length of time in UTC that the maintenance will run (starting from playbook runtime) | | **start\_date** string | | Date maintenance is expected to start (Month/Day/Year) (UTC) End Date is worked out from start\_date + minutes | | **start\_time** string | | Time maintenance is expected to start (Hour:Minutes) (UTC) End Time is worked out from start\_time + minutes | | **state** string | **Choices:*** **present** ← * absent | Desired state of the package. | | **statuspage** string / required | | Your unique StatusPage ID from status.io | | **title** string | **Default:**"A new maintenance window" | A descriptive title for the maintenance window | | **url** string | **Default:**"https://api.status.io" | Status.io API URL. A private apiary can be used instead. | Notes ----- Note * You can use the apiary API url (<http://docs.statusio.apiary.io/>) to capture API traffic * Use start\_date and start\_time with minutes to set future maintenance window Examples -------- ``` - name: Create a maintenance window for 10 minutes on server1, with automation to stop the maintenance community.general.statusio_maintenance: title: Router Upgrade from ansible desc: Performing a Router Upgrade components: server1.example.com api_id: api_id api_key: api_key statuspage: statuspage_id maintenance_notify_1_hr: True automation: True - name: Create a maintenance window for 60 minutes on server1 and server2 community.general.statusio_maintenance: title: Routine maintenance desc: Some security updates components: - server1.example.com - server2.example.com minutes: 60 api_id: api_id api_key: api_key statuspage: statuspage_id maintenance_notify_1_hr: True automation: True delegate_to: localhost - name: Create a future maintenance window for 24 hours to all hosts inside the Primary Data Center community.general.statusio_maintenance: title: Data center downtime desc: Performing a Upgrade to our data center components: Primary Data Center api_id: api_id api_key: api_key statuspage: statuspage_id start_date: 01/01/2016 start_time: 12:00 minutes: 1440 - name: Delete a maintenance window community.general.statusio_maintenance: title: Remove a maintenance window maintenance_id: 561f90faf74bc94a4700087b statuspage: statuspage_id api_id: api_id api_key: api_key state: absent ``` ### Authors * Benjamin Copeland (@bhcopeland) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#5032353e767363676b767365626b767364686b333f20353c313e34767364666b3d35767364666b253b)> ansible community.general.tss – Get secrets from Thycotic Secret Server community.general.tss – Get secrets from Thycotic Secret Server =============================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.tss`. New in version 1.0.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Uses the Thycotic Secret Server Python SDK to get Secrets from Secret Server using token authentication with *username* and *password* on the REST API at *base\_url*. Requirements ------------ The below requirements are needed on the local controller node that executes this lookup. * python-tss-sdk - <https://pypi.org/project/python-tss-sdk/> Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **\_terms** integer / required | | | The integer ID of the secret. | | **api\_path\_uri** string | **Default:**"/api/v1" | env:TSS\_API\_PATH\_URI | The path to append to the base URL to form a valid REST API request. | | **base\_url** string / required | | ini entries: [tss\_lookup]base\_url = None env:TSS\_BASE\_URL | The base URL of the server, e.g. `https://localhost/SecretServer`. | | **domain** string added in 3.6.0 of community.general | **Default:**"" | ini entries: [tss\_lookup]domain = env:TSS\_DOMAIN | The domain with which to request the OAuth2 Access Grant. Optional when *token* is not provided. Requires `python-tss-sdk` version 1.0.0 or greater. | | **password** string | | ini entries: [tss\_lookup]password = None env:TSS\_PASSWORD | The password associated with the supplied username. Required when *token* is not provided. | | **token** string added in 3.7.0 of community.general | | ini entries: [tss\_lookup]token = None env:TSS\_TOKEN | Existing token for Thycotic authorizer. If provided, *username* and *password* are not needed. Requires `python-tss-sdk` version 1.0.0 or greater. | | **token\_path\_uri** string | **Default:**"/oauth2/token" | env:TSS\_TOKEN\_PATH\_URI | The path to append to the base URL to form a valid OAuth2 Access Grant request. | | **username** string | | ini entries: [tss\_lookup]username = None env:TSS\_USERNAME | The username with which to request the OAuth2 Access Grant. | Examples -------- ``` - hosts: localhost vars: secret: >- {{ lookup( 'community.general.tss', 102, base_url='https://secretserver.domain.com/SecretServer/', username='user.name', password='password' ) }} tasks: - ansible.builtin.debug: msg: > the password is {{ (secret['items'] | items2dict(key_name='slug', value_name='itemValue'))['password'] }} - hosts: localhost vars: secret: >- {{ lookup( 'community.general.tss', 102, base_url='https://secretserver.domain.com/SecretServer/', username='user.name', password='password', domain='domain' ) }} tasks: - ansible.builtin.debug: msg: > the password is {{ (secret['items'] | items2dict(key_name='slug', value_name='itemValue'))['password'] }} - hosts: localhost vars: secret_password: >- {{ ((lookup( 'community.general.tss', 102, base_url='https://secretserver.domain.com/SecretServer/', token='thycotic_access_token', ) | from_json).get('items') | items2dict(key_name='slug', value_name='itemValue'))['password'] }} tasks: - ansible.builtin.debug: msg: the password is {{ secret_password }} ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **\_list** list / elements=dictionary | success | The JSON responses to `GET /secrets/{id}`. See <https://updates.thycotic.net/secretserver/restapiguide/TokenAuth/#operation--secrets--id--get>. | ### Authors * Adam Migus (@amigus) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#7a1b1e1b175c59494d415c594f48415c594e424117131d0f095c594e4c4115081d)>
programming_docs
ansible community.general.icinga2_host – Manage a host in Icinga2 community.general.icinga2\_host – Manage a host in Icinga2 ========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.icinga2_host`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Add or remove a host to Icinga2 through the API. * See <https://www.icinga.com/docs/icinga2/latest/doc/12-icinga2-api/> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **check\_command** string | **Default:**"hostalive" | The command used to check if the host is alive. | | **client\_cert** path | | PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, `client_key` is not required. | | **client\_key** path | | PEM formatted file that contains your private key to be used for SSL client authentication. If `client_cert` contains both the certificate and key, this option is not required. | | **display\_name** string | | The name used to display the host. If not specified, it defaults to the value of the *name* parameter. | | **force** boolean | **Choices:*** **no** ← * yes | If `yes` do not get a cached copy. Alias `thirsty` has been deprecated and will be removed in 2.13. aliases: thirsty | | **force\_basic\_auth** boolean | **Choices:*** **no** ← * yes | httplib2, the library used by the uri module only sends authentication information when a webservice responds to an initial request with a 401 status. Since some basic auth services do not properly send a 401, logins will fail. This option forces the sending of the Basic authentication header upon initial request. | | **http\_agent** string | **Default:**"ansible-httpget" | Header to identify as, generally appears in web server logs. | | **ip** string / required | | The IP address of the host. | | **name** string / required | | Name used to create / delete the host. This does not need to be the FQDN, but does needs to be unique. aliases: host | | **state** string | **Choices:*** **present** ← * absent | Apply feature state. | | **template** string | | The template used to define the host. Template cannot be modified after object creation. | | **url** string | | HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path | | **url\_password** string | | The password for use in HTTP basic authentication. If the `url_username` parameter is not specified, the `url_password` parameter will not be used. | | **url\_username** string | | The username for use in HTTP basic authentication. This parameter can be used without `url_password` for sites that allow empty passwords. | | **use\_gssapi** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** ← * yes | Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication. Requires the Python library [gssapi](https://github.com/pythongssapi/python-gssapi) to be installed. Credentials for GSSAPI can be specified with *url\_username*/*url\_password* or with the GSSAPI env var `KRB5CCNAME` that specified a custom Kerberos credential cache. NTLM authentication is `not` supported even if the GSSAPI mech for NTLM has been installed. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | | **variables** dictionary | | Dictionary of variables. | | **zone** string | | The zone from where this host should be polled. | Examples -------- ``` - name: Add host to icinga community.general.icinga2_host: url: "https://icinga2.example.com" url_username: "ansible" url_password: "a_secret" state: present name: "{{ ansible_fqdn }}" ip: "{{ ansible_default_ipv4.address }}" variables: foo: "bar" delegate_to: 127.0.0.1 ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **data** dictionary | always | The data structure used for create, modify or delete of the host | | **name** string | always | The name used to create, modify or delete the host | ### Authors * Jurgen Brand (@t794104) ansible community.general.clc_loadbalancer – Create, Delete shared loadbalancers in CenturyLink Cloud. community.general.clc\_loadbalancer – Create, Delete shared loadbalancers in CenturyLink Cloud. =============================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.clc_loadbalancer`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * An Ansible module to Create, Delete shared loadbalancers in CenturyLink Cloud. Requirements ------------ The below requirements are needed on the host that executes this module. * python = 2.7 * requests >= 2.5.0 * clc-sdk Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **alias** string / required | | The alias of your CLC Account | | **description** string | | A description for the loadbalancer | | **location** string / required | | The location of the datacenter where the load balancer resides in | | **method** string | **Choices:*** leastConnection * roundRobin | -The balancing method for the load balancer pool | | **name** string / required | | The name of the loadbalancer | | **nodes** list / elements=dictionary | **Default:**[] | A list of nodes that needs to be added to the load balancer pool | | **persistence** string | **Choices:*** standard * sticky | The persistence method for the load balancer | | **port** string | **Choices:*** 80 * 443 | Port to configure on the public-facing side of the load balancer pool | | **state** string | **Choices:*** **present** ← * absent * port\_absent * nodes\_present * nodes\_absent | Whether to create or delete the load balancer pool | | **status** string | **Choices:*** **enabled** ← * disabled | The status of the loadbalancer | Notes ----- Note * To use this module, it is required to set the below environment variables which enables access to the Centurylink Cloud - CLC\_V2\_API\_USERNAME, the account login id for the centurylink cloud - CLC\_V2\_API\_PASSWORD, the account password for the centurylink cloud * Alternatively, the module accepts the API token and account alias. The API token can be generated using the CLC account login and password via the HTTP api call @ <https://api.ctl.io/v2/authentication/login> - CLC\_V2\_API\_TOKEN, the API token generated from <https://api.ctl.io/v2/authentication/login> - CLC\_ACCT\_ALIAS, the account alias associated with the centurylink cloud * Users can set CLC\_V2\_API\_URL to specify an endpoint for pointing to a different CLC environment. Examples -------- ``` # Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples - name: Create Loadbalancer hosts: localhost connection: local tasks: - name: Actually Create things community.general.clc_loadbalancer: name: test description: test alias: TEST location: WA1 port: 443 nodes: - ipAddress: 10.11.22.123 privatePort: 80 state: present - name: Add node to an existing loadbalancer pool hosts: localhost connection: local tasks: - name: Actually Create things community.general.clc_loadbalancer: name: test description: test alias: TEST location: WA1 port: 443 nodes: - ipAddress: 10.11.22.234 privatePort: 80 state: nodes_present - name: Remove node from an existing loadbalancer pool hosts: localhost connection: local tasks: - name: Actually Create things community.general.clc_loadbalancer: name: test description: test alias: TEST location: WA1 port: 443 nodes: - ipAddress: 10.11.22.234 privatePort: 80 state: nodes_absent - name: Delete LoadbalancerPool hosts: localhost connection: local tasks: - name: Actually Delete things community.general.clc_loadbalancer: name: test description: test alias: TEST location: WA1 port: 443 nodes: - ipAddress: 10.11.22.123 privatePort: 80 state: port_absent - name: Delete Loadbalancer hosts: localhost connection: local tasks: - name: Actually Delete things community.general.clc_loadbalancer: name: test description: test alias: TEST location: WA1 port: 443 nodes: - ipAddress: 10.11.22.123 privatePort: 80 state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **loadbalancer** dictionary | success | The load balancer result object from CLC **Sample:** {'description': 'test-lb', 'id': 'ab5b18cb81e94ab9925b61d1ca043fb5', 'ipAddress': '66.150.174.197', 'links': [{'href': '/v2/sharedLoadBalancers/wfad/wa1/ab5b18cb81e94ab9925b61d1ca043fb5', 'rel': 'self', 'verbs': ['GET', 'PUT', 'DELETE']}, {'href': '/v2/sharedLoadBalancers/wfad/wa1/ab5b18cb81e94ab9925b61d1ca043fb5/pools', 'rel': 'pools', 'verbs': ['GET', 'POST']}], 'name': 'test-lb', 'pools': [], 'status': 'enabled'} | ### Authors * CLC Runner (@clc-runner) ansible community.general.pamd – Manage PAM Modules community.general.pamd – Manage PAM Modules =========================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pamd`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Edit PAM service’s type, control, module path and module arguments. * In order for a PAM rule to be modified, the type, control and module\_path must match an existing rule. See man(5) pam.d for details. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **backup** boolean | **Choices:*** **no** ← * yes | Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. | | **control** string / required | | The control of the PAM rule being modified. This may be a complicated control with brackets. If this is the case, be sure to put "[bracketed controls]" in quotes. The `type`, `control` and `module_path` all must match a rule to be modified. | | **module\_arguments** list / elements=string | | When state is `updated`, the module\_arguments will replace existing module\_arguments. When state is `args_absent` args matching those listed in module\_arguments will be removed. When state is `args_present` any args listed in module\_arguments are added if missing from the existing rule. Furthermore, if the module argument takes a value denoted by `=`, the value will be changed to that specified in module\_arguments. | | **module\_path** string / required | | The module path of the PAM rule being modified. The `type`, `control` and `module_path` all must match a rule to be modified. | | **name** string / required | | The name generally refers to the PAM service file to change, for example system-auth. | | **new\_control** string | | The new control to assign to the new rule. | | **new\_module\_path** string | | The new module path to be assigned to the new rule. | | **new\_type** string | **Choices:*** account * -account * auth * -auth * password * -password * session * -session | The new type to assign to the new rule. | | **path** path | **Default:**"/etc/pam.d" | This is the path to the PAM service files. | | **state** string | **Choices:*** absent * before * after * args\_absent * args\_present * **updated** ← | The default of `updated` will modify an existing rule if type, control and module\_path all match an existing rule. With `before`, the new rule will be inserted before a rule matching type, control and module\_path. Similarly, with `after`, the new rule will be inserted after an existing rulematching type, control and module\_path. With either `before` or `after` new\_type, new\_control, and new\_module\_path must all be specified. If state is `args_absent` or `args_present`, new\_type, new\_control, and new\_module\_path will be ignored. State `absent` will remove the rule. The 'absent' state was added in Ansible 2.4. | | **type** string / required | **Choices:*** account * -account * auth * -auth * password * -password * session * -session | The type of the PAM rule being modified. The `type`, `control` and `module_path` all must match a rule to be modified. | Notes ----- Note * This module does not handle authselect profiles. Examples -------- ``` - name: Update pamd rule's control in /etc/pam.d/system-auth community.general.pamd: name: system-auth type: auth control: required module_path: pam_faillock.so new_control: sufficient - name: Update pamd rule's complex control in /etc/pam.d/system-auth community.general.pamd: name: system-auth type: session control: '[success=1 default=ignore]' module_path: pam_succeed_if.so new_control: '[success=2 default=ignore]' - name: Insert a new rule before an existing rule community.general.pamd: name: system-auth type: auth control: required module_path: pam_faillock.so new_type: auth new_control: sufficient new_module_path: pam_faillock.so state: before - name: Insert a new rule pam_wheel.so with argument 'use_uid' after an \ existing rule pam_rootok.so community.general.pamd: name: su type: auth control: sufficient module_path: pam_rootok.so new_type: auth new_control: required new_module_path: pam_wheel.so module_arguments: 'use_uid' state: after - name: Remove module arguments from an existing rule community.general.pamd: name: system-auth type: auth control: required module_path: pam_faillock.so module_arguments: '' state: updated - name: Replace all module arguments in an existing rule community.general.pamd: name: system-auth type: auth control: required module_path: pam_faillock.so module_arguments: 'preauth silent deny=3 unlock_time=604800 fail_interval=900' state: updated - name: Remove specific arguments from a rule community.general.pamd: name: system-auth type: session control: '[success=1 default=ignore]' module_path: pam_succeed_if.so module_arguments: crond,quiet state: args_absent - name: Ensure specific arguments are present in a rule community.general.pamd: name: system-auth type: session control: '[success=1 default=ignore]' module_path: pam_succeed_if.so module_arguments: crond,quiet state: args_present - name: Ensure specific arguments are present in a rule (alternative) community.general.pamd: name: system-auth type: session control: '[success=1 default=ignore]' module_path: pam_succeed_if.so module_arguments: - crond - quiet state: args_present - name: Module arguments requiring commas must be listed as a Yaml list community.general.pamd: name: special-module type: account control: required module_path: pam_access.so module_arguments: - listsep=, state: args_present - name: Update specific argument value in a rule community.general.pamd: name: system-auth type: auth control: required module_path: pam_faillock.so module_arguments: 'fail_interval=300' state: args_present - name: Add pam common-auth rule for duo community.general.pamd: name: common-auth new_type: auth new_control: '[success=1 default=ignore]' new_module_path: '/lib64/security/pam_duo.so' state: after type: auth module_path: pam_sss.so control: 'requisite' ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **action** string | always | That action that was taken and is one of: update\_rule, insert\_before\_rule, insert\_after\_rule, args\_present, args\_absent, absent. This was available in Ansible 2.4 and removed in Ansible 2.8 **Sample:** update\_rule | | **backupdest** string | success | The file name of the backup file, if created. | | **change\_count** integer | success | How many rules were changed. **Sample:** 1 | | **dest** string | success | Path to pam.d service that was changed. This is only available in Ansible 2.3 and was removed in Ansible 2.4. **Sample:** /etc/pam.d/system-auth | | **new\_rule** string | success | The changes to the rule. This was available in Ansible 2.4 and Ansible 2.5. It was removed in Ansible 2.6. **Sample:** None None None sha512 shadow try\_first\_pass use\_authtok | | **updated\_rule\_(n)** string | success | The rule(s) that was/were changed. This is only available in Ansible 2.4 and was removed in Ansible 2.5. **Sample:** ['password sufficient pam\_unix.so sha512 shadow try\_first\_pass use\_authtok'] | ### Authors * Kenneth D. Evensen (@kevensen) ansible community.general.ibm_sa_host – Adds hosts to or removes them from IBM Spectrum Accelerate Family storage systems. community.general.ibm\_sa\_host – Adds hosts to or removes them from IBM Spectrum Accelerate Family storage systems. ==================================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ibm_sa_host`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module adds hosts to or removes them from IBM Spectrum Accelerate Family storage systems. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * pyxcli Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **cluster** string | | The name of the cluster to include the host. | | **domain** string | | The domains the cluster will be attached to. To include more than one domain, separate domain names with commas. To include all existing domains, use an asterisk ("\*"). | | **endpoints** string / required | | The hostname or management IP of Spectrum Accelerate storage system. | | **host** string / required | | Host name. | | **iscsi\_chap\_name** string | | The host's CHAP name identifier | | **iscsi\_chap\_secret** string | | The password of the initiator used to authenticate to the system when CHAP is enable | | **password** string / required | | Password for username on the spectrum accelerate storage system. | | **state** string | **Choices:*** **present** ← * absent | Host state. | | **username** string / required | | Management user on the spectrum accelerate storage system. | Notes ----- Note * This module requires pyxcli python library. Use ‘pip install pyxcli’ in order to get pyxcli. Examples -------- ``` - name: Define new host. community.general.ibm_sa_host: host: host_name state: present username: admin password: secret endpoints: hostdev-system - name: Delete host. community.general.ibm_sa_host: host: host_name state: absent username: admin password: secret endpoints: hostdev-system ``` ### Authors * Tzur Eliyahu (@tzure)
programming_docs
ansible community.general.machinectl – Systemd’s machinectl privilege escalation community.general.machinectl – Systemd’s machinectl privilege escalation ======================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.machinectl`. * [Synopsis](#synopsis) * [Parameters](#parameters) Synopsis -------- * This become plugins allows your remote/login user to execute commands as another user via the machinectl utility. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **become\_exe** string | **Default:**"machinectl" | ini entries: [privilege\_escalation]become\_exe = machinectl [machinectl\_become\_plugin]executable = machinectl env:ANSIBLE\_BECOME\_EXE env:ANSIBLE\_MACHINECTL\_EXE var: ansible\_become\_exe var: ansible\_machinectl\_exe | Machinectl executable | | **become\_flags** string | **Default:**"" | ini entries: [privilege\_escalation]become\_flags = [machinectl\_become\_plugin]flags = env:ANSIBLE\_BECOME\_FLAGS env:ANSIBLE\_MACHINECTL\_FLAGS var: ansible\_become\_flags var: ansible\_machinectl\_flags | Options to pass to machinectl | | **become\_pass** string | | ini entries: [machinectl\_become\_plugin]password = None env:ANSIBLE\_BECOME\_PASS env:ANSIBLE\_MACHINECTL\_PASS var: ansible\_become\_password var: ansible\_become\_pass var: ansible\_machinectl\_pass | Password for machinectl | | **become\_user** string | **Default:**"" | ini entries: [privilege\_escalation]become\_user = [machinectl\_become\_plugin]user = env:ANSIBLE\_BECOME\_USER env:ANSIBLE\_MACHINECTL\_USER var: ansible\_become\_user var: ansible\_machinectl\_user | User you 'become' to execute the task | ### Authors * Ansible Core Team ansible community.general.monit – Manage the state of a program monitored via Monit community.general.monit – Manage the state of a program monitored via Monit =========================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.monit`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manage the state of a program monitored via *Monit*. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **name** string / required | | The name of the *monit* program/process to manage. | | **state** string / required | **Choices:*** present * started * stopped * restarted * monitored * unmonitored * reloaded | The state of service. | | **timeout** integer | **Default:**300 | If there are pending actions for the service monitored by monit, then Ansible will check for up to this many seconds to verify the requested action has been performed. Ansible will sleep for five seconds between each check. | Examples -------- ``` - name: Manage the state of program httpd to be in started state community.general.monit: name: httpd state: started ``` ### Authors * Darryl Stoflet (@dstoflet) * Simon Kelly (@snopoke) ansible community.general.memset_dns_reload – Request reload of Memset’s DNS infrastructure, community.general.memset\_dns\_reload – Request reload of Memset’s DNS infrastructure, ====================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.memset_dns_reload`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Request a reload of Memset’s DNS infrastructure, and optionally poll until it finishes. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string / required | | The API key obtained from the Memset control panel. | | **poll** boolean | **Choices:*** **no** ← * yes | Boolean value, if set will poll the reload job's status and return when the job has completed (unless the 30 second timeout is reached first). If the timeout is reached then the task will not be marked as failed, but stderr will indicate that the polling failed. | Notes ----- Note * DNS reload requests are a best-effort service provided by Memset; these generally happen every 15 minutes by default, however you can request an immediate reload if later tasks rely on the records being created. An API key generated via the Memset customer control panel is required with the following minimum scope - *dns.reload*. If you wish to poll the job status to wait until the reload has completed, then *job.status* is also required. Examples -------- ``` - name: Submit DNS reload and poll community.general.memset_dns_reload: api_key: 5eb86c9196ab03919abcf03857163741 poll: True delegate_to: localhost ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **memset\_api** complex | always | Raw response from the Memset API. | | | **error** boolean | always | Whether the job ended in error state. **Sample:** True | | | **finished** boolean | always | Whether the job completed before the result was returned. **Sample:** True | | | **id** string | always | Job ID. **Sample:** c9cc8ad2a3e3fb8c63ed83c424928ef8 | | | **status** string | always | Job status. **Sample:** DONE | | | **type** string | always | Job type. **Sample:** dns | ### Authors * Simon Weald (@glitchcrab) ansible community.general.nios_host_record – Configure Infoblox NIOS host records community.general.nios\_host\_record – Configure Infoblox NIOS host records =========================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nios_host_record`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Status](#status) DEPRECATED ---------- Removed in version 5.0.0 Why Please install the infoblox.nios\_modules collection and use the corresponding module from it. Alternative infoblox.nios\_modules.nios\_host\_record Synopsis -------- * Adds and/or removes instances of host record objects from Infoblox NIOS servers. This module manages NIOS `record:host` objects using the Infoblox WAPI interface over REST. * Updates instances of host record object from Infoblox NIOS servers. Requirements ------------ The below requirements are needed on the host that executes this module. * infoblox-client Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **aliases** list / elements=string | | Configures an optional list of additional aliases to add to the host record. These are equivalent to CNAMEs but held within a host record. Must be in list format. | | **comment** string | | Configures a text string comment to be associated with the instance of this object. The provided text string will be configured on the object instance. | | **configure\_for\_dns** boolean | **Choices:*** no * **yes** ← | Sets the DNS to particular parent. If user needs to bypass DNS user can make the value to false. aliases: dns | | **extattrs** dictionary | | Allows for the configuration of Extensible Attributes on the instance of the object. This argument accepts a set of key / value pairs for configuration. | | **ipv4addrs** list / elements=dictionary | | Configures the IPv4 addresses for this host record. This argument accepts a list of values (see suboptions) aliases: ipv4 | | | **add** boolean added in 0.2.0 of community.general | **Choices:*** no * yes | If user wants to add the ipv4 address to an existing host record. Note that with *add* user will have to keep the *state* as *present*, as new IP address is allocated to existing host record. See examples. | | | **configure\_for\_dhcp** boolean | **Choices:*** no * yes | Configure the host\_record over DHCP instead of DNS, if user changes it to true, user need to mention MAC address to configure aliases: dhcp | | | **ipv4addr** string / required | | Configures the IPv4 address for the host record. Users can dynamically allocate ipv4 address to host record by passing dictionary containing, *nios\_next\_ip* and *CIDR network range*. If user wants to add or remove the ipv4 address from existing record, *add/remove* params need to be used. See examples aliases: address | | | **mac** string | | Configures the hardware MAC address for the host record. If user makes DHCP to true, user need to mention MAC address. | | | **remove** boolean added in 0.2.0 of community.general | **Choices:*** no * yes | If user wants to remove the ipv4 address from an existing host record. Note that with *remove* user will have to change the *state* to *absent*, as IP address is de-allocated from an existing host record. See examples. | | **ipv6addrs** list / elements=dictionary | | Configures the IPv6 addresses for the host record. This argument accepts a list of values (see options) aliases: ipv6 | | | **configure\_for\_dhcp** boolean | **Choices:*** no * yes | Configure the host\_record over DHCP instead of DNS, if user changes it to true, user need to mention MAC address to configure | | | **ipv6addr** string / required | | Configures the IPv6 address for the host record aliases: address | | | **mac** string | | Configures the hardware MAC address for the host record. If user makes DHCP to true, user need to mention MAC address. | | **name** string / required | | Specifies the fully qualified hostname to add or remove from the system. User can also update the hostname as it is possible to pass a dict containing *new\_name*, *old\_name*. See examples. | | **provider** dictionary | | A dict object containing connection details. | | | **host** string | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. | | | **http\_pool\_connections** integer | **Default:**10 | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_pool\_maxsize** integer | **Default:**10 | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_request\_timeout** integer | **Default:**10 | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. | | | **max\_results** integer | **Default:**1000 | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. | | | **max\_retries** integer | **Default:**3 | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. | | | **password** string | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. | | | **silent\_ssl\_warnings** boolean | **Choices:*** no * **yes** ← | Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **username** string | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. | | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable. aliases: ssl\_verify | | | **wapi\_version** string | **Default:**"2.1" | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 | | **state** string | **Choices:*** **present** ← * absent | Configures the intended state of the instance of the object on the NIOS server. When this value is set to `present`, the object is configured on the device and when this value is set to `absent` the value is removed (if necessary) from the device. | | **ttl** integer | | Configures the TTL to be associated with this host record | | **view** string | **Default:**"default" | Sets the DNS view to associate this host record with. The DNS view must already be configured on the system aliases: dns\_view | Notes ----- Note * This module must be run locally, which can be achieved by specifying `connection: local`. * Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible. Examples -------- ``` - name: Configure an ipv4 host record community.general.nios_host_record: name: host.ansible.com ipv4: - address: 192.168.10.1 aliases: - cname.ansible.com state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Add a comment to an existing host record community.general.nios_host_record: name: host.ansible.com ipv4: - address: 192.168.10.1 comment: this is a test comment state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Remove a host record from the system community.general.nios_host_record: name: host.ansible.com state: absent provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Update an ipv4 host record community.general.nios_host_record: name: {new_name: host-new.ansible.com, old_name: host.ansible.com} ipv4: - address: 192.168.10.1 state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Create an ipv4 host record bypassing DNS community.general.nios_host_record: name: new_host ipv4: - address: 192.168.10.1 dns: false state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Create an ipv4 host record over DHCP community.general.nios_host_record: name: host.ansible.com ipv4: - address: 192.168.10.1 dhcp: true mac: 00-80-C8-E3-4C-BD state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Dynamically add host record to next available ip community.general.nios_host_record: name: host.ansible.com ipv4: - address: {nios_next_ip: 192.168.10.0/24} comment: this is a test comment state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Add ip to host record community.general.nios_host_record: name: host.ansible.com ipv4: - address: 192.168.10.2 add: true state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Remove ip to host record community.general.nios_host_record: name: host.ansible.com ipv4: - address: 192.168.10.1 remove: true state: absent provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local ``` Status ------ * This module will be removed in version 5.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Peter Sprygada (@privateip) ansible community.general.supervisorctl – Manage the state of a program or group of programs running via supervisord community.general.supervisorctl – Manage the state of a program or group of programs running via supervisord ============================================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.supervisorctl`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage the state of a program or group of programs running via supervisord Requirements ------------ The below requirements are needed on the host that executes this module. * supervisorctl Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** path | | The supervisor configuration file path | | **name** string / required | | The name of the supervisord program or group to manage. The name will be taken as group name when it ends with a colon *:* Group support is only available in Ansible version 1.6 or later. | | **password** string | | password to use for authentication | | **server\_url** string | | URL on which supervisord server is listening | | **signal** string | | The signal to send to the program/group, when combined with the 'signalled' state. Required when l(state=signalled). | | **state** string / required | **Choices:*** present * started * stopped * restarted * absent * signalled | The desired state of program/group. | | **supervisorctl\_path** path | | path to supervisorctl executable | | **username** string | | username to use for authentication | Notes ----- Note * When `state` = *present*, the module will call `supervisorctl reread` then `supervisorctl add` if the program/group does not exist. * When `state` = *restarted*, the module will call `supervisorctl update` then call `supervisorctl restart`. * When `state` = *absent*, the module will call `supervisorctl reread` then `supervisorctl remove` to remove the target program/group. Examples -------- ``` - name: Manage the state of program to be in started state community.general.supervisorctl: name: my_app state: started - name: Manage the state of program group to be in started state community.general.supervisorctl: name: 'my_apps:' state: started - name: Restart my_app, reading supervisorctl configuration from a specified file community.general.supervisorctl: name: my_app state: restarted config: /var/opt/my_project/supervisord.conf - name: Restart my_app, connecting to supervisord with credentials and server URL community.general.supervisorctl: name: my_app state: restarted username: test password: testpass server_url: http://localhost:9001 - name: Send a signal to my_app via supervisorctl community.general.supervisorctl: name: my_app state: signalled signal: USR1 ``` ### Authors * Matt Wright (@mattupstate) * Aaron Wang (@inetfuture) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#0c656269786a7978797e692a2f3f3b372a2f393e372a2f3834376b616d65602a2f383a376f6361)>
programming_docs
ansible community.general.open_iscsi – Manage iSCSI targets with Open-iSCSI community.general.open\_iscsi – Manage iSCSI targets with Open-iSCSI ==================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.open_iscsi`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Discover targets on given portal, (dis)connect targets, mark targets to manually or auto start, return device nodes of connected targets. Requirements ------------ The below requirements are needed on the host that executes this module. * open\_iscsi library and tools (iscsiadm) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auto\_node\_startup** boolean | **Choices:*** no * yes | Whether the target node should be automatically connected at startup. aliases: automatic | | **auto\_portal\_startup** boolean added in 3.2.0 of community.general | **Choices:*** no * yes | Whether the target node portal should be automatically connected at startup. | | **discover** boolean | **Choices:*** **no** ← * yes | Whether the list of target nodes on the portal should be (re)discovered and added to the persistent iSCSI database. Keep in mind that `iscsiadm` discovery resets configuration, like `node.startup` to manual, hence combined with `auto_node_startup=yes` will always return a changed state. | | **login** boolean | **Choices:*** no * yes | Whether the target node should be connected. aliases: state | | **node\_auth** string | **Default:**"CHAP" | The value for `node.session.auth.authmethod`. | | **node\_pass** string | | The value for `node.session.auth.password`. | | **node\_pass\_in** string added in 3.8.0 of community.general | | The value for `node.session.auth.password_in`. | | **node\_user** string | | The value for `node.session.auth.username`. | | **node\_user\_in** string added in 3.8.0 of community.general | | The value for `node.session.auth.username_in`. | | **port** string | **Default:**3260 | The port on which the iSCSI target process listens. | | **portal** string | | The domain name or IP address of the iSCSI target. aliases: ip | | **show\_nodes** boolean | **Choices:*** **no** ← * yes | Whether the list of nodes in the persistent iSCSI database should be returned by the module. | | **target** string | | The iSCSI target name. aliases: name, targetname | Examples -------- ``` - name: Perform a discovery on sun.com and show available target nodes community.general.open_iscsi: show_nodes: yes discover: yes portal: sun.com - name: Perform a discovery on 10.1.2.3 and show available target nodes community.general.open_iscsi: show_nodes: yes discover: yes ip: 10.1.2.3 # NOTE: Only works if exactly one target is exported to the initiator - name: Discover targets on portal and login to the one available community.general.open_iscsi: portal: '{{ iscsi_target }}' login: yes discover: yes - name: Connect to the named target, after updating the local persistent database (cache) community.general.open_iscsi: login: yes target: iqn.1986-03.com.sun:02:f8c1f9e0-c3ec-ec84-c9c9-8bfb0cd5de3d - name: Disconnect from the cached named target community.general.open_iscsi: login: no target: iqn.1986-03.com.sun:02:f8c1f9e0-c3ec-ec84-c9c9-8bfb0cd5de3d - name: Override and disable automatic portal login on specific portal community.general.open_iscsi: login: false portal: 10.1.1.250 auto_portal_startup: false target: iqn.1986-03.com.sun:02:f8c1f9e0-c3ec-ec84-c9c9-8bfb0cd5de3d ``` ### Authors * Serge van Ginderachter (@srvg) ansible community.general.bundler – Manage Ruby Gem dependencies with Bundler community.general.bundler – Manage Ruby Gem dependencies with Bundler ===================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.bundler`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manage installation and Gem version dependencies for Ruby using the Bundler gem Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **binstub\_directory** path | | Only applies if state is `present`. Specifies the directory to install any gem bins files to. When executed the bin files will run within the context of the Gemfile and fail if any required gem dependencies are not installed. If `chdir` is set then this path is relative to `chdir` | | **chdir** path | | The directory to execute the bundler commands from. This directory needs to contain a valid Gemfile or .bundle/ directory If not specified, it will default to the temporary working directory | | **clean** boolean | **Choices:*** **no** ← * yes | Only applies if state is `present`. If set removes any gems on the target host that are not in the gemfile | | **deployment\_mode** boolean | **Choices:*** **no** ← * yes | Only applies if state is `present`. If set it will install gems in ./vendor/bundle instead of the default location. Requires a Gemfile.lock file to have been created prior | | **exclude\_groups** list / elements=string | | A list of Gemfile groups to exclude during operations. This only applies when state is `present`. Bundler considers this a 'remembered' property for the Gemfile and will automatically exclude groups in future operations even if `exclude_groups` is not set | | **executable** string | | The path to the bundler executable | | **extra\_args** string | | A space separated string of additional commands that can be applied to the Bundler command. Refer to the Bundler documentation for more information | | **gem\_path** path | | Only applies if state is `present`. Specifies the directory to install the gems into. If `chdir` is set then this path is relative to `chdir` If not specified the default RubyGems gem paths will be used. | | **gemfile** path | | Only applies if state is `present`. The path to the gemfile to use to install gems. If not specified it will default to the Gemfile in current directory | | **local** boolean | **Choices:*** **no** ← * yes | If set only installs gems from the cache on the target host | | **state** string | **Choices:*** **present** ← * latest | The desired state of the Gem bundle. `latest` updates gems to the most recent, acceptable version | | **user\_install** boolean | **Choices:*** no * **yes** ← | Only applies if state is `present`. Installs gems in the local user's cache or for all users | Examples -------- ``` - name: Install gems from a Gemfile in the current directory community.general.bundler: state: present executable: ~/.rvm/gems/2.1.5/bin/bundle - name: Exclude the production group from installing community.general.bundler: state: present exclude_groups: production - name: Install gems into ./vendor/bundle community.general.bundler: state: present deployment_mode: yes - name: Install gems using a Gemfile in another directory community.general.bundler: state: present gemfile: ../rails_project/Gemfile - name: Update Gemfile in another directory community.general.bundler: state: latest chdir: ~/rails_project ``` ### Authors * Tim Hoiberg (@thoiberg) ansible community.general.java_cert – Uses keytool to import/remove certificate to/from java keystore (cacerts) community.general.java\_cert – Uses keytool to import/remove certificate to/from java keystore (cacerts) ======================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.java_cert`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This is a wrapper module around keytool, which can be used to import certificates and optionally private keys to a given java keystore, or remove them from it. Requirements ------------ The below requirements are needed on the host that executes this module. * openssl * keytool Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **cert\_alias** string | | Imported certificate alias. The alias is used when checking for the presence of a certificate in the keystore. | | **cert\_path** path | | Local path to load certificate from. Exactly one of `cert_url`, `cert_path` or `pkcs12_path` is required to load certificate. | | **cert\_port** integer | **Default:**443 | Port to connect to URL. This will be used to create server URL:PORT. | | **cert\_url** string | | Basic URL to fetch SSL certificate from. Exactly one of `cert_url`, `cert_path` or `pkcs12_path` is required to load certificate. | | **executable** string | **Default:**"keytool" | Path to keytool binary if not used we search in PATH for it. | | **keystore\_create** boolean | **Choices:*** **no** ← * yes | Create keystore if it does not exist. | | **keystore\_pass** string / required | | Keystore password. | | **keystore\_path** path | | Path to keystore. | | **keystore\_type** string | | Keystore type (JCEKS, JKS). | | **pkcs12\_alias** string | | Alias in the PKCS12 keystore. | | **pkcs12\_password** string | **Default:**"" | Password for importing from PKCS12 keystore. | | **pkcs12\_path** path | | Local path to load PKCS12 keystore from. Unlike `cert_url` and `cert_path`, the PKCS12 keystore embeds the private key matching the certificate, and is used to import both the certificate and its private key into the java keystore. Exactly one of `cert_url`, `cert_path` or `pkcs12_path` is required to load certificate. | | **state** string | **Choices:*** absent * **present** ← | Defines action which can be either certificate import or removal. When state is present, the certificate will always idempotently be inserted into the keystore, even if there already exists a cert alias that is different. | | **trust\_cacert** boolean added in 0.2.0 of community.general | **Choices:*** **no** ← * yes | Trust imported cert as CAcert. | Examples -------- ``` - name: Import SSL certificate from google.com to a given cacerts keystore community.general.java_cert: cert_url: google.com cert_port: 443 keystore_path: /usr/lib/jvm/jre7/lib/security/cacerts keystore_pass: changeit state: present - name: Remove certificate with given alias from a keystore community.general.java_cert: cert_url: google.com keystore_path: /usr/lib/jvm/jre7/lib/security/cacerts keystore_pass: changeit executable: /usr/lib/jvm/jre7/bin/keytool state: absent - name: Import trusted CA from SSL certificate community.general.java_cert: cert_path: /opt/certs/rootca.crt keystore_path: /tmp/cacerts keystore_pass: changeit keystore_create: yes state: present cert_alias: LE_RootCA trust_cacert: True - name: Import SSL certificate from google.com to a keystore, create it if it doesn't exist community.general.java_cert: cert_url: google.com keystore_path: /tmp/cacerts keystore_pass: changeit keystore_create: yes state: present - name: Import a pkcs12 keystore with a specified alias, create it if it doesn't exist community.general.java_cert: pkcs12_path: "/tmp/importkeystore.p12" cert_alias: default keystore_path: /opt/wildfly/standalone/configuration/defaultkeystore.jks keystore_pass: changeit keystore_create: yes state: present - name: Import SSL certificate to JCEKS keystore community.general.java_cert: pkcs12_path: "/tmp/importkeystore.p12" pkcs12_alias: default pkcs12_password: somepass cert_alias: default keystore_path: /opt/someapp/security/keystore.jceks keystore_type: "JCEKS" keystore_pass: changeit keystore_create: yes state: present ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **cmd** string | success | Executed command to get action done. **Sample:** keytool -importcert -noprompt -keystore | | **msg** string | success | Output from stdout of keytool command after execution of given command. **Sample:** Module require existing keystore at keystore\_path '/tmp/test/cacerts' | | **rc** integer | success | Keytool command execution return value. **Sample:** 0 | ### Authors * Adam Hamsik (@haad) ansible community.general.gitlab_project_members – Manage project members on GitLab Server community.general.gitlab\_project\_members – Manage project members on GitLab Server ==================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.gitlab_project_members`. New in version 2.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module allows to add and remove members to/from a project, or change a member’s access level in a project on GitLab. Requirements ------------ The below requirements are needed on the host that executes this module. * python-gitlab python module <= 1.15.0 * owner or maintainer rights to project on the GitLab server Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **access\_level** string | **Choices:*** guest * reporter * developer * maintainer | The access level for the user. Required if *state=present*, user state is set to present. | | **api\_password** string | | The password to use for authentication against the API. | | **api\_token** string / required | | A personal access token to authenticate with the GitLab API. | | **api\_url** string | | The resolvable endpoint for the API. | | **api\_username** string | | The username to use for authentication against the API. | | **gitlab\_user** list / elements=string | | A username or a list of usernames to add to/remove from the GitLab project. Mutually exclusive with *gitlab\_users\_access*. | | **gitlab\_users\_access** list / elements=dictionary added in 3.7.0 of community.general | | Provide a list of user to access level mappings. Every dictionary in this list specifies a user (by username) and the access level the user should have. Mutually exclusive with *gitlab\_user* and *access\_level*. Use together with *purge\_users* to remove all users not specified here from the project. | | | **access\_level** string / required | **Choices:*** guest * reporter * developer * maintainer | The access level for the user. Required if *state=present*, user state is set to present. | | | **name** string / required | | A username or a list of usernames to add to/remove from the GitLab project. | | **project** string / required | | The name (or full path) of the GitLab project the member is added to/removed from. | | **purge\_users** list / elements=string added in 3.7.0 of community.general | **Choices:*** guest * reporter * developer * maintainer | Adds/remove users of the given access\_level to match the given *gitlab\_user*/*gitlab\_users\_access* list. If omitted do not purge orphaned members. Is only used when *state=present*. | | **state** string | **Choices:*** **present** ← * absent | State of the member in the project. On `present`, it adds a user to a GitLab project. On `absent`, it removes a user from a GitLab project. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether or not to validate TLS/SSL certificates when supplying a HTTPS endpoint. Should only be set to `false` if you can guarantee that you are talking to the correct server and no man-in-the-middle attack can happen. | Notes ----- Note * Supports `check_mode`. Examples -------- ``` - name: Add a user to a GitLab Project community.general.gitlab_project_members: api_url: 'https://gitlab.example.com' api_token: 'Your-Private-Token' validate_certs: True project: projectname gitlab_user: username access_level: developer state: present - name: Remove a user from a GitLab project community.general.gitlab_project_members: api_url: 'https://gitlab.example.com' api_token: 'Your-Private-Token' validate_certs: False project: projectname gitlab_user: username state: absent - name: Add a list of Users to A GitLab project community.general.gitlab_project_members: api_url: 'https://gitlab.example.com' api_token: 'Your-Private-Token' gitlab_project: projectname gitlab_user: - user1 - user2 access_level: developer state: present - name: Add a list of Users with Dedicated Access Levels to A GitLab project community.general.gitlab_project_members: api_url: 'https://gitlab.example.com' api_token: 'Your-Private-Token' project: projectname gitlab_users_access: - name: user1 access_level: developer - name: user2 access_level: maintainer state: present - name: Add a user, remove all others which might be on this access level community.general.gitlab_project_members: api_url: 'https://gitlab.example.com' api_token: 'Your-Private-Token' project: projectname gitlab_user: username access_level: developer pruge_users: developer state: present - name: Remove a list of Users with Dedicated Access Levels to A GitLab project community.general.gitlab_project_members: api_url: 'https://gitlab.example.com' api_token: 'Your-Private-Token' project: projectname gitlab_users_access: - name: user1 access_level: developer - name: user2 access_level: maintainer state: absent ``` ### Authors * Sergey Mikhaltsov (@metanovii) * Zainab Alsaffar (@zanssa) ansible community.general.loganalytics – Posts task results to Azure Log Analytics community.general.loganalytics – Posts task results to Azure Log Analytics ========================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.loganalytics`. New in version 2.4.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This callback plugin will post task results in JSON formatted to an Azure Log Analytics workspace. * Credits to authors of splunk callback plugin. Requirements ------------ The below requirements are needed on the local controller node that executes this callback. * Whitelisting this callback plugin. * An Azure log analytics work space has been established. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **shared\_key** string / required | | ini entries: [callback\_loganalytics]shared\_key = None env:WORKSPACE\_SHARED\_KEY | Shared key to connect to Azure log analytics workspace. | | **workspace\_id** string / required | | ini entries: [callback\_loganalytics]workspace\_id = None env:WORKSPACE\_ID | Workspace ID of the Azure log analytics workspace. | Examples -------- ``` examples: | Whitelist the plugin in ansible.cfg: [defaults] callback_whitelist = community.general.loganalytics Set the environment variable: export WORKSPACE_ID=01234567-0123-0123-0123-01234567890a export WORKSPACE_SHARED_KEY=dZD0kCbKl3ehZG6LHFMuhtE0yHiFCmetzFMc2u+roXIUQuatqU924SsAAAAPemhjbGlAemhjbGktTUJQAQIDBA== Or configure the plugin in ansible.cfg in the callback_loganalytics block: [callback_loganalytics] workspace_id = 01234567-0123-0123-0123-01234567890a shared_key = dZD0kCbKl3ehZG6LHFMuhtE0yHiFCmetzFMc2u+roXIUQuatqU924SsAAAAPemhjbGlAemhjbGktTUJQAQIDBA== ``` ### Authors * Cyrus Li (@zhcli) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#77140e05020446474741515444404c515442454c5154434f4c101a161e1b515443414c14181a)>
programming_docs
ansible community.general.hana_query – Execute SQL on HANA community.general.hana\_query – Execute SQL on HANA =================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.hana_query`. New in version 3.2.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module executes SQL statements on HANA with hdbsql. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **autocommit** boolean | **Choices:*** no * **yes** ← | Autocommit the statement. | | **database** string | | Define the database on which to connect. | | **encrypted** boolean | **Choices:*** **no** ← * yes | Use encrypted connection. Defaults to `false`. | | **filepath** list / elements=path | | One or more files each containing one SQL query to run. Must be a string or list containing strings. | | **host** string | | The Host IP address. The port can be defined as well. | | **instance** string / required | | The instance number. | | **password** string | | The password to connect to the database. **Note:** Since the passwords have to be passed as command line arguments, *userstore=true* should be used whenever possible, as command line arguments can be seen by other users on the same machine. | | **query** list / elements=string | | SQL query to run. Must be a string or list containing strings. Please note that if you supply a string, it will be split by commas (`,`) to a list. It is better to supply a one-element list instead to avoid mangled input. | | **sid** string / required | | The system ID. | | **user** string | **Default:**"SYSTEM" | A dedicated username. The user could be also in hdbuserstore. Defaults to `SYSTEM`. | | **userstore** boolean added in 3.5.0 of community.general | **Choices:*** **no** ← * yes | If `true` the user must be in hdbuserstore. | Notes ----- Note * Does not support `check_mode`. Examples -------- ``` - name: Simple select query community.general.hana_query: sid: "hdb" instance: "01" password: "Test123" query: "select user_name from users" - name: Run several queries community.general.hana_query: sid: "hdb" instance: "01" password: "Test123" query: - "select user_name from users;" - select * from SYSTEM; host: "localhost" autocommit: False - name: Run several queries from file community.general.hana_query: sid: "hdb" instance: "01" password: "Test123" filepath: - /tmp/HANA_CPU_UtilizationPerCore_2.00.020+.txt - /tmp/HANA.txt host: "localhost" - name: Run several queries from user store community.general.hana_query: sid: "hdb" instance: "01" user: hdbstoreuser userstore: true query: - "select user_name from users;" - select * from users; autocommit: False ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **query\_result** list / elements=list | on success | List containing results of all queries executed (one sublist for every query). **Sample:** [[{'Column': 'Value1'}, {'Column': 'Value2'}], [{'Column': 'Value1'}, {'Column': 'Value2'}]] | ### Authors * Rainer Leber (@rainerleber) ansible community.general.utm_dns_host – create, update or destroy dns entry in Sophos UTM community.general.utm\_dns\_host – create, update or destroy dns entry in Sophos UTM ==================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.utm_dns_host`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Create, update or destroy a dns entry in SOPHOS UTM. * This module needs to have the REST Ability of the UTM to be activated. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **address** string | **Default:**"0.0.0.0" | The IPV4 Address of the entry. Can be left empty for automatic resolving. | | **address6** string | **Default:**"::" | The IPV6 Address of the entry. Can be left empty for automatic resolving. | | **comment** string | | An optional comment to add to the dns host object | | **headers** dictionary | | A dictionary of additional headers to be sent to POST and PUT requests. Is needed for some modules | | **hostname** string | | The hostname for the dns host object | | **interface** string | | The reference name of the interface to use. If not provided the default interface will be used | | **name** string / required | | The name of the object. Will be used to identify the entry | | **resolved** boolean | **Choices:*** **no** ← * yes | whether the hostname's ipv4 address is already resolved or not | | **resolved6** boolean | **Choices:*** **no** ← * yes | whether the hostname's ipv6 address is already resolved or not | | **state** string | **Choices:*** absent * **present** ← | The desired state of the object. `present` will create or update an object `absent` will delete an object if it was present | | **timeout** integer | **Default:**0 | the timeout for the utm to resolve the ip address for the hostname again | | **utm\_host** string / required | | The REST Endpoint of the Sophos UTM. | | **utm\_port** integer | **Default:**4444 | The port of the REST interface. | | **utm\_protocol** string | **Choices:*** http * **https** ← | The protocol of the REST Endpoint. | | **utm\_token** string / required | | The token used to identify at the REST-API. See <https://www.sophos.com/en-us/medialibrary/PDFs/documentation/UTMonAWS/Sophos-UTM-RESTful-API.pdf?la=en>, Chapter 2.4.2. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether the REST interface's ssl certificate should be verified or not. | Examples -------- ``` - name: Create UTM dns host entry community.general.utm_dns_host: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestDNSEntry hostname: testentry.some.tld state: present - name: Remove UTM dns host entry community.general.utm_dns_host: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestDNSEntry state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **result** complex | success | The utm object that was created | | | **\_locked** boolean | success | Whether or not the object is currently locked | | | **\_ref** string | success | The reference name of the object | | | **address** string | success | The ipv4 address of the object | | | **address6** string | success | The ipv6 address of the object | | | **comment** string | success | The comment string | | | **hostname** string | success | The hostname of the object | | | **interface** string | success | The reference name of the interface the object is associated with | | | **name** string | success | The name of the object | | | **resolved** boolean | success | Whether the ipv4 address is resolved or not | | | **resolved6** boolean | success | Whether the ipv6 address is resolved or not | | | **timeout** integer | success | The timeout until a new resolving will be attempted | ### Authors * Johannes Brunswicker (@MatrixCrawler) ansible community.general.pkgin – Package manager for SmartOS, NetBSD, et al. community.general.pkgin – Package manager for SmartOS, NetBSD, et al. ===================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pkgin`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * The standard package manager for SmartOS, but also usable on NetBSD or any OS that uses `pkgsrc`. (Home: <http://pkgin.net/>) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **clean** boolean | **Choices:*** **no** ← * yes | Clean packages cache | | **force** boolean | **Choices:*** **no** ← * yes | Force package reinstall | | **full\_upgrade** boolean | **Choices:*** **no** ← * yes | Upgrade all packages to their newer versions | | **name** list / elements=string | | Name of package to install/remove; multiple names may be given, separated by commas aliases: pkg | | **state** string | **Choices:*** **present** ← * absent | Intended state of the package | | **update\_cache** boolean | **Choices:*** **no** ← * yes | Update repository database. Can be run with other steps or on it's own. | | **upgrade** boolean | **Choices:*** **no** ← * yes | Upgrade main packages to their newer versions | Notes ----- Note * Known bug with pkgin < 0.8.0: if a package is removed and another package depends on it, the other package will be silently removed as well. New to Ansible 1.9: check-mode support. Examples -------- ``` - name: Install package foo community.general.pkgin: name: foo state: present - name: Install specific version of foo package community.general.pkgin: name: foo-2.0.1 state: present - name: Update cache and install foo package community.general.pkgin: name: foo update_cache: yes - name: Remove package foo community.general.pkgin: name: foo state: absent - name: Remove packages foo and bar community.general.pkgin: name: foo,bar state: absent - name: Update repositories as a separate step community.general.pkgin: update_cache: yes - name: Upgrade main packages (equivalent to pkgin upgrade) community.general.pkgin: upgrade: yes - name: Upgrade all packages (equivalent to pkgin full-upgrade) community.general.pkgin: full_upgrade: yes - name: Force-upgrade all packages (equivalent to pkgin -F full-upgrade) community.general.pkgin: full_upgrade: yes force: yes - name: Clean packages cache (equivalent to pkgin clean) community.general.pkgin: clean: yes ``` ### Authors * Larry Gilbert (@L2G) * Shaun Zinck (@szinck) * Jasper Lievisse Adriaanse (@jasperla) ansible community.general.manageiq_provider – Management of provider in ManageIQ. community.general.manageiq\_provider – Management of provider in ManageIQ. ========================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.manageiq_provider`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * The manageiq\_provider module supports adding, updating, and deleting provider in ManageIQ. Requirements ------------ The below requirements are needed on the host that executes this module. * manageiq-client <https://github.com/ManageIQ/manageiq-api-client-python/> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **alerts** string | | Alerts endpoint connection information. | | | **auth\_key** string | | Provider's api endpoint authentication bearer token. defaults to None. | | | **certificate\_authority** string | | The CA bundle string with custom certificates. defaults to None. | | | **hostname** string / required | | The provider's api hostname. | | | **password** string | | Provider's api endpoint authentication password. defaults to None. | | | **port** integer | | The provider's api port. | | | **security\_protocol** string | **Choices:*** ssl-with-validation * ssl-with-validation-custom-ca * ssl-without-validation * non-ssl | How SSL certificates should be used for HTTPS requests. defaults to None. | | | **userid** string | | Provider's api endpoint authentication userid. defaults to None. | | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether SSL certificates should be verified for HTTPS requests (deprecated). defaults to True. | | **api\_version** string | **Choices:*** v2 * v3 | The OpenStack Keystone API version. defaults to None. | | **azure\_tenant\_id** string | | Tenant ID. defaults to None. aliases: keystone\_v3\_domain\_id | | **host\_default\_vnc\_port\_end** string | | The last port in the host VNC range. defaults to None. | | **host\_default\_vnc\_port\_start** string | | The first port in the host VNC range. defaults to None. | | **manageiq\_connection** dictionary | | ManageIQ connection configuration information. | | | **ca\_cert** string | | The path to a CA bundle file or directory with certificates. defaults to None. aliases: ca\_bundle\_path | | | **password** string | | ManageIQ password. `MIQ_PASSWORD` env var if set. otherwise, required if no token is passed in. | | | **token** string | | ManageIQ token. `MIQ_TOKEN` env var if set. otherwise, required if no username or password is passed in. | | | **url** string | | ManageIQ environment url. `MIQ_URL` env var if set. otherwise, it is required to pass it. | | | **username** string | | ManageIQ username. `MIQ_USERNAME` env var if set. otherwise, required if no token is passed in. | | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether SSL certificates should be verified for HTTPS requests. defaults to True. aliases: verify\_ssl | | **metrics** string | | Metrics endpoint connection information. | | | **auth\_key** string | | Provider's api endpoint authentication bearer token. defaults to None. | | | **certificate\_authority** string | | The CA bundle string with custom certificates. defaults to None. | | | **hostname** string / required | | The provider's api hostname. | | | **password** string | | Provider's api endpoint authentication password. defaults to None. | | | **path** string | | Database name for oVirt metrics. Defaults to `ovirt_engine_history`. | | | **port** integer | | The provider's api port. | | | **security\_protocol** string | **Choices:*** ssl-with-validation * ssl-with-validation-custom-ca * ssl-without-validation * non-ssl | How SSL certificates should be used for HTTPS requests. defaults to None. | | | **userid** string | | Provider's api endpoint authentication userid. defaults to None. | | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether SSL certificates should be verified for HTTPS requests (deprecated). defaults to True. | | **name** string / required | | The provider's name. | | **project** string | | Google Compute Engine Project ID. defaults to None. | | **provider** string | | Default endpoint connection information, required if state is true. | | | **auth\_key** string | | Provider's api endpoint authentication bearer token. defaults to None. | | | **certificate\_authority** string | | The CA bundle string with custom certificates. defaults to None. | | | **hostname** string / required | | The provider's api hostname. | | | **password** string | | Provider's api endpoint authentication password. defaults to None. | | | **port** integer | | The provider's api port. | | | **security\_protocol** string | **Choices:*** ssl-with-validation * ssl-with-validation-custom-ca * ssl-without-validation * non-ssl | How SSL certificates should be used for HTTPS requests. defaults to None. | | | **userid** string | | Provider's api endpoint authentication userid. defaults to None. | | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether SSL certificates should be verified for HTTPS requests (deprecated). defaults to True. | | **provider\_region** string | | The provider region name to connect to (e.g. AWS region for Amazon). | | **ssh\_keypair** string | | SSH key pair used for SSH connections to all hosts in this provider. | | | **auth\_key** string | | SSH private key. | | | **hostname** string / required | | Director hostname. | | | **userid** string | | SSH username. | | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether certificates should be verified for connections. aliases: verify\_ssl | | **state** string | **Choices:*** absent * **present** ← * refresh | absent - provider should not exist, present - provider should be present, refresh - provider will be refreshed | | **subscription** string | | Microsoft Azure subscription ID. defaults to None. | | **tenant\_mapping\_enabled** boolean | **Choices:*** **no** ← * yes | Whether to enable mapping of existing tenants. defaults to False. | | **type** string | **Choices:*** Openshift * Amazon * oVirt * VMware * Azure * Director * OpenStack * GCE | The provider's type. | | **zone** string | **Default:**"default" | The ManageIQ zone name that will manage the provider. | Examples -------- ``` - name: Create a new provider in ManageIQ ('Hawkular' metrics) community.general.manageiq_provider: name: 'EngLab' type: 'OpenShift' state: 'present' provider: auth_key: 'topSecret' hostname: 'example.com' port: 8443 validate_certs: true security_protocol: 'ssl-with-validation-custom-ca' certificate_authority: | -----BEGIN CERTIFICATE----- FAKECERTsdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu c2hpZnQtc2lnbmVyQDE1MDMzMjAxMTkwHhcNMTcwODIxMTI1NTE5WhcNMjIwODIw MTI1NTIwWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MDMzMjAxMTkw ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDUDnL2tQ2xf/zO7F7hmZ4S ZuwKENdI4IYuWSxye4i3hPhKg6eKPzGzmDNWkIMDOrDAj1EgVSNPtPwsOL8OWvJm AaTjr070D7ZGWWnrrDrWEClBx9Rx/6JAM38RT8Pu7c1hXBm0J81KufSLLYiZ/gOw Znks5v5RUSGcAXvLkBJeATbsbh6fKX0RgQ3fFTvqQaE/r8LxcTN1uehPX1g5AaRa z/SNDHaFtQlE3XcqAAukyMn4N5kdNcuwF3GlQ+tJnJv8SstPkfQcZbTMUQ7I2KpJ ajXnMxmBhV5fCN4rb0QUNCrk2/B+EUMBY4MnxIakqNxnN1kvgI7FBbFgrHUe6QvJ AgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG SIb3DQEBCwUAA4IBAQAYRV57LUsqznSLZHA77o9+0fQetIE115DYP7wea42PODJI QJ+JETEfoCr0+YOMAbVmznP9GH5cMTKEWHExcIpbMBU7nMZp6A3htcJgF2fgPzOA aTUtzkuVCSrV//mbbYVxoFOc6sR3Br0wBs5+5iz3dBSt7xmgpMzZvqsQl655i051 gGSTIY3z5EJmBZBjwuTjal9mMoPGA4eoTPqlITJDHQ2bdCV2oDbc7zqupGrUfZFA qzgieEyGzdCSRwjr1/PibA3bpwHyhD9CGD0PRVVTLhw6h6L5kuN1jA20OfzWxf/o XUsdmRaWiF+l4s6Dcd56SuRp5SGNa2+vP9Of/FX5 -----END CERTIFICATE----- metrics: auth_key: 'topSecret' role: 'hawkular' hostname: 'example.com' port: 443 validate_certs: true security_protocol: 'ssl-with-validation-custom-ca' certificate_authority: | -----BEGIN CERTIFICATE----- FAKECERTsdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu c2hpZnQtc2lnbmVyQDE1MDMzMjAxMTkwHhcNMTcwODIxMTI1NTE5WhcNMjIwODIw MTI1NTIwWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MDMzMjAxMTkw ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDUDnL2tQ2xf/zO7F7hmZ4S ZuwKENdI4IYuWSxye4i3hPhKg6eKPzGzmDNWkIMDOrDAj1EgVSNPtPwsOL8OWvJm AaTjr070D7ZGWWnrrDrWEClBx9Rx/6JAM38RT8Pu7c1hXBm0J81KufSLLYiZ/gOw Znks5v5RUSGcAXvLkBJeATbsbh6fKX0RgQ3fFTvqQaE/r8LxcTN1uehPX1g5AaRa z/SNDHaFtQlE3XcqAAukyMn4N5kdNcuwF3GlQ+tJnJv8SstPkfQcZbTMUQ7I2KpJ ajXnMxmBhV5fCN4rb0QUNCrk2/B+EUMBY4MnxIakqNxnN1kvgI7FBbFgrHUe6QvJ AgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG SIb3DQEBCwUAA4IBAQAYRV57LUsqznSLZHA77o9+0fQetIE115DYP7wea42PODJI QJ+JETEfoCr0+YOMAbVmznP9GH5cMTKEWHExcIpbMBU7nMZp6A3htcJgF2fgPzOA aTUtzkuVCSrV//mbbYVxoFOc6sR3Br0wBs5+5iz3dBSt7xmgpMzZvqsQl655i051 gGSTIY3z5EJmBZBjwuTjal9mMoPGA4eoTPqlITJDHQ2bdCV2oDbc7zqupGrUfZFA qzgieEyGzdCSRwjr1/PibA3bpwHyhD9CGD0PRVVTLhw6h6L5kuN1jA20OfzWxf/o XUsdmRaWiF+l4s6Dcd56SuRp5SGNa2+vP9Of/FX5 -----END CERTIFICATE----- manageiq_connection: url: 'https://127.0.0.1:80' username: 'admin' password: 'password' validate_certs: true - name: Update an existing provider named 'EngLab' (defaults to 'Prometheus' metrics) community.general.manageiq_provider: name: 'EngLab' type: 'Openshift' state: 'present' provider: auth_key: 'topSecret' hostname: 'next.example.com' port: 8443 validate_certs: true security_protocol: 'ssl-with-validation-custom-ca' certificate_authority: | -----BEGIN CERTIFICATE----- FAKECERTsdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu c2hpZnQtc2lnbmVyQDE1MDMzMjAxMTkwHhcNMTcwODIxMTI1NTE5WhcNMjIwODIw MTI1NTIwWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MDMzMjAxMTkw ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDUDnL2tQ2xf/zO7F7hmZ4S ZuwKENdI4IYuWSxye4i3hPhKg6eKPzGzmDNWkIMDOrDAj1EgVSNPtPwsOL8OWvJm AaTjr070D7ZGWWnrrDrWEClBx9Rx/6JAM38RT8Pu7c1hXBm0J81KufSLLYiZ/gOw Znks5v5RUSGcAXvLkBJeATbsbh6fKX0RgQ3fFTvqQaE/r8LxcTN1uehPX1g5AaRa z/SNDHaFtQlE3XcqAAukyMn4N5kdNcuwF3GlQ+tJnJv8SstPkfQcZbTMUQ7I2KpJ ajXnMxmBhV5fCN4rb0QUNCrk2/B+EUMBY4MnxIakqNxnN1kvgI7FBbFgrHUe6QvJ AgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG SIb3DQEBCwUAA4IBAQAYRV57LUsqznSLZHA77o9+0fQetIE115DYP7wea42PODJI QJ+JETEfoCr0+YOMAbVmznP9GH5cMTKEWHExcIpbMBU7nMZp6A3htcJgF2fgPzOA aTUtzkuVCSrV//mbbYVxoFOc6sR3Br0wBs5+5iz3dBSt7xmgpMzZvqsQl655i051 gGSTIY3z5EJmBZBjwuTjal9mMoPGA4eoTPqlITJDHQ2bdCV2oDbc7zqupGrUfZFA qzgieEyGzdCSRwjr1/PibA3bpwHyhD9CGD0PRVVTLhw6h6L5kuN1jA20OfzWxf/o XUsdmRaWiF+l4s6Dcd56SuRp5SGNa2+vP9Of/FX5 -----END CERTIFICATE----- metrics: auth_key: 'topSecret' hostname: 'next.example.com' port: 443 validate_certs: true security_protocol: 'ssl-with-validation-custom-ca' certificate_authority: | -----BEGIN CERTIFICATE----- FAKECERTsdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu c2hpZnQtc2lnbmVyQDE1MDMzMjAxMTkwHhcNMTcwODIxMTI1NTE5WhcNMjIwODIw MTI1NTIwWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MDMzMjAxMTkw ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDUDnL2tQ2xf/zO7F7hmZ4S ZuwKENdI4IYuWSxye4i3hPhKg6eKPzGzmDNWkIMDOrDAj1EgVSNPtPwsOL8OWvJm AaTjr070D7ZGWWnrrDrWEClBx9Rx/6JAM38RT8Pu7c1hXBm0J81KufSLLYiZ/gOw Znks5v5RUSGcAXvLkBJeATbsbh6fKX0RgQ3fFTvqQaE/r8LxcTN1uehPX1g5AaRa z/SNDHaFtQlE3XcqAAukyMn4N5kdNcuwF3GlQ+tJnJv8SstPkfQcZbTMUQ7I2KpJ ajXnMxmBhV5fCN4rb0QUNCrk2/B+EUMBY4MnxIakqNxnN1kvgI7FBbFgrHUe6QvJ AgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG SIb3DQEBCwUAA4IBAQAYRV57LUsqznSLZHA77o9+0fQetIE115DYP7wea42PODJI QJ+JETEfoCr0+YOMAbVmznP9GH5cMTKEWHExcIpbMBU7nMZp6A3htcJgF2fgPzOA aTUtzkuVCSrV//mbbYVxoFOc6sR3Br0wBs5+5iz3dBSt7xmgpMzZvqsQl655i051 gGSTIY3z5EJmBZBjwuTjal9mMoPGA4eoTPqlITJDHQ2bdCV2oDbc7zqupGrUfZFA qzgieEyGzdCSRwjr1/PibA3bpwHyhD9CGD0PRVVTLhw6h6L5kuN1jA20OfzWxf/o XUsdmRaWiF+l4s6Dcd56SuRp5SGNa2+vP9Of/FX5 -----END CERTIFICATE----- manageiq_connection: url: 'https://127.0.0.1' username: 'admin' password: 'password' validate_certs: true - name: Delete a provider in ManageIQ community.general.manageiq_provider: name: 'EngLab' type: 'Openshift' state: 'absent' manageiq_connection: url: 'https://127.0.0.1' username: 'admin' password: 'password' validate_certs: true - name: Create a new Amazon provider in ManageIQ using token authentication community.general.manageiq_provider: name: 'EngAmazon' type: 'Amazon' state: 'present' provider: hostname: 'amazon.example.com' userid: 'hello' password: 'world' manageiq_connection: url: 'https://127.0.0.1' token: 'VeryLongToken' validate_certs: true - name: Create a new oVirt provider in ManageIQ community.general.manageiq_provider: name: 'RHEV' type: 'oVirt' state: 'present' provider: hostname: 'rhev01.example.com' userid: 'admin@internal' password: 'password' validate_certs: true certificate_authority: | -----BEGIN CERTIFICATE----- FAKECERTsdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu c2hpZnQtc2lnbmVyQDE1MDMzMjAxMTkwHhcNMTcwODIxMTI1NTE5WhcNMjIwODIw MTI1NTIwWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MDMzMjAxMTkw ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDUDnL2tQ2xf/zO7F7hmZ4S ZuwKENdI4IYuWSxye4i3hPhKg6eKPzGzmDNWkIMDOrDAj1EgVSNPtPwsOL8OWvJm AaTjr070D7ZGWWnrrDrWEClBx9Rx/6JAM38RT8Pu7c1hXBm0J81KufSLLYiZ/gOw Znks5v5RUSGcAXvLkBJeATbsbh6fKX0RgQ3fFTvqQaE/r8LxcTN1uehPX1g5AaRa z/SNDHaFtQlE3XcqAAukyMn4N5kdNcuwF3GlQ+tJnJv8SstPkfQcZbTMUQ7I2KpJ ajXnMxmBhV5fCN4rb0QUNCrk2/B+EUMBY4MnxIakqNxnN1kvgI7FBbFgrHUe6QvJ AgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG SIb3DQEBCwUAA4IBAQAYRV57LUsqznSLZHA77o9+0fQetIE115DYP7wea42PODJI QJ+JETEfoCr0+YOMAbVmznP9GH5cMTKEWHExcIpbMBU7nMZp6A3htcJgF2fgPzOA aTUtzkuVCSrV//mbbYVxoFOc6sR3Br0wBs5+5iz3dBSt7xmgpMzZvqsQl655i051 gGSTIY3z5EJmBZBjwuTjal9mMoPGA4eoTPqlITJDHQ2bdCV2oDbc7zqupGrUfZFA qzgieEyGzdCSRwjr1/PibA3bpwHyhD9CGD0PRVVTLhw6h6L5kuN1jA20OfzWxf/o XUsdmRaWiF+l4s6Dcd56SuRp5SGNa2+vP9Of/FX5 -----END CERTIFICATE----- metrics: hostname: 'metrics.example.com' path: 'ovirt_engine_history' userid: 'user_id_metrics' password: 'password_metrics' validate_certs: true certificate_authority: | -----BEGIN CERTIFICATE----- FAKECERTsdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu c2hpZnQtc2lnbmVyQDE1MDMzMjAxMTkwHhcNMTcwODIxMTI1NTE5WhcNMjIwODIw MTI1NTIwWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MDMzMjAxMTkw ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDUDnL2tQ2xf/zO7F7hmZ4S ZuwKENdI4IYuWSxye4i3hPhKg6eKPzGzmDNWkIMDOrDAj1EgVSNPtPwsOL8OWvJm AaTjr070D7ZGWWnrrDrWEClBx9Rx/6JAM38RT8Pu7c1hXBm0J81KufSLLYiZ/gOw Znks5v5RUSGcAXvLkBJeATbsbh6fKX0RgQ3fFTvqQaE/r8LxcTN1uehPX1g5AaRa z/SNDHaFtQlE3XcqAAukyMn4N5kdNcuwF3GlQ+tJnJv8SstPkfQcZbTMUQ7I2KpJ ajXnMxmBhV5fCN4rb0QUNCrk2/B+EUMBY4MnxIakqNxnN1kvgI7FBbFgrHUe6QvJ AgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG SIb3DQEBCwUAA4IBAQAYRV57LUsqznSLZHA77o9+0fQetIE115DYP7wea42PODJI QJ+JETEfoCr0+YOMAbVmznP9GH5cMTKEWHExcIpbMBU7nMZp6A3htcJgF2fgPzOA aTUtzkuVCSrV//mbbYVxoFOc6sR3Br0wBs5+5iz3dBSt7xmgpMzZvqsQl655i051 gGSTIY3z5EJmBZBjwuTjal9mMoPGA4eoTPqlITJDHQ2bdCV2oDbc7zqupGrUfZFA qzgieEyGzdCSRwjr1/PibA3bpwHyhD9CGD0PRVVTLhw6h6L5kuN1jA20OfzWxf/o XUsdmRaWiF+l4s6Dcd56SuRp5SGNa2+vP9Of/FX5 -----END CERTIFICATE----- manageiq_connection: url: 'https://127.0.0.1' username: 'admin' password: 'password' validate_certs: true - name: Create a new VMware provider in ManageIQ community.general.manageiq_provider: name: 'EngVMware' type: 'VMware' state: 'present' provider: hostname: 'vcenter.example.com' host_default_vnc_port_start: 5800 host_default_vnc_port_end: 5801 userid: 'root' password: 'password' manageiq_connection: url: 'https://127.0.0.1' token: 'VeryLongToken' validate_certs: true - name: Create a new Azure provider in ManageIQ community.general.manageiq_provider: name: 'EngAzure' type: 'Azure' provider_region: 'northeurope' subscription: 'e272bd74-f661-484f-b223-88dd128a4049' azure_tenant_id: 'e272bd74-f661-484f-b223-88dd128a4048' state: 'present' provider: hostname: 'azure.example.com' userid: 'e272bd74-f661-484f-b223-88dd128a4049' password: 'password' manageiq_connection: url: 'https://cf-6af0.rhpds.opentlc.com' username: 'admin' password: 'password' validate_certs: false - name: Create a new OpenStack Director provider in ManageIQ with rsa keypair community.general.manageiq_provider: name: 'EngDirector' type: 'Director' api_version: 'v3' state: 'present' provider: hostname: 'director.example.com' userid: 'admin' password: 'password' security_protocol: 'ssl-with-validation' validate_certs: 'true' certificate_authority: | -----BEGIN CERTIFICATE----- FAKECERTsdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu c2hpZnQtc2lnbmVyQDE1MDMzMjAxMTkwHhcNMTcwODIxMTI1NTE5WhcNMjIwODIw MTI1NTIwWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MDMzMjAxMTkw ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDUDnL2tQ2xf/zO7F7hmZ4S ZuwKENdI4IYuWSxye4i3hPhKg6eKPzGzmDNWkIMDOrDAj1EgVSNPtPwsOL8OWvJm AaTjr070D7ZGWWnrrDrWEClBx9Rx/6JAM38RT8Pu7c1hXBm0J81KufSLLYiZ/gOw Znks5v5RUSGcAXvLkBJeATbsbh6fKX0RgQ3fFTvqQaE/r8LxcTN1uehPX1g5AaRa z/SNDHaFtQlE3XcqAAukyMn4N5kdNcuwF3GlQ+tJnJv8SstPkfQcZbTMUQ7I2KpJ ajXnMxmBhV5fCN4rb0QUNCrk2/B+EUMBY4MnxIakqNxnN1kvgI7FBbFgrHUe6QvJ AgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG SIb3DQEBCwUAA4IBAQAYRV57LUsqznSLZHA77o9+0fQetIE115DYP7wea42PODJI QJ+JETEfoCr0+YOMAbVmznP9GH5cMTKEWHExcIpbMBU7nMZp6A3htcJgF2fgPzOA aTUtzkuVCSrV//mbbYVxoFOc6sR3Br0wBs5+5iz3dBSt7xmgpMzZvqsQl655i051 gGSTIY3z5EJmBZBjwuTjal9mMoPGA4eoTPqlITJDHQ2bdCV2oDbc7zqupGrUfZFA qzgieEyGzdCSRwjr1/PibA3bpwHyhD9CGD0PRVVTLhw6h6L5kuN1jA20OfzWxf/o XUsdmRaWiF+l4s6Dcd56SuRp5SGNa2+vP9Of/FX5 -----END CERTIFICATE----- ssh_keypair: hostname: director.example.com userid: heat-admin auth_key: 'SecretSSHPrivateKey' - name: Create a new OpenStack provider in ManageIQ with amqp metrics community.general.manageiq_provider: name: 'EngOpenStack' type: 'OpenStack' api_version: 'v3' state: 'present' provider_region: 'europe' tenant_mapping_enabled: 'False' keystone_v3_domain_id: 'mydomain' provider: hostname: 'openstack.example.com' userid: 'admin' password: 'password' security_protocol: 'ssl-with-validation' validate_certs: 'true' certificate_authority: | -----BEGIN CERTIFICATE----- FAKECERTsdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu c2hpZnQtc2lnbmVyQDE1MDMzMjAxMTkwHhcNMTcwODIxMTI1NTE5WhcNMjIwODIw MTI1NTIwWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MDMzMjAxMTkw ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDUDnL2tQ2xf/zO7F7hmZ4S ZuwKENdI4IYuWSxye4i3hPhKg6eKPzGzmDNWkIMDOrDAj1EgVSNPtPwsOL8OWvJm AaTjr070D7ZGWWnrrDrWEClBx9Rx/6JAM38RT8Pu7c1hXBm0J81KufSLLYiZ/gOw Znks5v5RUSGcAXvLkBJeATbsbh6fKX0RgQ3fFTvqQaE/r8LxcTN1uehPX1g5AaRa z/SNDHaFtQlE3XcqAAukyMn4N5kdNcuwF3GlQ+tJnJv8SstPkfQcZbTMUQ7I2KpJ ajXnMxmBhV5fCN4rb0QUNCrk2/B+EUMBY4MnxIakqNxnN1kvgI7FBbFgrHUe6QvJ AgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG SIb3DQEBCwUAA4IBAQAYRV57LUsqznSLZHA77o9+0fQetIE115DYP7wea42PODJI QJ+JETEfoCr0+YOMAbVmznP9GH5cMTKEWHExcIpbMBU7nMZp6A3htcJgF2fgPzOA aTUtzkuVCSrV//mbbYVxoFOc6sR3Br0wBs5+5iz3dBSt7xmgpMzZvqsQl655i051 gGSTIY3z5EJmBZBjwuTjal9mMoPGA4eoTPqlITJDHQ2bdCV2oDbc7zqupGrUfZFA qzgieEyGzdCSRwjr1/PibA3bpwHyhD9CGD0PRVVTLhw6h6L5kuN1jA20OfzWxf/o XUsdmRaWiF+l4s6Dcd56SuRp5SGNa2+vP9Of/FX5 -----END CERTIFICATE----- metrics: role: amqp hostname: 'amqp.example.com' security_protocol: 'non-ssl' port: 5666 userid: admin password: password - name: Create a new GCE provider in ManageIQ community.general.manageiq_provider: name: 'EngGoogle' type: 'GCE' provider_region: 'europe-west1' project: 'project1' state: 'present' provider: hostname: 'gce.example.com' auth_key: 'google_json_key' validate_certs: 'false' ``` ### Authors * Daniel Korn (@dkorn)
programming_docs
ansible community.general.ipa_sudocmdgroup – Manage FreeIPA sudo command group community.general.ipa\_sudocmdgroup – Manage FreeIPA sudo command group ======================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ipa_sudocmdgroup`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Add, modify or delete sudo command group within IPA server using IPA API. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **cn** string / required | | Sudo Command Group. aliases: name | | **description** string | | Group description. | | **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_prot** string | **Choices:*** http * **https** ← | Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. | | **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **state** string | **Choices:*** absent * disabled * enabled * **present** ← | State to ensure. | | **sudocmd** list / elements=string | | List of sudo commands to assign to the group. If an empty list is passed all assigned commands will be removed from the group. If option is omitted sudo commands will not be checked or changed. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | This only applies if `ipa_prot` is *https*. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Ensure sudo command group exists community.general.ipa_sudocmdgroup: name: group01 description: Group of important commands sudocmd: - su ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - name: Ensure sudo command group does not exist community.general.ipa_sudocmdgroup: name: group01 state: absent ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **sudocmdgroup** dictionary | always | Sudo command group as returned by IPA API | ### Authors * Thomas Krahn (@Nosmoht) ansible community.general.nios_aaaa_record – Configure Infoblox NIOS AAAA records community.general.nios\_aaaa\_record – Configure Infoblox NIOS AAAA records =========================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nios_aaaa_record`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Status](#status) DEPRECATED ---------- Removed in version 5.0.0 Why Please install the infoblox.nios\_modules collection and use the corresponding module from it. Alternative infoblox.nios\_modules.nios\_aaaa\_record Synopsis -------- * Adds and/or removes instances of AAAA record objects from Infoblox NIOS servers. This module manages NIOS `record:aaaa` objects using the Infoblox WAPI interface over REST. Requirements ------------ The below requirements are needed on the host that executes this module. * infoblox-client Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **comment** string | | Configures a text string comment to be associated with the instance of this object. The provided text string will be configured on the object instance. | | **extattrs** dictionary | | Allows for the configuration of Extensible Attributes on the instance of the object. This argument accepts a set of key / value pairs for configuration. | | **ipv6addr** string | | Configures the IPv6 address for this AAAA record. aliases: ipv6 | | **name** string / required | | Specifies the fully qualified hostname to add or remove from the system | | **provider** dictionary | | A dict object containing connection details. | | | **host** string | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. | | | **http\_pool\_connections** integer | **Default:**10 | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_pool\_maxsize** integer | **Default:**10 | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_request\_timeout** integer | **Default:**10 | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. | | | **max\_results** integer | **Default:**1000 | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. | | | **max\_retries** integer | **Default:**3 | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. | | | **password** string | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. | | | **silent\_ssl\_warnings** boolean | **Choices:*** no * **yes** ← | Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **username** string | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. | | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable. aliases: ssl\_verify | | | **wapi\_version** string | **Default:**"2.1" | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 | | **state** string | **Choices:*** **present** ← * absent | Configures the intended state of the instance of the object on the NIOS server. When this value is set to `present`, the object is configured on the device and when this value is set to `absent` the value is removed (if necessary) from the device. | | **ttl** integer | | Configures the TTL to be associated with this AAAA record | | **view** string | **Default:**"default" | Sets the DNS view to associate this AAAA record with. The DNS view must already be configured on the system aliases: dns\_view | Notes ----- Note * This module must be run locally, which can be achieved by specifying `connection: local`. * Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible. Examples -------- ``` - name: Configure an AAAA record community.general.nios_aaaa_record: name: aaaa.ansible.com ipv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Add a comment to an existing AAAA record community.general.nios_aaaa_record: name: aaaa.ansible.com ipv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 comment: this is a test comment state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Remove an AAAA record from the system community.general.nios_aaaa_record: name: aaaa.ansible.com ipv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 state: absent provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Update an AAAA record name community.general.nios_aaaa_record: name: {new_name: aaaa_new.ansible.com, old_name: aaaa.ansible.com} ipv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local ``` Status ------ * This module will be removed in version 5.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Blair Rampling (@brampling) ansible community.general.null – Don’t display stuff to screen community.general.null – Don’t display stuff to screen ====================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.null`. * [Synopsis](#synopsis) * [Requirements](#requirements) Synopsis -------- * This callback prevents outputing events to screen Requirements ------------ The below requirements are needed on the local controller node that executes this callback. * set as main display callback ### Authors * Unknown (!UNKNOWN) ansible community.general.sap_task_list_execute – Perform SAP Task list execution community.general.sap\_task\_list\_execute – Perform SAP Task list execution ============================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.sap_task_list_execute`. New in version 3.5.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * The `sap_task_list_execute` module depends on `pyrfc` Python library (version 2.4.0 and upwards). Depending on distribution you are using, you may need to install additional packages to have these available. * Tasks in the task list which requires manual activities will be confirmed automatically. * This module will use the RFC package `STC_TM_API`. Requirements ------------ The below requirements are needed on the host that executes this module. * pyrfc >= 2.4.0 * xmltodict Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **client** string | **Default:**"000" | The client number to connect to. You must quote the value to ensure retaining the leading zeros. | | **conn\_password** string / required | | The required password for the SAP system. | | **conn\_username** string / required | | The required username for the SAP system. | | **host** string / required | | The required host for the SAP system. Can be either an FQDN or IP Address. | | **sysnr** string | **Default:**"00" | The system number of the SAP system. You must quote the value to ensure retaining the leading zeros. | | **task\_parameters** list / elements=dictionary | | The tasks and the parameters for execution. If the task list do not need any parameters. This could be empty. If only specific tasks from the task list should be executed. The tasks even when no parameter is needed must be provided. Alongside with the module parameter *task\_skip=true*. | | | **FIELDNAME** string | | The name of the field of the task. | | | **TASKNAME** string / required | | The name of the task in the task list. | | | **VALUE** raw | | The value which have to be set. | | **task\_settings** list / elements=string | **Default:**["BATCH"] | Setting for the execution of the task list. This can be the following as in TCODE SE80 described. Check Mode `CHECKRUN`, Background Processing Active `BATCH` (this is the default value), Asynchronous Execution `ASYNC`, Trace Mode `TRACE`, Server Name `BATCH_TARGET`. | | **task\_skip** boolean | **Choices:*** **no** ← * yes | If this parameter is `true` not defined tasks in *task\_parameters* are skipped. This could be the case when only certain tasks should run from the task list. | | **task\_to\_execute** string / required | | The task list which will be executed. | Notes ----- Note * Does not support `check_mode`. Examples -------- ``` # Pass in a message - name: Test task execution community.general.sap_task_list_execute: conn_username: DDIC conn_password: Passwd1234 host: 10.1.8.10 sysnr: '01' client: '000' task_to_execute: SAP_BASIS_SSL_CHECK task_settings: batch - name: Pass in input parameters community.general.sap_task_list_execute: conn_username: DDIC conn_password: Passwd1234 host: 10.1.8.10 sysnr: '00' client: '000' task_to_execute: SAP_BASIS_SSL_CHECK task_parameters : - { 'TASKNAME': 'CL_STCT_CHECK_SEC_CRYPTO', 'FIELDNAME': 'P_OPT2', 'VALUE': 'X' } - TASKNAME: CL_STCT_CHECK_SEC_CRYPTO FIELDNAME: P_OPT3 VALUE: X task_settings: batch # Exported environement variables. - name: Hint if module will fail with error message like ImportError libsapnwrfc.so... community.general.sap_task_list_execute: conn_username: DDIC conn_password: Passwd1234 host: 10.1.8.10 sysnr: '00' client: '000' task_to_execute: SAP_BASIS_SSL_CHECK task_settings: batch environment: SAPNWRFC_HOME: /usr/local/sap/nwrfcsdk LD_LIBRARY_PATH: /usr/local/sap/nwrfcsdk/lib ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **msg** string | always | A small execution description. **Sample:** Successful | | **out** list / elements=dictionary | on success | A complete description of the executed tasks. If this is available. **Sample:** ['...', {'LOG': {'STCTM\_S\_LOG': [{'ACTIVITY': 'U\_CONFIG', 'ACTIVITY\_DESCR': 'Configuration changed', 'DETAILS': None, 'EXEC\_ID': '20210728184903.815739', 'FIELD': None, 'ID': 'STC\_TASK', 'LOG\_MSG\_NO': '000000', 'LOG\_NO': None, 'MESSAGE': 'For radiobutton group ICM too many options are set; choose only one option', 'MESSAGE\_V1': 'ICM', 'MESSAGE\_V2': None, 'MESSAGE\_V3': None, 'MESSAGE\_V4': None, 'NUMBER': '048', 'PARAMETER': None, 'PERIOD': 'M', 'PERIOD\_DESCR': 'Maintenance', 'ROW': '0', 'SRC\_LINE': '170', 'SRC\_OBJECT': 'CL\_STCTM\_REPORT\_UI IF\_STCTM\_UI\_TASK~SET\_PARAMETERS', 'SYSTEM': None, 'TIMESTMP': '20210728184903', 'TSTPNM': 'DDIC', 'TYPE': 'E'}, '...']}}] | ### Authors * Rainer Leber (@rainerleber) ansible community.general.utm_proxy_frontend_info – create, update or destroy reverse_proxy frontend entry in Sophos UTM community.general.utm\_proxy\_frontend\_info – create, update or destroy reverse\_proxy frontend entry in Sophos UTM ==================================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.utm_proxy_frontend_info`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Create, update or destroy a reverse\_proxy frontend entry in SOPHOS UTM. * This module needs to have the REST Ability of the UTM to be activated. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **headers** dictionary | | A dictionary of additional headers to be sent to POST and PUT requests. Is needed for some modules | | **name** string / required | | The name of the object. Will be used to identify the entry | | **state** string | **Choices:*** absent * **present** ← | The desired state of the object. `present` will create or update an object `absent` will delete an object if it was present | | **utm\_host** string / required | | The REST Endpoint of the Sophos UTM. | | **utm\_port** integer | **Default:**4444 | The port of the REST interface. | | **utm\_protocol** string | **Choices:*** http * **https** ← | The protocol of the REST Endpoint. | | **utm\_token** string / required | | The token used to identify at the REST-API. See <https://www.sophos.com/en-us/medialibrary/PDFs/documentation/UTMonAWS/Sophos-UTM-RESTful-API.pdf?la=en>, Chapter 2.4.2. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether the REST interface's ssl certificate should be verified or not. | Examples -------- ``` - name: Get utm proxy_frontend community.general.utm_proxy_frontend_info: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestBackendEntry host: REF_OBJECT_STRING ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **result** complex | success | The utm object that was created | | | **\_locked** boolean | success | Whether or not the object is currently locked | | | **\_ref** string | success | The reference name of the object | | | **\_type** string | success | The type of the object | | | **add\_content\_type\_header** boolean | success | Whether to add the content type header | | | **address** string | success | The reference name of the address | | | **allowed\_networks** list / elements=string | success | List of reference names of networks associated | | | **certificate** string | success | Reference name of certificate (ca/host\_key\_cert) | | | **comment** string | success | The comment string | | | **disable\_compression** boolean | success | State of compression support | | | **domain** list / elements=string | success | List of hostnames | | | **exceptions** list / elements=string | success | List of associated proxy exceptions | | | **htmlrewrite** boolean | success | State of html rewrite | | | **htmlrewrite\_cookies** boolean | success | whether the html rewrite cookie will be set | | | **implicitredirect** boolean | success | whether to use implicit redirection | | | **lbmethod** string | success | The method of loadbalancer to use | | | **locations** list / elements=string | success | The reference names of reverse\_proxy/locations associated with the object | | | **name** string | success | The name of the object | | | **port** integer | success | The port of the frontend connection | | | **preservehost** boolean | success | Preserve host header | | | **profile** string | success | The associated reverse\_proxy/profile | | | **status** boolean | success | Whether the frontend object is active or not | | | **type** string | success | The connection type | | | **xheaders** boolean | success | The xheaders state | ### Authors * Johannes Brunswicker (@MatrixCrawler)
programming_docs
ansible community.general.hg – Manages Mercurial (hg) repositories community.general.hg – Manages Mercurial (hg) repositories ========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.hg`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manages Mercurial (hg) repositories. Supports SSH, HTTP/S and local address. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **clone** boolean | **Choices:*** no * **yes** ← | If `no`, do not clone the repository if it does not exist locally. | | **dest** path | | Absolute path of where the repository should be cloned to. This parameter is required, unless clone and update are set to no | | **executable** string | | Path to hg executable to use. If not supplied, the normal mechanism for resolving binary paths will be used. | | **force** boolean | **Choices:*** **no** ← * yes | Discards uncommitted changes. Runs `hg update -C`. Prior to 1.9, the default was `yes`. | | **purge** boolean | **Choices:*** **no** ← * yes | Deletes untracked files. Runs `hg purge`. | | **repo** string / required | | The repository address. aliases: name | | **revision** string | | Equivalent `-r` option in hg command which could be the changeset, revision number, branch name or even tag. aliases: version | | **update** boolean | **Choices:*** no * **yes** ← | If `no`, do not retrieve new revisions from the origin repository | Notes ----- Note * This module does not support push capability. See <https://github.com/ansible/ansible/issues/31156>. * If the task seems to be hanging, first verify remote host is in `known_hosts`. SSH will prompt user to authorize the first contact with a remote host. To avoid this prompt, one solution is to add the remote host public key in `/etc/ssh/ssh_known_hosts` before calling the hg module, with the following command: ssh-keyscan remote\_host.com >> /etc/ssh/ssh\_known\_hosts. * As per 01 Dec 2018, Bitbucket has dropped support for TLSv1 and TLSv1.1 connections. As such, if the underlying system still uses a Python version below 2.7.9, you will have issues checking out bitbucket repositories. See <https://bitbucket.org/blog/deprecating-tlsv1-tlsv1-1-2018-12-01>. Examples -------- ``` - name: Ensure the current working copy is inside the stable branch and deletes untracked files if any. community.general.hg: repo: https://bitbucket.org/user/repo1 dest: /home/user/repo1 revision: stable purge: yes - name: Get information about the repository whether or not it has already been cloned locally. community.general.hg: repo: git://bitbucket.org/user/repo dest: /srv/checkout clone: no update: no ``` ### Authors * Yeukhon Wong (@yeukhon) ansible community.general.utm_aaa_group_info – get info for reverse_proxy frontend entry in Sophos UTM community.general.utm\_aaa\_group\_info – get info for reverse\_proxy frontend entry in Sophos UTM ================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.utm_aaa_group_info`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * get info for a reverse\_proxy frontend entry in SOPHOS UTM. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **headers** dictionary | | A dictionary of additional headers to be sent to POST and PUT requests. Is needed for some modules | | **name** string / required | | The name of the object. Will be used to identify the entry | | **state** string | **Choices:*** absent * **present** ← | The desired state of the object. `present` will create or update an object `absent` will delete an object if it was present | | **utm\_host** string / required | | The REST Endpoint of the Sophos UTM. | | **utm\_port** integer | **Default:**4444 | The port of the REST interface. | | **utm\_protocol** string | **Choices:*** http * **https** ← | The protocol of the REST Endpoint. | | **utm\_token** string / required | | The token used to identify at the REST-API. See <https://www.sophos.com/en-us/medialibrary/PDFs/documentation/UTMonAWS/Sophos-UTM-RESTful-API.pdf?la=en>, Chapter 2.4.2. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether the REST interface's ssl certificate should be verified or not. | Examples -------- ``` - name: Remove UTM aaa_group community.general.utm_aaa_group_info: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestAAAGroupEntry ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **result** complex | success | The utm object that was created | | | **\_locked** boolean | success | Whether or not the object is currently locked | | | **\_ref** string | success | The reference name of the object | | | **\_type** string | success | The type of the object | | | **adirectory\_groups** string | success | List of Active Directory Groups | | | **adirectory\_groups\_sids** list / elements=string | success | List of Active Directory Groups SIDS | | | **backend\_match** string | success | The backend to use | | | **comment** string | success | The comment string | | | **dynamic** string | success | Whether the group match is ipsec\_dn or directory\_group | | | **edirectory\_groups** string | success | List of eDirectory Groups | | | **ipsec\_dn** string | success | ipsec\_dn identifier to match | | | **ldap\_attribute** string | success | The LDAP Attribute to match against | | | **ldap\_attribute\_value** string | success | The LDAP Attribute Value to match against | | | **members** list / elements=string | success | List of member identifiers of the group | | | **name** string | success | The name of the object | | | **network** string | success | The identifier of the network (network/aaa) | | | **radius\_group** string | success | The radius group identifier | | | **tacacs\_group** string | success | The tacacs group identifier | ### Authors * Johannes Brunswicker (@MatrixCrawler) ansible community.general.hwc_network_vpc – Creates a Huawei Cloud VPC community.general.hwc\_network\_vpc – Creates a Huawei Cloud VPC ================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.hwc_network_vpc`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Represents an vpc resource. Requirements ------------ The below requirements are needed on the host that executes this module. * requests >= 2.18.4 * keystoneauth1 >= 3.6.0 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **cidr** string / required | | The range of available subnets in the vpc. | | **domain** string / required | | The name of the Domain to scope to (Identity v3). (currently only domain names are supported, and not domain IDs). | | **id** string | | The id of resource to be managed. | | **identity\_endpoint** string / required | | The Identity authentication URL. | | **name** string / required | | The name of vpc. | | **password** string / required | | The password to login with. | | **project** string / required | | The name of the Tenant (Identity v2) or Project (Identity v3). (currently only project names are supported, and not project IDs). | | **region** string | | The region to which the project belongs. | | **state** string | **Choices:*** **present** ← * absent | Whether the given object should exist in vpc. | | **timeouts** dictionary | | The timeouts for each operations. | | | **create** string | **Default:**"15m" | The timeout for create operation. | | | **delete** string | **Default:**"15m" | The timeout for delete operation. | | | **update** string | **Default:**"15m" | The timeout for update operation. | | **user** string / required | | The user name to login with (currently only user names are supported, and not user IDs). | Notes ----- Note * For authentication, you can set identity\_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT` env variable. * For authentication, you can set user using the `ANSIBLE_HWC_USER` env variable. * For authentication, you can set password using the `ANSIBLE_HWC_PASSWORD` env variable. * For authentication, you can set domain using the `ANSIBLE_HWC_DOMAIN` env variable. * For authentication, you can set project using the `ANSIBLE_HWC_PROJECT` env variable. * For authentication, you can set region using the `ANSIBLE_HWC_REGION` env variable. * Environment variables values will only be used if the playbook values are not set. Examples -------- ``` - name: Create a vpc community.general.hwc_network_vpc: identity_endpoint: "{{ identity_endpoint }}" user: "{{ user }}" password: "{{ password }}" domain: "{{ domain }}" project: "{{ project }}" region: "{{ region }}" name: "vpc_1" cidr: "192.168.100.0/24" state: present ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **cidr** string | success | the range of available subnets in the vpc. | | **enable\_shared\_snat** boolean | success | show whether the shared snat is enabled. | | **id** string | success | the id of vpc. | | **name** string | success | the name of vpc. | | **routes** complex | success | the route information. | | | **destination** string | success | the destination network segment of a route. | | | **next\_hop** string | success | the next hop of a route. If the route type is peering, it will provide VPC peering connection ID. | | **status** string | success | the status of vpc. | ### Authors * Huawei Inc. (@huaweicloud) ansible community.general.logdna – Sends playbook logs to LogDNA community.general.logdna – Sends playbook logs to LogDNA ======================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.logdna`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) Synopsis -------- * This callback will report logs from playbook actions, tasks, and events to LogDNA (<https://app.logdna.com>) Requirements ------------ The below requirements are needed on the local controller node that executes this callback. * LogDNA Python Library (<https://github.com/logdna/python>) * whitelisting in configuration Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **conf\_hostname** string | | ini entries: [callback\_logdna]conf\_hostname = None env:LOGDNA\_HOSTNAME | Alternative Host Name; the current host name by default | | **conf\_key** string / required | | ini entries: [callback\_logdna]conf\_key = None env:LOGDNA\_INGESTION\_KEY | LogDNA Ingestion Key | | **conf\_tags** string | **Default:**"ansible" | ini entries: [callback\_logdna]conf\_tags = ansible env:LOGDNA\_TAGS | Tags | | **plugin\_ignore\_errors** boolean | **Choices:*** **no** ← * yes | ini entries: [callback\_logdna]plugin\_ignore\_errors = no env:ANSIBLE\_IGNORE\_ERRORS | Whether to ignore errors on failing or not | ### Authors * Unknown (!UNKNOWN) ansible community.general.flatpak_remote – Manage flatpak repository remotes community.general.flatpak\_remote – Manage flatpak repository remotes ===================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.flatpak_remote`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Allows users to add or remove flatpak remotes. * The flatpak remotes concept is comparable to what is called repositories in other packaging formats. * Currently, remote addition is only supported via *flatpakrepo* file URLs. * Existing remotes will not be updated. * See the [community.general.flatpak](flatpak_module#ansible-collections-community-general-flatpak-module) module for managing flatpaks. Requirements ------------ The below requirements are needed on the host that executes this module. * flatpak Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **executable** string | **Default:**"flatpak" | The path to the `flatpak` executable to use. By default, this module looks for the `flatpak` executable on the path. | | **flatpakrepo\_url** string | | The URL to the *flatpakrepo* file representing the repository remote to add. When used with *state=present*, the flatpak remote specified under the *flatpakrepo\_url* is added using the specified installation `method`. When used with *state=absent*, this is not required. Required when *state=present*. | | **method** string | **Choices:*** **system** ← * user | The installation method to use. Defines if the *flatpak* is supposed to be installed globally for the whole `system` or only for the current `user`. | | **name** string / required | | The desired name for the flatpak remote to be registered under on the managed host. When used with *state=present*, the remote will be added to the managed host under the specified *name*. When used with *state=absent* the remote with that name will be removed. | | **state** string | **Choices:*** absent * **present** ← | Indicates the desired package state. | Examples -------- ``` - name: Add the Gnome flatpak remote to the system installation community.general.flatpak_remote: name: gnome state: present flatpakrepo_url: https://sdk.gnome.org/gnome-apps.flatpakrepo - name: Add the flathub flatpak repository remote to the user installation community.general.flatpak_remote: name: flathub state: present flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo method: user - name: Remove the Gnome flatpak remote from the user installation community.general.flatpak_remote: name: gnome state: absent method: user - name: Remove the flathub remote from the system installation community.general.flatpak_remote: name: flathub state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **command** string | When a flatpak command has been executed | The exact flatpak command that was executed **Sample:** /usr/bin/flatpak remote-add --system flatpak-test https://dl.flathub.org/repo/flathub.flatpakrepo | | **msg** string | failure | Module error message **Sample:** Executable '/usr/local/bin/flatpak' was not found on the system. | | **rc** integer | When a flatpak command has been executed | Return code from flatpak binary | | **stderr** string | When a flatpak command has been executed | Error output from flatpak binary **Sample:** error: GPG verification enabled, but no summary found (check that the configured URL in remote config is correct) | | **stdout** string | When a flatpak command has been executed | Output from flatpak binary **Sample:** flathub Flathub https://dl.flathub.org/repo/ 1 | ### Authors * John Kwiatkoski (@JayKayy) * Alexander Bethke (@oolongbrothers) ansible community.general.scaleway_user_data – Scaleway user_data management module community.general.scaleway\_user\_data – Scaleway user\_data management module ============================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.scaleway_user_data`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module manages user\_data on compute instances on Scaleway. * It can be used to configure cloud-init for instance Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_timeout** integer | **Default:**30 | HTTP timeout to Scaleway API in seconds. aliases: timeout | | **api\_token** string / required | | Scaleway OAuth token. aliases: oauth\_token | | **api\_url** string | **Default:**"https://api.scaleway.com" | Scaleway API URL. aliases: base\_url | | **query\_parameters** dictionary | **Default:**{} | List of parameters passed to the query string. | | **region** string / required | **Choices:*** ams1 * EMEA-NL-EVS * par1 * EMEA-FR-PAR1 * par2 * EMEA-FR-PAR2 * waw1 * EMEA-PL-WAW1 | Scaleway compute zone | | **server\_id** string / required | | Scaleway Compute instance ID of the server | | **user\_data** dictionary | | User defined data. Typically used with `cloud-init`. Pass your cloud-init script here as a string | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Validate SSL certs of the Scaleway API. | Notes ----- Note * Also see the API documentation on <https://developer.scaleway.com/> * If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `SCW_TOKEN`, `SCW_API_KEY`, `SCW_OAUTH_TOKEN` or `SCW_API_TOKEN`. * If one wants to use a different `api_url` one can also set the `SCW_API_URL` environment variable. Examples -------- ``` - name: Update the cloud-init community.general.scaleway_user_data: server_id: '5a33b4ab-57dd-4eb6-8b0a-d95eb63492ce' region: ams1 user_data: cloud-init: 'final_message: "Hello World!"' ``` ### Authors * Remy Leone (@sieben)
programming_docs
ansible community.general.gitlab_deploy_key – Manages GitLab project deploy keys. community.general.gitlab\_deploy\_key – Manages GitLab project deploy keys. =========================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.gitlab_deploy_key`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Adds, updates and removes project deploy keys Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * python-gitlab python module Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_password** string | | The password to use for authentication against the API | | **api\_token** string | | GitLab token for logging in. | | **api\_url** string | | The resolvable endpoint for the API | | **api\_username** string | | The username to use for authentication against the API | | **can\_push** boolean | **Choices:*** **no** ← * yes | Whether this key can push to the project. | | **key** string / required | | Deploy key | | **project** string / required | | Id or Full path of project in the form of group/name. | | **state** string | **Choices:*** **present** ← * absent | When `present` the deploy key added to the project if it doesn't exist. When `absent` it will be removed from the project if it exists. | | **title** string / required | | Deploy key's title. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether or not to validate SSL certs when supplying a https endpoint. | Examples -------- ``` - name: "Adding a project deploy key" community.general.gitlab_deploy_key: api_url: https://gitlab.example.com/ api_token: "{{ api_token }}" project: "my_group/my_project" title: "Jenkins CI" state: present key: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9w..." - name: "Update the above deploy key to add push access" community.general.gitlab_deploy_key: api_url: https://gitlab.example.com/ api_token: "{{ api_token }}" project: "my_group/my_project" title: "Jenkins CI" state: present can_push: yes - name: "Remove the previous deploy key from the project" community.general.gitlab_deploy_key: api_url: https://gitlab.example.com/ api_token: "{{ api_token }}" project: "my_group/my_project" state: absent key: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9w..." ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **deploy\_key** dictionary | always | API object | | **error** string | failed | the error message returned by the GitLab API **Sample:** 400: key is already in use | | **msg** string | always | Success or failure message **Sample:** Success | | **result** dictionary | always | json parsed response from the server | ### Authors * Marcus Watkins (@marwatk) * Guillaume Martinez (@Lunik) ansible community.general.clc_server – Create, Delete, Start and Stop servers in CenturyLink Cloud. community.general.clc\_server – Create, Delete, Start and Stop servers in CenturyLink Cloud. ============================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.clc_server`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * An Ansible module to Create, Delete, Start and Stop servers in CenturyLink Cloud. Requirements ------------ The below requirements are needed on the host that executes this module. * python = 2.7 * requests >= 2.5.0 * clc-sdk Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **add\_public\_ip** boolean | **Choices:*** **no** ← * yes | Whether to add a public ip to the server | | **additional\_disks** list / elements=dictionary | **Default:**[] | The list of additional disks for the server | | **alert\_policy\_id** string | | The alert policy to assign to the server. This is mutually exclusive with 'alert\_policy\_name'. | | **alert\_policy\_name** string | | The alert policy to assign to the server. This is mutually exclusive with 'alert\_policy\_id'. | | **alias** string | | The account alias to provision the servers under. | | **anti\_affinity\_policy\_id** string | | The anti-affinity policy to assign to the server. This is mutually exclusive with 'anti\_affinity\_policy\_name'. | | **anti\_affinity\_policy\_name** string | | The anti-affinity policy to assign to the server. This is mutually exclusive with 'anti\_affinity\_policy\_id'. | | **configuration\_id** string | | Only required for bare metal servers. Specifies the identifier for the specific configuration type of bare metal server to deploy. | | **count** integer | **Default:**1 | The number of servers to build (mutually exclusive with exact\_count) | | **count\_group** string | | Required when exact\_count is specified. The Server Group use to determine how many servers to deploy. | | **cpu** integer | **Default:**1 | How many CPUs to provision on the server | | **cpu\_autoscale\_policy\_id** string | | The autoscale policy to assign to the server. | | **custom\_fields** list / elements=dictionary | **Default:**[] | The list of custom fields to set on the server. | | **description** string | | The description to set for the server. | | **exact\_count** integer | | Run in idempotent mode. Will insure that this exact number of servers are running in the provided group, creating and deleting them to reach that count. Requires count\_group to be set. | | **group** string | **Default:**"Default Group" | The Server Group to create servers under. | | **ip\_address** string | | The IP Address for the server. One is assigned if not provided. | | **location** string | | The Datacenter to create servers in. | | **managed\_os** boolean | **Choices:*** **no** ← * yes | Whether to create the server as 'Managed' or not. | | **memory** integer | **Default:**1 | Memory in GB. | | **name** string | | A 1 to 6 character identifier to use for the server. This is required when state is 'present' | | **network\_id** string | | The network UUID on which to create servers. | | **os\_type** string | **Choices:*** redHat6\_64Bit * centOS6\_64Bit * windows2012R2Standard\_64Bit * ubuntu14\_64Bit | Only required for bare metal servers. Specifies the OS to provision with the bare metal server. | | **packages** list / elements=dictionary | **Default:**[] | The list of blue print packages to run on the server after its created. | | **password** string | | Password for the administrator / root user | | **primary\_dns** string | | Primary DNS used by the server. | | **public\_ip\_ports** list / elements=dictionary | **Default:**[] | A list of ports to allow on the firewall to the servers public ip, if add\_public\_ip is set to True. | | **public\_ip\_protocol** string | **Choices:*** **TCP** ← * UDP * ICMP | The protocol to use for the public ip if add\_public\_ip is set to True. | | **secondary\_dns** string | | Secondary DNS used by the server. | | **server\_ids** list / elements=string | **Default:**[] | Required for started, stopped, and absent states. A list of server Ids to insure are started, stopped, or absent. | | **source\_server\_password** string | | The password for the source server if a clone is specified. | | **state** string | **Choices:*** **present** ← * absent * started * stopped | The state to insure that the provided resources are in. | | **storage\_type** string | **Choices:*** **standard** ← * hyperscale | The type of storage to attach to the server. | | **template** string | | The template to use for server creation. Will search for a template if a partial string is provided. This is required when state is 'present' | | **ttl** string | | The time to live for the server in seconds. The server will be deleted when this time expires. | | **type** string | **Choices:*** **standard** ← * hyperscale * bareMetal | The type of server to create. | | **wait** boolean | **Choices:*** no * **yes** ← | Whether to wait for the provisioning tasks to finish before returning. | Notes ----- Note * To use this module, it is required to set the below environment variables which enables access to the Centurylink Cloud - CLC\_V2\_API\_USERNAME, the account login id for the centurylink cloud - CLC\_V2\_API\_PASSWORD, the account password for the centurylink cloud * Alternatively, the module accepts the API token and account alias. The API token can be generated using the CLC account login and password via the HTTP api call @ <https://api.ctl.io/v2/authentication/login> - CLC\_V2\_API\_TOKEN, the API token generated from <https://api.ctl.io/v2/authentication/login> - CLC\_ACCT\_ALIAS, the account alias associated with the centurylink cloud * Users can set CLC\_V2\_API\_URL to specify an endpoint for pointing to a different CLC environment. Examples -------- ``` # Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples - name: Provision a single Ubuntu Server community.general.clc_server: name: test template: ubuntu-14-64 count: 1 group: Default Group state: present - name: Ensure 'Default Group' has exactly 5 servers community.general.clc_server: name: test template: ubuntu-14-64 exact_count: 5 count_group: Default Group group: Default Group - name: Stop a Server community.general.clc_server: server_ids: - UC1ACCT-TEST01 state: stopped - name: Start a Server community.general.clc_server: server_ids: - UC1ACCT-TEST01 state: started - name: Delete a Server community.general.clc_server: server_ids: - UC1ACCT-TEST01 state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **partially\_created\_server\_ids** list / elements=string | success | The list of server ids that are partially created **Sample:** ['UC1TEST-SVR01', 'UC1TEST-SVR02'] | | **server\_ids** list / elements=string | success | The list of server ids that are created **Sample:** ['UC1TEST-SVR01', 'UC1TEST-SVR02'] | | **servers** list / elements=string | success | The list of server objects returned from CLC **Sample:** [{'changeInfo': {'createdBy': 'service.wfad', 'createdDate': 1438196820, 'modifiedBy': 'service.wfad', 'modifiedDate': 1438196820}, 'description': 'test-server', 'details': {'alertPolicies': [], 'cpu': 1, 'customFields': [], 'diskCount': 3, 'disks': [{'id': '0:0', 'partitionPaths': [], 'sizeGB': 1}, {'id': '0:1', 'partitionPaths': [], 'sizeGB': 2}, {'id': '0:2', 'partitionPaths': [], 'sizeGB': 14}], 'hostName': '', 'inMaintenanceMode': False, 'ipAddresses': [{'internal': '10.1.1.1'}], 'memoryGB': 1, 'memoryMB': 1024, 'partitions': [], 'powerState': 'started', 'snapshots': [], 'storageGB': 17}, 'groupId': '086ac1dfe0b6411989e8d1b77c4065f0', 'id': 'test-server', 'ipaddress': '10.120.45.23', 'isTemplate': False, 'links': [{'href': '/v2/servers/wfad/test-server', 'id': 'test-server', 'rel': 'self', 'verbs': ['GET', 'PATCH', 'DELETE']}, {'href': '/v2/groups/wfad/086ac1dfe0b6411989e8d1b77c4065f0', 'id': '086ac1dfe0b6411989e8d1b77c4065f0', 'rel': 'group'}, {'href': '/v2/accounts/wfad', 'id': 'wfad', 'rel': 'account'}, {'href': '/v2/billing/wfad/serverPricing/test-server', 'rel': 'billing'}, {'href': '/v2/servers/wfad/test-server/publicIPAddresses', 'rel': 'publicIPAddresses', 'verbs': ['POST']}, {'href': '/v2/servers/wfad/test-server/credentials', 'rel': 'credentials'}, {'href': '/v2/servers/wfad/test-server/statistics', 'rel': 'statistics'}, {'href': '/v2/servers/wfad/510ec21ae82d4dc89d28479753bf736a/upcomingScheduledActivities', 'rel': 'upcomingScheduledActivities'}, {'href': '/v2/servers/wfad/510ec21ae82d4dc89d28479753bf736a/scheduledActivities', 'rel': 'scheduledActivities', 'verbs': ['GET', 'POST']}, {'href': '/v2/servers/wfad/test-server/capabilities', 'rel': 'capabilities'}, {'href': '/v2/servers/wfad/test-server/alertPolicies', 'rel': 'alertPolicyMappings', 'verbs': ['POST']}, {'href': '/v2/servers/wfad/test-server/antiAffinityPolicy', 'rel': 'antiAffinityPolicyMapping', 'verbs': ['PUT', 'DELETE']}, {'href': '/v2/servers/wfad/test-server/cpuAutoscalePolicy', 'rel': 'cpuAutoscalePolicyMapping', 'verbs': ['PUT', 'DELETE']}], 'locationId': 'UC1', 'name': 'test-server', 'os': 'ubuntu14\_64Bit', 'osType': 'Ubuntu 14 64-bit', 'status': 'active', 'storageType': 'standard', 'type': 'standard'}] | ### Authors * CLC Runner (@clc-runner) ansible community.general.django_manage – Manages a Django application. community.general.django\_manage – Manages a Django application. ================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.django_manage`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manages a Django application using the `manage.py` application frontend to `django-admin`. With the `virtualenv` parameter, all management commands will be executed by the given `virtualenv` installation. Requirements ------------ The below requirements are needed on the host that executes this module. * virtualenv * django Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **apps** string | | A list of space-delimited apps to target. Used by the `test` command. | | **cache\_table** string | | The name of the table used for database-backed caching. Used by the `createcachetable` command. | | **clear** boolean | **Choices:*** **no** ← * yes | Clear the existing files before trying to copy or link the original file. Used only with the `collectstatic` command. The `--noinput` argument will be added automatically. | | **command** string / required | | The name of the Django management command to run. Built in commands are `cleanup`, `collectstatic`, `flush`, `loaddata`, `migrate`, `syncdb`, `test`, and `validate`. Other commands can be entered, but will fail if they're unknown to Django. Other commands that may prompt for user input should be run with the `--noinput` flag. The module will perform some basic parameter validation (when applicable) to the commands `cleanup`, `collectstatic`, `createcachetable`, `flush`, `loaddata`, `migrate`, `syncdb`, `test`, and `validate`. | | **database** string | | The database to target. Used by the `createcachetable`, `flush`, `loaddata`, `syncdb`, and `migrate` commands. | | **failfast** boolean | **Choices:*** **no** ← * yes | Fail the command immediately if a test fails. Used by the `test` command. aliases: fail\_fast | | **fixtures** string | | A space-delimited list of fixture file names to load in the database. **Required** by the `loaddata` command. | | **link** boolean | **Choices:*** no * yes | Will create links to the files instead of copying them, you can only use this parameter with `collectstatic` command. | | **merge** boolean | **Choices:*** no * yes | Will run out-of-order or missing migrations as they are not rollback migrations, you can only use this parameter with `migrate` command. | | **project\_path** path / required | | The path to the root of the Django application where **manage.py** lives. aliases: app\_path, chdir | | **pythonpath** path | | A directory to add to the Python path. Typically used to include the settings module if it is located external to the application directory. aliases: python\_path | | **settings** path | | The Python path to the application's settings module, such as `myapp.settings`. | | **skip** boolean | **Choices:*** no * yes | Will skip over out-of-order missing migrations, you can only use this parameter with `migrate` command. | | **testrunner** string | | From the Django docs: Controls the test runner class that is used to execute tests. This parameter is passed as-is to `manage.py`. aliases: test\_runner | | **virtualenv** path | | An optional path to a *virtualenv* installation to use while running the manage application. aliases: virtual\_env | Notes ----- Note * `virtualenv` (<http://www.virtualenv.org>) must be installed on the remote host if the *virtualenv* parameter is specified. * This module will create a virtualenv if the *virtualenv* parameter is specified and a virtual environment does not already exist at the given location. * This module assumes English error messages for the `createcachetable` command to detect table existence, unfortunately. * To be able to use the `migrate` command with django versions < 1.7, you must have `south` installed and added as an app in your settings. * To be able to use the `collectstatic` command, you must have enabled staticfiles in your settings. * Your `manage.py` application must be executable (rwxr-xr-x), and must have a valid shebang, i.e. `#!/usr/bin/env python`, for invoking the appropriate Python interpreter. Examples -------- ``` - name: Run cleanup on the application installed in django_dir community.general.django_manage: command: cleanup project_path: "{{ django_dir }}" - name: Load the initial_data fixture into the application community.general.django_manage: command: loaddata project_path: "{{ django_dir }}" fixtures: "{{ initial_data }}" - name: Run syncdb on the application community.general.django_manage: command: syncdb project_path: "{{ django_dir }}" settings: "{{ settings_app_name }}" pythonpath: "{{ settings_dir }}" virtualenv: "{{ virtualenv_dir }}" - name: Run the SmokeTest test case from the main app. Useful for testing deploys community.general.django_manage: command: test project_path: "{{ django_dir }}" apps: main.SmokeTest - name: Create an initial superuser community.general.django_manage: command: "createsuperuser --noinput --username=admin [email protected]" project_path: "{{ django_dir }}" ``` ### Authors * Scott Anderson (@tastychutney)
programming_docs
ansible community.general.ejabberd_user – Manages users for ejabberd servers community.general.ejabberd\_user – Manages users for ejabberd servers ===================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ejabberd_user`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module provides user management for ejabberd servers Requirements ------------ The below requirements are needed on the host that executes this module. * ejabberd with mod\_admin\_extra Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **host** string / required | | the ejabberd host associated with this username | | **logging** boolean | **Choices:*** **no** ← * yes | enables or disables the local syslog facility for this module | | **password** string | | the password to assign to the username | | **state** string | **Choices:*** **present** ← * absent | describe the desired state of the user to be managed | | **username** string / required | | the name of the user to manage | Notes ----- Note * Password parameter is required for state == present only * Passwords must be stored in clear text for this release * The ejabberd configuration file must include mod\_admin\_extra as a module. Examples -------- ``` # Example playbook entries using the ejabberd_user module to manage users state. - name: Create a user if it does not exist community.general.ejabberd_user: username: test host: server password: password - name: Delete a user if it exists community.general.ejabberd_user: username: test host: server state: absent ``` ### Authors * Peter Sprygada (@privateip) ansible community.general.oci_vcn – Manage Virtual Cloud Networks(VCN) in OCI community.general.oci\_vcn – Manage Virtual Cloud Networks(VCN) in OCI ====================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oci_vcn`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module allows the user to create, delete and update virtual cloud networks(VCNs) in OCI. The complete Oracle Cloud Infrastructure Ansible Modules can be downloaded from <https://github.com/oracle/oci-ansible-modules/releases>. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * Python SDK for Oracle Cloud Infrastructure <https://oracle-cloud-infrastructure-python-sdk.readthedocs.io> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_user** string | | The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the value of the OCI\_USER\_OCID environment variable, if any, is used. This option is required if the user is not specified through a configuration file (See `config_file_location`). To get the user's OCID, please refer <https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm>. | | **api\_user\_fingerprint** string | | Fingerprint for the key pair being used. If not set, then the value of the OCI\_USER\_FINGERPRINT environment variable, if any, is used. This option is required if the key fingerprint is not specified through a configuration file (See `config_file_location`). To get the key pair's fingerprint value please refer <https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm>. | | **api\_user\_key\_file** path | | Full path and filename of the private key (in PEM format). If not set, then the value of the OCI\_USER\_KEY\_FILE variable, if any, is used. This option is required if the private key is not specified through a configuration file (See `config_file_location`). If the key is encrypted with a pass-phrase, the `api_user_key_pass_phrase` option must also be provided. | | **api\_user\_key\_pass\_phrase** string | | Passphrase used by the key referenced in `api_user_key_file`, if it is encrypted. If not set, then the value of the OCI\_USER\_KEY\_PASS\_PHRASE variable, if any, is used. This option is required if the key passphrase is not specified through a configuration file (See `config_file_location`). | | **auth\_type** string | **Choices:*** **api\_key** ← * instance\_principal | The type of authentication to use for making API requests. By default `auth_type="api_key"` based authentication is performed and the API key (see *api\_user\_key\_file*) in your config file will be used. If this 'auth\_type' module option is not specified, the value of the OCI\_ANSIBLE\_AUTH\_TYPE, if any, is used. Use `auth_type="instance_principal"` to use instance principal based authentication when running ansible playbooks within an OCI compute instance. | | **cidr\_block** string | | The CIDR IP address block of the VCN. Required when creating a VCN with *state=present*. | | **compartment\_id** string | | The OCID of the compartment to contain the VCN. Required when creating a VCN with *state=present*. This option is mutually exclusive with *vcn\_id*. | | **config\_file\_location** string | | Path to configuration file. If not set then the value of the OCI\_CONFIG\_FILE environment variable, if any, is used. Otherwise, defaults to ~/.oci/config. | | **config\_profile\_name** string | **Default:**"DEFAULT" | The profile to load from the config file referenced by `config_file_location`. If not set, then the value of the OCI\_CONFIG\_PROFILE environment variable, if any, is used. Otherwise, defaults to the "DEFAULT" profile in `config_file_location`. | | **defined\_tags** dictionary | | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see <https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm>. | | **display\_name** string | | A user-friendly name. Does not have to be unique, and it's changeable. aliases: name | | **dns\_label** string | | A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, bminstance-1.subnet123.vcn1.oraclevcn.com). Not required to be unique, but it's a best practice to set unique DNS labels for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. The value cannot be changed. | | **force\_create** boolean | **Choices:*** **no** ← * yes | Whether to attempt non-idempotent creation of a resource. By default, create resource is an idempotent operation, and doesn't create the resource if it already exists. Setting this option to true, forcefully creates a copy of the resource, even if it already exists.This option is mutually exclusive with *key\_by*. | | **freeform\_tags** dictionary | | Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see <https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm>. | | **key\_by** list / elements=string | | The list of comma-separated attributes of this resource which should be used to uniquely identify an instance of the resource. By default, all the attributes of a resource except *freeform\_tags* are used to uniquely identify a resource. | | **region** string | | The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the value of the OCI\_REGION variable, if any, is used. This option is required if the region is not specified through a configuration file (See `config_file_location`). Please refer to <https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm> for more information on OCI regions. | | **state** string | **Choices:*** **present** ← * absent | Create or update a VCN with *state=present*. Use *state=absent* to delete a VCN. | | **tenancy** string | | OCID of your tenancy. If not set, then the value of the OCI\_TENANCY variable, if any, is used. This option is required if the tenancy OCID is not specified through a configuration file (See `config_file_location`). To get the tenancy OCID, please refer <https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm> | | **vcn\_id** string | | The OCID of the VCN. Required when deleting a VCN with *state=absent* or updating a VCN with *state=present*. This option is mutually exclusive with *compartment\_id*. aliases: id | | **wait** boolean | **Choices:*** no * **yes** ← | Whether to wait for create or delete operation to complete. | | **wait\_timeout** integer | **Default:**1200 | Time, in seconds, to wait when *wait=yes*. | | **wait\_until** string | | The lifecycle state to wait for the resource to transition into when *wait=yes*. By default, when *wait=yes*, we wait for the resource to get into ACTIVE/ATTACHED/AVAILABLE/PROVISIONED/ RUNNING applicable lifecycle state during create operation & to get into DELETED/DETACHED/ TERMINATED lifecycle state during delete operation. | Notes ----- Note * For OCI python sdk configuration, please refer to <https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/configuration.html> Examples -------- ``` - name: Create a VCN community.general.oci_vcn: cidr_block: '10.0.0.0/16' compartment_id: 'ocid1.compartment.oc1..xxxxxEXAMPLExxxxx' display_name: my_vcn dns_label: ansiblevcn - name: Updates the specified VCN's display name community.general.oci_vcn: vcn_id: ocid1.vcn.oc1.phx.xxxxxEXAMPLExxxxx display_name: ansible_vcn - name: Delete the specified VCN community.general.oci_vcn: vcn_id: ocid1.vcn.oc1.phx.xxxxxEXAMPLExxxxx state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **vcn** dictionary | On successful create and update operation | Information about the VCN **Sample:** {'cidr\_block': '10.0.0.0/16', 'compartment\_id"': 'ocid1.compartment.oc1..xxxxxEXAMPLExxxxx', 'default\_dhcp\_options\_id': 'ocid1.dhcpoptions.oc1.phx.xxxxxEXAMPLExxxxx', 'default\_route\_table\_id': 'ocid1.routetable.oc1.phx.xxxxxEXAMPLExxxxx', 'default\_security\_list\_id': 'ocid1.securitylist.oc1.phx.xxxxxEXAMPLExxxxx', 'display\_name': 'ansible\_vcn', 'dns\_label': 'ansiblevcn', 'id': 'ocid1.vcn.oc1.phx.xxxxxEXAMPLExxxxx', 'lifecycle\_state': 'AVAILABLE', 'time\_created': '2017-11-13T20:22:40.626000+00:00', 'vcn\_domain\_name': 'ansiblevcn.oraclevcn.com'} | ### Authors * Rohit Chaware (@rohitChaware) ansible community.general.archive – Creates a compressed archive of one or more files or trees community.general.archive – Creates a compressed archive of one or more files or trees ====================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.archive`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Creates or extends an archive. * The source and archive are on the remote host, and the archive *is not* copied to the local host. * Source files can be deleted after archival by specifying *remove=True*. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **attributes** string added in 2.3 of ansible.builtin | | The attributes the resulting file or directory should have. To get supported flags look at the man page for *chattr* on the target system. This string should contain the attributes in the same order as the one displayed by *lsattr*. The `=` operator is assumed as default, otherwise `+` or `-` operators need to be included in the string. aliases: attr | | **dest** path | | The file name of the destination archive. The parent directory must exists on the remote host. This is required when `path` refers to multiple files by either specifying a glob, a directory or multiple paths in a list. If the destination archive already exists, it will be truncated and overwritten. | | **exclude\_path** list / elements=path | **Default:**[] | Remote absolute path, glob, or list of paths or globs for the file or files to exclude from *path* list and glob expansion. Use *exclusion\_patterns* to instead exclude files or subdirectories below any of the paths from the *path* list. | | **exclusion\_patterns** list / elements=path added in 3.2.0 of community.general | | Glob style patterns to exclude files or directories from the resulting archive. This differs from *exclude\_path* which applies only to the source paths from *path*. | | **force\_archive** boolean | **Choices:*** **no** ← * yes | Allows you to force the module to treat this as an archive even if only a single file is specified. By default when a single file is specified it is compressed only (not archived). Enable this if you want to use [ansible.builtin.unarchive](../../ansible/builtin/unarchive_module) on an archive of a single file created with this module. | | **format** string | **Choices:*** bz2 * **gz** ← * tar * xz * zip | The type of compression to use. Support for xz was added in Ansible 2.5. | | **group** string | | Name of the group that should own the file/directory, as would be fed to *chown*. | | **mode** raw | | The permissions the resulting file or directory should have. For those used to */usr/bin/chmod* remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like `0644` or `01777`) or quote it (like `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination file **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created file. If `mode` is not specified and the destination file **does** exist, the mode of the existing file will be used. Specifying `mode` is the best way to ensure files are created with the correct permissions. See CVE-2020-1736 for further details. | | **owner** string | | Name of the user that should own the file/directory, as would be fed to *chown*. | | **path** list / elements=path / required | | Remote absolute path, glob, or list of paths or globs for the file or files to compress or archive. | | **remove** boolean | **Choices:*** **no** ← * yes | Remove any added source files and trees after adding to archive. | | **selevel** string | | The level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the `range`. When set to `_default`, it will use the `level` portion of the policy if available. | | **serole** string | | The role part of the SELinux file context. When set to `_default`, it will use the `role` portion of the policy if available. | | **setype** string | | The type part of the SELinux file context. When set to `_default`, it will use the `type` portion of the policy if available. | | **seuser** string | | The user part of the SELinux file context. By default it uses the `system` policy, where applicable. When set to `_default`, it will use the `user` portion of the policy if available. | | **unsafe\_writes** boolean added in 2.2 of ansible.builtin | **Choices:*** **no** ← * yes | Influence when to use atomic operation to prevent data corruption or inconsistent reads from the target file. By default this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, which cannot be updated atomically from inside the container and can only be written in an unsafe manner. This option allows Ansible to fall back to unsafe methods of updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes). IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption. | Notes ----- Note * Requires tarfile, zipfile, gzip and bzip2 packages on target host. * Requires lzma or backports.lzma if using xz format. * Can produce *gzip*, *bzip2*, *lzma* and *zip* compressed files or archives. See Also -------- See also [ansible.builtin.unarchive](../../ansible/builtin/unarchive_module#ansible-collections-ansible-builtin-unarchive-module) The official documentation on the **ansible.builtin.unarchive** module. Examples -------- ``` - name: Compress directory /path/to/foo/ into /path/to/foo.tgz community.general.archive: path: /path/to/foo dest: /path/to/foo.tgz - name: Compress regular file /path/to/foo into /path/to/foo.gz and remove it community.general.archive: path: /path/to/foo remove: yes - name: Create a zip archive of /path/to/foo community.general.archive: path: /path/to/foo format: zip - name: Create a bz2 archive of multiple files, rooted at /path community.general.archive: path: - /path/to/foo - /path/wong/foo dest: /path/file.tar.bz2 format: bz2 - name: Create a bz2 archive of a globbed path, while excluding specific dirnames community.general.archive: path: - /path/to/foo/* dest: /path/file.tar.bz2 exclude_path: - /path/to/foo/bar - /path/to/foo/baz format: bz2 - name: Create a bz2 archive of a globbed path, while excluding a glob of dirnames community.general.archive: path: - /path/to/foo/* dest: /path/file.tar.bz2 exclude_path: - /path/to/foo/ba* format: bz2 - name: Use gzip to compress a single archive (i.e don't archive it first with tar) community.general.archive: path: /path/to/foo/single.file dest: /path/file.gz format: gz - name: Create a tar.gz archive of a single file. community.general.archive: path: /path/to/foo/single.file dest: /path/file.tar.gz format: gz force_archive: true ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **archived** list / elements=string | success | Any files that were compressed or added to the archive. | | **arcroot** string | always | The archive root. | | **dest\_state** string added in 3.4.0 of community.general | success | The state of the *dest* file. `absent` when the file does not exist. `archive` when the file is an archive. `compress` when the file is compressed, but not an archive. `incomplete` when the file is an archive, but some files under *path* were not found. | | **expanded\_exclude\_paths** list / elements=string | always | The list of matching exclude paths from the exclude\_path argument. | | **expanded\_paths** list / elements=string | always | The list of matching paths from paths argument. | | **missing** list / elements=string | success | Any files that were missing from the source. | | **state** string | always | The state of the input `path`. | ### Authors * Ben Doherty (@bendoh)
programming_docs
ansible community.general.cloud_init_data_facts – Retrieve facts of cloud-init. community.general.cloud\_init\_data\_facts – Retrieve facts of cloud-init. ========================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.cloud_init_data_facts`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Gathers facts by reading the status.json and result.json of cloud-init. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **filter** string | **Choices:*** status * result | Filter facts | Notes ----- Note * See <http://cloudinit.readthedocs.io/> for more information about cloud-init. Examples -------- ``` - name: Gather all facts of cloud init community.general.cloud_init_data_facts: register: result - ansible.builtin.debug: var: result - name: Wait for cloud init to finish community.general.cloud_init_data_facts: filter: status register: res until: "res.cloud_init_data_facts.status.v1.stage is defined and not res.cloud_init_data_facts.status.v1.stage" retries: 50 delay: 5 ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **cloud\_init\_data\_facts** dictionary | success | Facts of result and status. **Sample:** { "status": { "v1": { "datasource": "DataSourceCloudStack", "errors": [] }, "result": { "v1": { "datasource": "DataSourceCloudStack", "init": { "errors": [], "finished": 1522066377.0185432, "start": 1522066375.2648022 }, "init-local": { "errors": [], "finished": 1522066373.70919, "start": 1522066373.4726632 }, "modules-config": { "errors": [], "finished": 1522066380.9097016, "start": 1522066379.0011985 }, "modules-final": { "errors": [], "finished": 1522066383.56594, "start": 1522066382.3449218 }, "stage": null } } | ### Authors * René Moser (@resmo) ansible community.general.interfaces_file – Tweak settings in /etc/network/interfaces files community.general.interfaces\_file – Tweak settings in /etc/network/interfaces files ==================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.interfaces_file`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage (add, remove, change) individual interface options in an interfaces-style file without having to manage the file as a whole with, say, [ansible.builtin.template](../../ansible/builtin/template_module#ansible-collections-ansible-builtin-template-module) or [ansible.builtin.assemble](../../ansible/builtin/assemble_module#ansible-collections-ansible-builtin-assemble-module). Interface has to be presented in a file. * Read information about interfaces from interfaces-styled files Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **address\_family** string | | Address family of the interface, useful if same interface name is used for both inet and inet6 | | **attributes** string added in 2.3 of ansible.builtin | | The attributes the resulting file or directory should have. To get supported flags look at the man page for *chattr* on the target system. This string should contain the attributes in the same order as the one displayed by *lsattr*. The `=` operator is assumed as default, otherwise `+` or `-` operators need to be included in the string. aliases: attr | | **backup** boolean | **Choices:*** **no** ← * yes | Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. | | **dest** path | **Default:**"/etc/network/interfaces" | Path to the interfaces file | | **group** string | | Name of the group that should own the file/directory, as would be fed to *chown*. | | **iface** string | | Name of the interface, required for value changes or option remove | | **mode** raw | | The permissions the resulting file or directory should have. For those used to */usr/bin/chmod* remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like `0644` or `01777`) or quote it (like `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination file **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created file. If `mode` is not specified and the destination file **does** exist, the mode of the existing file will be used. Specifying `mode` is the best way to ensure files are created with the correct permissions. See CVE-2020-1736 for further details. | | **option** string | | Name of the option, required for value changes or option remove | | **owner** string | | Name of the user that should own the file/directory, as would be fed to *chown*. | | **selevel** string | | The level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the `range`. When set to `_default`, it will use the `level` portion of the policy if available. | | **serole** string | | The role part of the SELinux file context. When set to `_default`, it will use the `role` portion of the policy if available. | | **setype** string | | The type part of the SELinux file context. When set to `_default`, it will use the `type` portion of the policy if available. | | **seuser** string | | The user part of the SELinux file context. By default it uses the `system` policy, where applicable. When set to `_default`, it will use the `user` portion of the policy if available. | | **state** string | **Choices:*** **present** ← * absent | If set to `absent` the option or section will be removed if present instead of created. | | **unsafe\_writes** boolean added in 2.2 of ansible.builtin | **Choices:*** **no** ← * yes | Influence when to use atomic operation to prevent data corruption or inconsistent reads from the target file. By default this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, which cannot be updated atomically from inside the container and can only be written in an unsafe manner. This option allows Ansible to fall back to unsafe methods of updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes). IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption. | | **value** string | | If *option* is not presented for the *interface* and *state* is `present` option will be added. If *option* already exists and is not `pre-up`, `up`, `post-up` or `down`, it's value will be updated. `pre-up`, `up`, `post-up` and `down` options can't be updated, only adding new options, removing existing ones or cleaning the whole option set are supported | Notes ----- Note * If option is defined multiple times last one will be updated but all will be deleted in case of an absent state Examples -------- ``` - name: Set eth1 mtu configuration value to 8000 community.general.interfaces_file: dest: /etc/network/interfaces.d/eth1.cfg iface: eth1 option: mtu value: 8000 backup: yes state: present register: eth1_cfg ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **dest** string | success | destination file/path **Sample:** /etc/network/interfaces | | **ifaces** complex | success | interfaces dictionary | | | **ifaces** dictionary | success | interface dictionary | | | | **eth0** dictionary | success | Name of the interface | | | | | **address\_family** string | success | interface address family **Sample:** inet | | | | | **down** list / elements=string | success | list of `down` scripts **Sample:** ['route del -net 10.10.10.0/24 gw 10.10.10.1 dev eth1', 'route del -net 10.10.11.0/24 gw 10.10.11.1 dev eth2'] | | | | | **method** string | success | interface method **Sample:** manual | | | | | **mtu** string | success | other options, all values returned as strings **Sample:** 1500 | | | | | **post-up** list / elements=string | success | list of `post-up` scripts **Sample:** ['route add -net 10.10.10.0/24 gw 10.10.10.1 dev eth1', 'route add -net 10.10.11.0/24 gw 10.10.11.1 dev eth2'] | | | | | **pre-up** list / elements=string | success | list of `pre-up` scripts **Sample:** ['route add -net 10.10.10.0/24 gw 10.10.10.1 dev eth1', 'route add -net 10.10.11.0/24 gw 10.10.11.1 dev eth2'] | | | | | **up** list / elements=string | success | list of `up` scripts **Sample:** ['route add -net 10.10.10.0/24 gw 10.10.10.1 dev eth1', 'route add -net 10.10.11.0/24 gw 10.10.11.1 dev eth2'] | ### Authors * Roman Belyakovsky (@hryamzik) ansible community.general.oneandone_monitoring_policy – Configure 1&1 monitoring policy. community.general.oneandone\_monitoring\_policy – Configure 1&1 monitoring policy. ================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneandone_monitoring_policy`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Create, remove, update monitoring policies (and add/remove ports, processes, and servers). This module has a dependency on 1and1 >= 1.0 Requirements ------------ The below requirements are needed on the host that executes this module. * 1and1 * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **add\_ports** list / elements=dictionary | | Ports to add to the monitoring policy. | | **add\_processes** list / elements=dictionary | | Processes to add to the monitoring policy. | | **add\_servers** list / elements=string | | Servers to add to the monitoring policy. | | **agent** string | | Set true for using agent. | | **api\_url** string | | Custom API URL. Overrides the ONEANDONE\_API\_URL environment variable. | | **auth\_token** string | | Authenticating API token provided by 1&1. | | **description** string | | Monitoring policy description. maxLength=256 | | **email** string | | User's email. maxLength=128 | | **monitoring\_policy** string | | The identifier (id or name) of the monitoring policy used with update state. | | **name** string | | Monitoring policy name used with present state. Used as identifier (id or name) when used with absent state. maxLength=128 | | **ports** list / elements=dictionary | | Array of ports that will be monitoring. | | | **alert\_if** string / required | **Choices:*** RESPONDING * NOT\_RESPONDING | Case of alert. | | | **email\_notification** string / required | | Set true for sending e-mail notifications. | | | **port** string / required | | Port number. minimum=1, maximum=65535 | | | **protocol** string / required | **Choices:*** TCP * UDP | Internet protocol. | | **processes** list / elements=dictionary | | Array of processes that will be monitoring. | | | **alert\_if** string / required | **Choices:*** RUNNING * NOT\_RUNNING | Case of alert. | | | **process** string / required | | Name of the process. maxLength=50 | | **remove\_ports** list / elements=string | | Ports to remove from the monitoring policy. | | **remove\_processes** list / elements=string | | Processes to remove from the monitoring policy. | | **remove\_servers** list / elements=string | | Servers to remove from the monitoring policy. | | **state** string | **Choices:*** **present** ← * absent * update | Define a monitoring policy's state to create, remove, update. | | **thresholds** list / elements=dictionary | | Monitoring policy thresholds. Each of the suboptions have warning and critical, which both have alert and value suboptions. Warning is used to set limits for warning alerts, critical is used to set critical alerts. alert enables alert, and value is used to advise when the value is exceeded. | | | **cpu** string / required | | Consumption limits of CPU. | | | **disk** string / required | | Consumption limits of hard disk. | | | **internal\_ping** string / required | | Response limits of internal ping. | | | **ram** string / required | | Consumption limits of RAM. | | | **transfer** string / required | | Consumption limits for transfer. | | **update\_ports** list / elements=dictionary | | Ports to be updated on the monitoring policy. | | **update\_processes** list / elements=dictionary | | Processes to be updated on the monitoring policy. | | **wait** boolean | **Choices:*** no * **yes** ← | wait for the instance to be in state 'running' before returning | | **wait\_interval** integer | **Default:**5 | Defines the number of seconds to wait when using the \_wait\_for methods | | **wait\_timeout** integer | **Default:**600 | how long before wait gives up, in seconds | Examples -------- ``` - name: Create a monitoring policy community.general.oneandone_monitoring_policy: auth_token: oneandone_private_api_key name: ansible monitoring policy description: Testing creation of a monitoring policy with ansible email: [email protected] agent: true thresholds: - cpu: warning: value: 80 alert: false critical: value: 92 alert: false - ram: warning: value: 80 alert: false critical: value: 90 alert: false - disk: warning: value: 80 alert: false critical: value: 90 alert: false - internal_ping: warning: value: 50 alert: false critical: value: 100 alert: false - transfer: warning: value: 1000 alert: false critical: value: 2000 alert: false ports: - protocol: TCP port: 22 alert_if: RESPONDING email_notification: false processes: - process: test alert_if: NOT_RUNNING email_notification: false wait: true - name: Destroy a monitoring policy community.general.oneandone_monitoring_policy: auth_token: oneandone_private_api_key state: absent name: ansible monitoring policy - name: Update a monitoring policy community.general.oneandone_monitoring_policy: auth_token: oneandone_private_api_key monitoring_policy: ansible monitoring policy name: ansible monitoring policy updated description: Testing creation of a monitoring policy with ansible updated email: [email protected] thresholds: - cpu: warning: value: 70 alert: false critical: value: 90 alert: false - ram: warning: value: 70 alert: false critical: value: 80 alert: false - disk: warning: value: 70 alert: false critical: value: 80 alert: false - internal_ping: warning: value: 60 alert: false critical: value: 90 alert: false - transfer: warning: value: 900 alert: false critical: value: 1900 alert: false wait: true state: update - name: Add a port to a monitoring policy community.general.oneandone_monitoring_policy: auth_token: oneandone_private_api_key monitoring_policy: ansible monitoring policy updated add_ports: - protocol: TCP port: 33 alert_if: RESPONDING email_notification: false wait: true state: update - name: Update existing ports of a monitoring policy community.general.oneandone_monitoring_policy: auth_token: oneandone_private_api_key monitoring_policy: ansible monitoring policy updated update_ports: - id: existing_port_id protocol: TCP port: 34 alert_if: RESPONDING email_notification: false - id: existing_port_id protocol: TCP port: 23 alert_if: RESPONDING email_notification: false wait: true state: update - name: Remove a port from a monitoring policy community.general.oneandone_monitoring_policy: auth_token: oneandone_private_api_key monitoring_policy: ansible monitoring policy updated remove_ports: - port_id state: update - name: Add a process to a monitoring policy community.general.oneandone_monitoring_policy: auth_token: oneandone_private_api_key monitoring_policy: ansible monitoring policy updated add_processes: - process: test_2 alert_if: NOT_RUNNING email_notification: false wait: true state: update - name: Update existing processes of a monitoring policy community.general.oneandone_monitoring_policy: auth_token: oneandone_private_api_key monitoring_policy: ansible monitoring policy updated update_processes: - id: process_id process: test_1 alert_if: NOT_RUNNING email_notification: false - id: process_id process: test_3 alert_if: NOT_RUNNING email_notification: false wait: true state: update - name: Remove a process from a monitoring policy community.general.oneandone_monitoring_policy: auth_token: oneandone_private_api_key monitoring_policy: ansible monitoring policy updated remove_processes: - process_id wait: true state: update - name: Add server to a monitoring policy community.general.oneandone_monitoring_policy: auth_token: oneandone_private_api_key monitoring_policy: ansible monitoring policy updated add_servers: - server id or name wait: true state: update - name: Remove server from a monitoring policy community.general.oneandone_monitoring_policy: auth_token: oneandone_private_api_key monitoring_policy: ansible monitoring policy updated remove_servers: - server01 wait: true state: update ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **monitoring\_policy** dictionary | always | Information about the monitoring policy that was processed **Sample:** {"id": "92B74394A397ECC3359825C1656D67A6", "name": "Default Policy"} | ### Authors * Amel Ajdinovic (@aajdinov) * Ethan Devenport (@edevenport)
programming_docs
ansible community.general.utm_proxy_exception – Create, update or destroy reverse_proxy exception entry in Sophos UTM community.general.utm\_proxy\_exception – Create, update or destroy reverse\_proxy exception entry in Sophos UTM ================================================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.utm_proxy_exception`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Create, update or destroy a reverse\_proxy exception entry in SOPHOS UTM. * This module needs to have the REST Ability of the UTM to be activated. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **headers** dictionary | | A dictionary of additional headers to be sent to POST and PUT requests. Is needed for some modules | | **name** string / required | | The name of the object. Will be used to identify the entry | | **op** string | **Choices:*** **AND** ← * OR | The operand to be used with the entries of the path parameter | | **path** list / elements=string | **Default:**[] | The paths the exception in the reverse proxy is defined for | | **skip\_custom\_threats\_filters** list / elements=string | **Default:**[] | A list of threats to be skipped | | **skip\_threats\_filter\_categories** list / elements=string | **Default:**[] | Define which categories of threats are skipped | | **skipav** boolean | **Choices:*** **no** ← * yes | Skip the Antivirus Scanning | | **skipbadclients** boolean | **Choices:*** **no** ← * yes | Block clients with bad reputation | | **skipcookie** boolean | **Choices:*** **no** ← * yes | Skip the Cookie Signing check | | **skipform** boolean | **Choices:*** **no** ← * yes | Enable form hardening | | **skipform\_missingtoken** boolean | **Choices:*** **no** ← * yes | Enable form hardening with missing tokens | | **skiphtmlrewrite** boolean | **Choices:*** **no** ← * yes | Protection against SQL | | **skiptft** boolean | **Choices:*** **no** ← * yes | Enable true file type control | | **skipurl** boolean | **Choices:*** **no** ← * yes | Enable static URL hardening | | **source** list / elements=string | **Default:**[] | Define which categories of threats are skipped | | **state** string | **Choices:*** absent * **present** ← | The desired state of the object. `present` will create or update an object `absent` will delete an object if it was present | | **status** boolean | **Choices:*** no * **yes** ← | Status of the exception rule set | | **utm\_host** string / required | | The REST Endpoint of the Sophos UTM. | | **utm\_port** integer | **Default:**4444 | The port of the REST interface. | | **utm\_protocol** string | **Choices:*** http * **https** ← | The protocol of the REST Endpoint. | | **utm\_token** string / required | | The token used to identify at the REST-API. See <https://www.sophos.com/en-us/medialibrary/PDFs/documentation/UTMonAWS/Sophos-UTM-RESTful-API.pdf?la=en>, Chapter 2.4.2. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether the REST interface's ssl certificate should be verified or not. | Examples -------- ``` - name: Create UTM proxy_exception community.general.utm_proxy_exception: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestExceptionEntry backend: REF_OBJECT_STRING state: present - name: Remove UTM proxy_exception community.general.utm_proxy_exception: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestExceptionEntry state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **result** complex | success | The utm object that was created | | | **\_locked** boolean | success | Whether or not the object is currently locked | | | **\_ref** string | success | The reference name of the object | | | **\_type** string | success | The type of the object | | | **comment** string | success | The optional comment string | | | **name** string | success | The name of the object | | | **op** string | success | The operand to be used with the entries of the path parameter | | | **path** list / elements=string | success | The paths the exception in the reverse proxy is defined for | | | **skip\_custom\_threats\_filters** list / elements=string | success | A list of threats to be skipped | | | **skip\_threats\_filter\_categories** list / elements=string | success | Define which categories of threats are skipped | | | **skipav** boolean | success | Skip the Antivirus Scanning | | | **skipbadclients** boolean | success | Block clients with bad reputation | | | **skipcookie** boolean | success | Skip the Cookie Signing check | | | **skipform** boolean | success | Enable form hardening | | | **skipform\_missingtoken** boolean | success | Enable form hardening with missing tokens | | | **skiphtmlrewrite** boolean | success | Protection against SQL | | | **skiptft** boolean | success | Enable true file type control | | | **skipurl** boolean | success | Enable static URL hardening | | | **source** list / elements=string | success | Define which categories of threats are skipped | ### Authors * Sebastian Schenzel (@RickS-C137) ansible community.general.doas – Do As user community.general.doas – Do As user =================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.doas`. * [Synopsis](#synopsis) * [Parameters](#parameters) Synopsis -------- * This become plugins allows your remote/login user to execute commands as another user via the doas utility. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **become\_exe** string | **Default:**"doas" | ini entries: [privilege\_escalation]become\_exe = doas [doas\_become\_plugin]executable = doas env:ANSIBLE\_BECOME\_EXE env:ANSIBLE\_DOAS\_EXE var: ansible\_become\_exe var: ansible\_doas\_exe | Doas executable | | **become\_flags** string | **Default:**"" | ini entries: [privilege\_escalation]become\_flags = [doas\_become\_plugin]flags = env:ANSIBLE\_BECOME\_FLAGS env:ANSIBLE\_DOAS\_FLAGS var: ansible\_become\_flags var: ansible\_doas\_flags | Options to pass to doas | | **become\_pass** string | | ini entries: [doas\_become\_plugin]password = None env:ANSIBLE\_BECOME\_PASS env:ANSIBLE\_DOAS\_PASS var: ansible\_become\_password var: ansible\_become\_pass var: ansible\_doas\_pass | password for doas prompt | | **become\_user** string | | ini entries: [privilege\_escalation]become\_user = None [doas\_become\_plugin]user = None env:ANSIBLE\_BECOME\_USER env:ANSIBLE\_DOAS\_USER var: ansible\_become\_user var: ansible\_doas\_user | User you 'become' to execute the task | | **prompt\_l10n** string | **Default:**[] | ini entries: [doas\_become\_plugin]localized\_prompts = [] env:ANSIBLE\_DOAS\_PROMPT\_L10N var: ansible\_doas\_prompt\_l10n | List of localized strings to match for prompt detection If empty we'll use the built in one | ### Authors * Ansible Core Team ansible community.general.mssql_db – Add or remove MSSQL databases from a remote host. community.general.mssql\_db – Add or remove MSSQL databases from a remote host. =============================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.mssql_db`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Add or remove MSSQL databases from a remote host. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * pymssql Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **autocommit** boolean | **Choices:*** **no** ← * yes | Automatically commit the change only if the import succeed. Sometimes it is necessary to use autocommit=true, since some content can't be changed within a transaction. | | **login\_host** string / required | | Host running the database | | **login\_password** string | | The password used to authenticate with | | **login\_port** string | **Default:**"1433" | Port of the MSSQL server. Requires login\_host be defined as other than localhost if login\_port is used | | **login\_user** string | | The username used to authenticate with | | **name** string / required | | name of the database to add or remove aliases: db | | **state** string | **Choices:*** **present** ← * absent * import | The database state | | **target** string | | Location, on the remote host, of the dump file to read from or write to. Uncompressed SQL files (`.sql`) files are supported. | Notes ----- Note * Requires the pymssql Python package on the remote host. For Ubuntu, this is as easy as pip install pymssql (See [ansible.builtin.pip](../../ansible/builtin/pip_module#ansible-collections-ansible-builtin-pip-module).) Examples -------- ``` - name: Create a new database with name 'jackdata' community.general.mssql_db: name: jackdata state: present # Copy database dump file to remote host and restore it to database 'my_db' - name: Copy database dump file to remote host ansible.builtin.copy: src: dump.sql dest: /tmp - name: Restore the dump file to database 'my_db' community.general.mssql_db: name: my_db state: import target: /tmp/dump.sql ``` ### Authors * Vedit Firat Arig (@vedit) ansible community.general.proxmox_group_info – Retrieve information about one or more Proxmox VE groups community.general.proxmox\_group\_info – Retrieve information about one or more Proxmox VE groups ================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.proxmox_group_info`. New in version 1.3.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Retrieve information about one or more Proxmox VE groups Requirements ------------ The below requirements are needed on the host that executes this module. * proxmoxer * requests Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_host** string / required | | Specify the target host of the Proxmox VE cluster. | | **api\_password** string | | Specify the password to authenticate with. You can use `PROXMOX_PASSWORD` environment variable. | | **api\_token\_id** string added in 1.3.0 of community.general | | Specify the token ID. | | **api\_token\_secret** string added in 1.3.0 of community.general | | Specify the token secret. | | **api\_user** string / required | | Specify the user to authenticate with. | | **group** string | | Restrict results to a specific group. aliases: groupid, name | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: List existing groups community.general.proxmox_group_info: api_host: helldorado api_user: root@pam api_password: "{{ password | default(omit) }}" api_token_id: "{{ token_id | default(omit) }}" api_token_secret: "{{ token_secret | default(omit) }}" register: proxmox_groups - name: Retrieve information about the admin group community.general.proxmox_group_info: api_host: helldorado api_user: root@pam api_password: "{{ password | default(omit) }}" api_token_id: "{{ token_id | default(omit) }}" api_token_secret: "{{ token_secret | default(omit) }}" group: admin register: proxmox_group_admin ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **proxmox\_groups** list / elements=dictionary | always, but can be empty | List of groups. | | | **comment** string | on success, can be absent | Short description of the group. | | | **groupid** string | on success | Group name. | | | **users** list / elements=string | on success | List of users in the group. | ### Authors * Tristan Le Guern (@tleguern) ansible community.general.matrix – Send notifications to matrix community.general.matrix – Send notifications to matrix ======================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.matrix`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This module sends html formatted notifications to matrix rooms. Requirements ------------ The below requirements are needed on the host that executes this module. * matrix-client (Python library) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **hs\_url** string / required | | URL of the homeserver, where the CS-API is reachable | | **msg\_html** string / required | | HTML form of the message to send to matrix | | **msg\_plain** string / required | | Plain text form of the message to send to matrix, usually markdown | | **password** string | | The password to log in with | | **room\_id** string / required | | ID of the room to send the notification to | | **token** string | | Authentication token for the API call. If provided, user\_id and password are not required | | **user\_id** string | | The user id of the user | Examples -------- ``` - name: Send matrix notification with token community.general.matrix: msg_plain: "**hello world**" msg_html: "<b>hello world</b>" room_id: "!12345678:server.tld" hs_url: "https://matrix.org" token: "{{ matrix_auth_token }}" - name: Send matrix notification with user_id and password community.general.matrix: msg_plain: "**hello world**" msg_html: "<b>hello world</b>" room_id: "!12345678:server.tld" hs_url: "https://matrix.org" user_id: "ansible_notification_bot" password: "{{ matrix_auth_password }}" ``` ### Authors * Jan Christian Grünhage (@jcgruenhage) ansible community.general.sl_vm – create or cancel a virtual instance in SoftLayer community.general.sl\_vm – create or cancel a virtual instance in SoftLayer =========================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.sl_vm`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Creates or cancels SoftLayer instances. * When created, optionally waits for it to be ‘running’. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * softlayer >= 4.1.1 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **cpus** integer | **Choices:*** 1 * 2 * 4 * 8 * 16 * 32 * 56 | Count of cpus to be assigned to new virtual instance. | | **datacenter** string | **Choices:*** ams01 * ams03 * che01 * dal01 * dal05 * dal06 * dal09 * dal10 * dal12 * dal13 * fra02 * fra04 * fra05 * hkg02 * hou02 * lon02 * lon04 * lon06 * mel01 * mex01 * mil01 * mon01 * osl01 * par01 * sao01 * sea01 * seo01 * sjc01 * sjc03 * sjc04 * sng01 * syd01 * syd04 * tok02 * tor01 * wdc01 * wdc04 * wdc06 * wdc07 | Datacenter for the virtual instance to be deployed. | | **dedicated** boolean | **Choices:*** **no** ← * yes | Flag to determine if the instance should be deployed in dedicated space. | | **disks** list / elements=integer | **Default:**[25] | List of disk sizes to be assigned to new virtual instance. | | **domain** string | | Domain name to be provided to a virtual instance. | | **flavor** string added in 0.2.0 of community.general | | Specify which SoftLayer flavor template to use instead of cpus and memory. | | **hostname** string | | Hostname to be provided to a virtual instance. | | **hourly** boolean | **Choices:*** no * **yes** ← | Flag to determine if the instance should be hourly billed. | | **image\_id** string | | Image Template to be used for new virtual instance. | | **instance\_id** string | | Instance Id of the virtual instance to perform action option. | | **local\_disk** boolean | **Choices:*** no * **yes** ← | Flag to determine if local disk should be used for the new instance. | | **memory** integer | **Choices:*** 1024 * 2048 * 4096 * 6144 * 8192 * 12288 * 16384 * 32768 * 49152 * 65536 * 131072 * 247808 | Amount of memory to be assigned to new virtual instance. | | **nic\_speed** integer | **Choices:*** 10 * 100 * 1000 | NIC Speed to be assigned to new virtual instance. | | **os\_code** string | | OS Code to be used for new virtual instance. | | **post\_uri** string | | URL of a post provisioning script to be loaded and executed on virtual instance. | | **private** boolean | **Choices:*** **no** ← * yes | Flag to determine if the instance should be private only. | | **private\_vlan** string | | VLAN by its Id to be assigned to the private NIC. | | **public\_vlan** string | | VLAN by its Id to be assigned to the public NIC. | | **ssh\_keys** list / elements=string | | List of ssh keys by their Id to be assigned to a virtual instance. | | **state** string | **Choices:*** absent * **present** ← | Create, or cancel a virtual instance. Specify `present` for create, `absent` to cancel. | | **tags** string | | Tag or list of tags to be provided to a virtual instance. | | **wait** boolean | **Choices:*** no * **yes** ← | Flag used to wait for active status before returning. | | **wait\_time** integer | **Default:**600 | Time in seconds before wait returns. | Examples -------- ``` - name: Build instance hosts: localhost gather_facts: no tasks: - name: Build instance request community.general.sl_vm: hostname: instance-1 domain: anydomain.com datacenter: dal09 tags: ansible-module-test hourly: yes private: no dedicated: no local_disk: yes cpus: 1 memory: 1024 disks: [25] os_code: UBUNTU_LATEST wait: no - name: Build additional instances hosts: localhost gather_facts: no tasks: - name: Build instances request community.general.sl_vm: hostname: "{{ item.hostname }}" domain: "{{ item.domain }}" datacenter: "{{ item.datacenter }}" tags: "{{ item.tags }}" hourly: "{{ item.hourly }}" private: "{{ item.private }}" dedicated: "{{ item.dedicated }}" local_disk: "{{ item.local_disk }}" cpus: "{{ item.cpus }}" memory: "{{ item.memory }}" disks: "{{ item.disks }}" os_code: "{{ item.os_code }}" ssh_keys: "{{ item.ssh_keys }}" wait: "{{ item.wait }}" with_items: - hostname: instance-2 domain: anydomain.com datacenter: dal09 tags: - ansible-module-test - ansible-module-test-replicas hourly: yes private: no dedicated: no local_disk: yes cpus: 1 memory: 1024 disks: - 25 - 100 os_code: UBUNTU_LATEST ssh_keys: [] wait: True - hostname: instance-3 domain: anydomain.com datacenter: dal09 tags: - ansible-module-test - ansible-module-test-replicas hourly: yes private: no dedicated: no local_disk: yes cpus: 1 memory: 1024 disks: - 25 - 100 os_code: UBUNTU_LATEST ssh_keys: [] wait: yes - name: Cancel instances hosts: localhost gather_facts: no tasks: - name: Cancel by tag community.general.sl_vm: state: absent tags: ansible-module-test ``` ### Authors * Matt Colton (@mcltn)
programming_docs
ansible community.general.packet_project – Create/delete a project in Packet host. community.general.packet\_project – Create/delete a project in Packet host. =========================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.packet_project`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Create/delete a project in Packet host. * API is documented at <https://www.packet.com/developers/api/#projects>. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * packet-python >= 1.40 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auth\_token** string | | Packet api token. You can also supply it in env var `PACKET_API_TOKEN`. | | **custom\_data** string | | Custom data about the project to create. | | **id** string | | UUID of the project which you want to remove. | | **name** string | | Name for/of the project. | | **org\_id** string | | UUID of the organization to create a project for. When blank, the API assumes the default organization. | | **payment\_method** string | | Payment method is name of one of the payment methods available to your user. When blank, the API assumes the default payment method. | | **state** string | **Choices:*** **present** ← * absent | Indicate desired state of the target. | Examples -------- ``` # All the examples assume that you have your Packet API token in env var PACKET_API_TOKEN. # You can also pass the api token in module param auth_token. - name: Create new project hosts: localhost tasks: community.general.packet_project: name: "new project" - name: Create new project within non-default organization hosts: localhost tasks: community.general.packet_project: name: "my org project" org_id: a4cc87f9-e00f-48c2-9460-74aa60beb6b0 - name: Remove project by id hosts: localhost tasks: community.general.packet_project: state: absent id: eef49903-7a09-4ca1-af67-4087c29ab5b6 - name: Create new project with non-default billing method hosts: localhost tasks: community.general.packet_project: name: "newer project" payment_method: "the other visa" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **changed** boolean | success | True if a project was created or removed. **Sample:** True | | **id** string | success | UUID of addressed project. | | **name** string | success | Name of addressed project. | ### Authors * Tomas Karasek (@t0mk) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#7b0f14165d584f4d400f145d584f4d400f131e5d584f4d40105d58484c405d584e49405d584f43401c161a12175d584f4d40181416)> * Nurfet Becirevic (@nurfet-becirevic) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#513f2423373425777265676a333432382334273832777262666a777264636a777265696a363c30383d777265676a323e3c)> ansible community.general.read_csv – Read a CSV file community.general.read\_csv – Read a CSV file ============================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.read_csv`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Read a CSV file and return a list or a dictionary, containing one dictionary per row. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **delimiter** string | | A one-character string used to separate fields. When using this parameter, you change the default value used by `dialect`. The default value depends on the dialect used. | | **dialect** string | **Default:**"excel" | The CSV dialect to use when parsing the CSV file. Possible values include `excel`, `excel-tab` or `unix`. | | **fieldnames** list / elements=string | | A list of field names for every column. This is needed if the CSV does not have a header. | | **key** string | | The column name used as a key for the resulting dictionary. If `key` is unset, the module returns a list of dictionaries, where each dictionary is a row in the CSV file. | | **path** path / required | | The CSV filename to read data from. aliases: filename | | **skipinitialspace** boolean | **Choices:*** no * yes | Whether to ignore any whitespaces immediately following the delimiter. When using this parameter, you change the default value used by `dialect`. The default value depends on the dialect used. | | **strict** boolean | **Choices:*** no * yes | Whether to raise an exception on bad CSV input. When using this parameter, you change the default value used by `dialect`. The default value depends on the dialect used. | | **unique** boolean | **Choices:*** no * **yes** ← | Whether the `key` used is expected to be unique. | Notes ----- Note * Ansible also ships with the `csvfile` lookup plugin, which can be used to do selective lookups in CSV files from Jinja. Examples -------- ``` # Example CSV file with header # # name,uid,gid # dag,500,500 # jeroen,501,500 # Read a CSV file and access user 'dag' - name: Read users from CSV file and return a dictionary community.general.read_csv: path: users.csv key: name register: users delegate_to: localhost - ansible.builtin.debug: msg: 'User {{ users.dict.dag.name }} has UID {{ users.dict.dag.uid }} and GID {{ users.dict.dag.gid }}' # Read a CSV file and access the first item - name: Read users from CSV file and return a list community.general.read_csv: path: users.csv register: users delegate_to: localhost - ansible.builtin.debug: msg: 'User {{ users.list.1.name }} has UID {{ users.list.1.uid }} and GID {{ users.list.1.gid }}' # Example CSV file without header and semi-colon delimiter # # dag;500;500 # jeroen;501;500 # Read a CSV file without headers - name: Read users from CSV file and return a list community.general.read_csv: path: users.csv fieldnames: name,uid,gid delimiter: ';' register: users delegate_to: localhost ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **dict** dictionary | success | The CSV content as a dictionary. **Sample:** {'dag': {'gid': 500, 'name': 'dag', 'uid': 500}, 'jeroen': {'gid': 500, 'name': 'jeroen', 'uid': 501}} | | **list** list / elements=string | success | The CSV content as a list. **Sample:** [{'gid': 500, 'name': 'dag', 'uid': 500}, {'gid': 500, 'name': 'jeroen', 'uid': 501}] | ### Authors * Dag Wieers (@dagwieers) ansible community.general.keycloak_role – Allows administration of Keycloak roles via Keycloak API community.general.keycloak\_role – Allows administration of Keycloak roles via Keycloak API =========================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.keycloak_role`. New in version 3.4.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module allows you to add, remove or modify Keycloak roles via the Keycloak REST API. It requires access to the REST API via OpenID Connect; the user connecting and the client being used must have the requisite access rights. In a default Keycloak installation, admin-cli and an admin user would work, as would a separate client definition with the scope tailored to your needs and a user having the expected roles. * The names of module options are snake\_cased versions of the camelCase ones found in the Keycloak API and its documentation at <https://www.keycloak.org/docs-api/8.0/rest-api/index.html>. * Attributes are multi-valued in the Keycloak API. All attributes are lists of individual values and will be returned that way by this module. You may pass single values for attributes when calling the module, and this will be translated into a list suitable for the API. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **attributes** dictionary | | A dict of key/value pairs to set as custom attributes for the role. Values may be single values (e.g. a string) or a list of strings. | | **auth\_client\_id** string | **Default:**"admin-cli" | OpenID Connect *client\_id* to authenticate to the API with. | | **auth\_client\_secret** string | | Client Secret to use in conjunction with *auth\_client\_id* (if required). | | **auth\_keycloak\_url** string / required | | URL to the Keycloak instance. aliases: url | | **auth\_password** string | | Password to authenticate for API access with. aliases: password | | **auth\_realm** string | | Keycloak realm name to authenticate to for API access. | | **auth\_username** string | | Username to authenticate for API access with. aliases: username | | **client\_id** string | | If the role is a client role, the client id under which it resides. If this parameter is absent, the role is considered a realm role. | | **description** string | | The role description. | | **name** string / required | | Name of the role. This parameter is required. | | **realm** string | **Default:**"master" | The Keycloak realm under which this role resides. | | **state** string | **Choices:*** **present** ← * absent | State of the role. On `present`, the role will be created if it does not yet exist, or updated with the parameters you provide. On `absent`, the role will be removed if it exists. | | **token** string added in 3.0.0 of community.general | | Authentication token for Keycloak API. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Verify TLS certificates (do not disable this in production). | Examples -------- ``` - name: Create a Keycloak realm role, authentication with credentials community.general.keycloak_role: name: my-new-kc-role realm: MyCustomRealm state: present auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD delegate_to: localhost - name: Create a Keycloak realm role, authentication with token community.general.keycloak_role: name: my-new-kc-role realm: MyCustomRealm state: present auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth token: TOKEN delegate_to: localhost - name: Create a Keycloak client role community.general.keycloak_role: name: my-new-kc-role realm: MyCustomRealm client_id: MyClient state: present auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD delegate_to: localhost - name: Delete a Keycloak role community.general.keycloak_role: name: my-role-for-deletion state: absent auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD delegate_to: localhost - name: Create a keycloak role with some custom attributes community.general.keycloak_role: auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD name: my-new-role attributes: attrib1: value1 attrib2: value2 attrib3: - with - numerous - individual - list - items delegate_to: localhost ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **end\_state** dictionary | always | Role representation of role after module execution (sample is truncated) **Sample:** {'attributes': {}, 'clientRole': True, 'composite': False, 'containerId': '9f03eb61-a826-4771-a9fd-930e06d2d36a', 'description': 'My updated client test role', 'id': '561703dd-0f38-45ff-9a5a-0c978f794547', 'name': 'myrole'} | | **existing** dictionary | always | Role representation of existing role **Sample:** {'attributes': {}, 'clientRole': True, 'composite': False, 'containerId': '9f03eb61-a826-4771-a9fd-930e06d2d36a', 'description': 'My client test role', 'id': '561703dd-0f38-45ff-9a5a-0c978f794547', 'name': 'myrole'} | | **msg** string | always | Message as to what action was taken **Sample:** Role myrole has been updated | | **proposed** dictionary | always | Role representation of proposed changes to role **Sample:** {'description': 'My updated test description'} | ### Authors * Laurent Paumier (@laurpaum) ansible community.general.oneview_fc_network – Manage OneView Fibre Channel Network resources. community.general.oneview\_fc\_network – Manage OneView Fibre Channel Network resources. ======================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneview_fc_network`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Provides an interface to manage Fibre Channel Network resources. Can create, update, and delete. Requirements ------------ The below requirements are needed on the host that executes this module. * hpOneView >= 4.0.0 * python >= 2.7.9 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_version** integer | | OneView API Version. | | **config** path | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional and when used should be present in the host running the ansible commands. If the file path is not provided, the configuration will be loaded from environment variables. For links to example configuration files or how to use the environment variables verify the notes section. | | **data** dictionary / required | | List with the Fibre Channel Network properties. | | **hostname** string | | IP address or hostname for the appliance. | | **image\_streamer\_hostname** string | | IP address or hostname for the HPE Image Streamer REST API. | | **password** string | | Password for API authentication. | | **state** string / required | **Choices:*** present * absent | Indicates the desired state for the Fibre Channel Network resource. `present` will ensure data properties are compliant with OneView. `absent` will remove the resource from OneView, if it exists. | | **username** string | | Username for API authentication. | | **validate\_etag** boolean | **Choices:*** no * **yes** ← | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. | Notes ----- Note * A sample configuration file for the config parameter can be found at: <https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json> * Check how to use environment variables for configuration at: <https://github.com/HewlettPackard/oneview-ansible#environment-variables> * Additional Playbooks for the HPE OneView Ansible modules can be found at: <https://github.com/HewlettPackard/oneview-ansible/tree/master/examples> * The OneView API version used will directly affect returned and expected fields in resources. Information on setting the desired API version and can be found at: <https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version> Examples -------- ``` - name: Ensure that the Fibre Channel Network is present using the default configuration community.general.oneview_fc_network: config: "{{ config_file_path }}" state: present data: name: 'New FC Network' - name: Ensure that the Fibre Channel Network is present with fabricType 'DirectAttach' community.general.oneview_fc_network: config: "{{ config_file_path }}" state: present data: name: 'New FC Network' fabricType: 'DirectAttach' - name: Ensure that the Fibre Channel Network is present and is inserted in the desired scopes community.general.oneview_fc_network: config: "{{ config_file_path }}" state: present data: name: 'New FC Network' scopeUris: - '/rest/scopes/00SC123456' - '/rest/scopes/01SC123456' - name: Ensure that the Fibre Channel Network is absent community.general.oneview_fc_network: config: "{{ config_file_path }}" state: absent data: name: 'New FC Network' ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **fc\_network** dictionary | On state 'present'. Can be null. | Has the facts about the managed OneView FC Network. | ### Authors * Felipe Bulsoni (@fgbulsoni) ansible community.general.jail – Run tasks in jails community.general.jail – Run tasks in jails =========================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.jail`. * [Synopsis](#synopsis) * [Parameters](#parameters) Synopsis -------- * Run commands or put/fetch files to an existing jail Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **remote\_addr** string | **Default:**"inventory\_hostname" | var: ansible\_host var: ansible\_jail\_host | Path to the jail | | **remote\_user** string | | var: ansible\_user var: ansible\_jail\_user | User to execute as inside the jail | ### Authors * Ansible Core Team
programming_docs
ansible community.general.keycloak_client_rolemapping – Allows administration of Keycloak client_rolemapping with the Keycloak API community.general.keycloak\_client\_rolemapping – Allows administration of Keycloak client\_rolemapping with the Keycloak API ============================================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.keycloak_client_rolemapping`. New in version 3.5.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module allows you to add, remove or modify Keycloak client\_rolemapping with the Keycloak REST API. It requires access to the REST API via OpenID Connect; the user connecting and the client being used must have the requisite access rights. In a default Keycloak installation, admin-cli and an admin user would work, as would a separate client definition with the scope tailored to your needs and a user having the expected roles. * The names of module options are snake\_cased versions of the camelCase ones found in the Keycloak API and its documentation at <https://www.keycloak.org/docs-api/8.0/rest-api/index.html>. * Attributes are multi-valued in the Keycloak API. All attributes are lists of individual values and will be returned that way by this module. You may pass single values for attributes when calling the module, and this will be translated into a list suitable for the API. * When updating a client\_rolemapping, where possible provide the role ID to the module. This removes a lookup to the API to translate the name into the role ID. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auth\_client\_id** string | **Default:**"admin-cli" | OpenID Connect *client\_id* to authenticate to the API with. | | **auth\_client\_secret** string | | Client Secret to use in conjunction with *auth\_client\_id* (if required). | | **auth\_keycloak\_url** string / required | | URL to the Keycloak instance. aliases: url | | **auth\_password** string | | Password to authenticate for API access with. aliases: password | | **auth\_realm** string | | Keycloak realm name to authenticate to for API access. | | **auth\_username** string | | Username to authenticate for API access with. aliases: username | | **cid** string | | Id of the client to be mapped. This parameter is not required for updating or deleting the rolemapping but providing it will reduce the number of API calls required. | | **client\_id** string | | Name of the client to be mapped (different than *cid*). This parameter is required (can be replaced by cid for less API call). | | **gid** string | | Id of the group to be mapped. This parameter is not required for updating or deleting the rolemapping but providing it will reduce the number of API calls required. | | **group\_name** string | | Name of the group to be mapped. This parameter is required (can be replaced by gid for less API call). | | **realm** string | **Default:**"master" | They Keycloak realm under which this role\_representation resides. | | **roles** list / elements=dictionary | | Roles to be mapped to the group. | | | **id** string | | The unique identifier for this role\_representation. This parameter is not required for updating or deleting a role\_representation but providing it will reduce the number of API calls required. | | | **name** string | | Name of the role\_representation. This parameter is required only when creating or updating the role\_representation. | | **state** string | **Choices:*** **present** ← * absent | State of the client\_rolemapping. On `present`, the client\_rolemapping will be created if it does not yet exist, or updated with the parameters you provide. On `absent`, the client\_rolemapping will be removed if it exists. | | **token** string added in 3.0.0 of community.general | | Authentication token for Keycloak API. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Verify TLS certificates (do not disable this in production). | Examples -------- ``` - name: Map a client role to a group, authentication with credentials community.general.keycloak_client_rolemappings: realm: MyCustomRealm auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD state: present client_id: client1 group_name: group1 roles: - name: role_name1 id: role_id1 - name: role_name2 id: role_id2 delegate_to: localhost - name: Map a client role to a group, authentication with token community.general.keycloak_client_rolemappings: realm: MyCustomRealm auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth token: TOKEN state: present client_id: client1 group_name: group1 roles: - name: role_name1 id: role_id1 - name: role_name2 id: role_id2 delegate_to: localhost - name: Unmap client role from a group community.general.keycloak_client_rolemappings: realm: MyCustomRealm auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD state: absent client_id: client1 group_name: group1 roles: - name: role_name1 id: role_id1 - name: role_name2 id: role_id2 delegate_to: localhost ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **end\_state** dictionary | always | role\_representation representation of role\_representation after module execution. The sample is truncated. **Sample:** {'adminUrl': 'http://www.example.com/admin\_url', 'attributes': {'request.object.signature.alg': 'RS256'}} | | **existing** dictionary | always | role\_representation representation of existing role\_representation. The sample is truncated. **Sample:** {'adminUrl': 'http://www.example.com/admin\_url', 'attributes': {'request.object.signature.alg': 'RS256'}} | | **msg** string | always | Message as to what action was taken **Sample:** Role role1 assigned to group group1. | | **proposed** dictionary | always | role\_representation representation of proposed changes to client\_rolemapping. **Sample:** {'clientId': 'test'} | ### Authors * Gaëtan Daubresse (@Gaetan2907) ansible community.general.scaleway_security_group_info – Gather information about the Scaleway security groups available. community.general.scaleway\_security\_group\_info – Gather information about the Scaleway security groups available. ==================================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.scaleway_security_group_info`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Gather information about the Scaleway security groups available. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_timeout** integer | **Default:**30 | HTTP timeout to Scaleway API in seconds. aliases: timeout | | **api\_token** string / required | | Scaleway OAuth token. aliases: oauth\_token | | **api\_url** string | **Default:**"https://api.scaleway.com" | Scaleway API URL. aliases: base\_url | | **query\_parameters** dictionary | **Default:**{} | List of parameters passed to the query string. | | **region** string / required | **Choices:*** ams1 * EMEA-NL-EVS * par1 * EMEA-FR-PAR1 * par2 * EMEA-FR-PAR2 * waw1 * EMEA-PL-WAW1 | Scaleway region to use (for example `par1`). | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Validate SSL certs of the Scaleway API. | Notes ----- Note * Also see the API documentation on <https://developer.scaleway.com/> * If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `SCW_TOKEN`, `SCW_API_KEY`, `SCW_OAUTH_TOKEN` or `SCW_API_TOKEN`. * If one wants to use a different `api_url` one can also set the `SCW_API_URL` environment variable. Examples -------- ``` - name: Gather Scaleway security groups information community.general.scaleway_security_group_info: region: par1 register: result - ansible.builtin.debug: msg: "{{ result.scaleway_security_group_info }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **scaleway\_security\_group\_info** list / elements=dictionary | success | Response from Scaleway API. For more details please refer to: <https://developers.scaleway.com/en/products/instance/api/>. **Sample:** {'scaleway\_security\_group\_info': [{'description': 'test-ams', 'enable\_default\_security': True, 'id': '7fcde327-8bed-43a6-95c4-6dfbc56d8b51', 'name': 'test-ams', 'organization': '3f709602-5e6c-4619-b80c-e841c89734af', 'organization\_default': False, 'servers': [{'id': '12f19bc7-108c-4517-954c-e6b3d0311363', 'name': 'scw-e0d158'}]}]} | ### Authors * Yanis Guenane (@Spredzy) * Remy Leone (@sieben) ansible community.general.nios_cname_record – Configure Infoblox NIOS CNAME records community.general.nios\_cname\_record – Configure Infoblox NIOS CNAME records ============================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nios_cname_record`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Status](#status) DEPRECATED ---------- Removed in version 5.0.0 Why Please install the infoblox.nios\_modules collection and use the corresponding module from it. Alternative infoblox.nios\_modules.nios\_cname\_record Synopsis -------- * Adds and/or removes instances of CNAME record objects from Infoblox NIOS servers. This module manages NIOS `record:cname` objects using the Infoblox WAPI interface over REST. Requirements ------------ The below requirements are needed on the host that executes this module. * infoblox-client Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **canonical** string | | Configures the canonical name for this CNAME record. aliases: cname | | **comment** string | | Configures a text string comment to be associated with the instance of this object. The provided text string will be configured on the object instance. | | **extattrs** dictionary | | Allows for the configuration of Extensible Attributes on the instance of the object. This argument accepts a set of key / value pairs for configuration. | | **name** string / required | | Specifies the fully qualified hostname to add or remove from the system | | **provider** dictionary | | A dict object containing connection details. | | | **host** string | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. | | | **http\_pool\_connections** integer | **Default:**10 | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_pool\_maxsize** integer | **Default:**10 | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_request\_timeout** integer | **Default:**10 | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. | | | **max\_results** integer | **Default:**1000 | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. | | | **max\_retries** integer | **Default:**3 | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. | | | **password** string | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. | | | **silent\_ssl\_warnings** boolean | **Choices:*** no * **yes** ← | Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **username** string | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. | | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable. aliases: ssl\_verify | | | **wapi\_version** string | **Default:**"2.1" | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 | | **state** string | **Choices:*** **present** ← * absent | Configures the intended state of the instance of the object on the NIOS server. When this value is set to `present`, the object is configured on the device and when this value is set to `absent` the value is removed (if necessary) from the device. | | **ttl** integer | | Configures the TTL to be associated with this CNAME record | | **view** string | **Default:**"default" | Sets the DNS view to associate this CNAME record with. The DNS view must already be configured on the system aliases: dns\_view | Notes ----- Note * This module must be run locally, which can be achieved by specifying `connection: local`. * Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible. Examples -------- ``` - name: Configure a CNAME record community.general.nios_cname_record: name: cname.ansible.com canonical: realhost.ansible.com state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Add a comment to an existing CNAME record community.general.nios_cname_record: name: cname.ansible.com canonical: realhost.ansible.com comment: this is a test comment state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Remove a CNAME record from the system community.general.nios_cname_record: name: cname.ansible.com canonical: realhost.ansible.com state: absent provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local ``` Status ------ * This module will be removed in version 5.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Blair Rampling (@brampling) ansible community.general.cartesian – returns the cartesian product of lists community.general.cartesian – returns the cartesian product of lists ==================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.cartesian`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Takes the input lists and returns a list that represents the product of the input lists. * It is clearer with an example, it turns [1, 2, 3], [a, b] into [1, a], [1, b], [2, a], [2, b], [3, a], [3, b]. You can see the exact syntax in the examples section. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **\_raw** string / required | | | a set of lists | Examples -------- ``` - name: Example of the change in the description ansible.builtin.debug: msg: "{{ lookup('community.general.cartesian', [1,2,3], [a, b])}}" - name: loops over the cartesian product of the supplied lists ansible.builtin.debug: msg: "{{item}}" with_community.general.cartesian: - "{{list1}}" - "{{list2}}" - [1,2,3,4,5,6] ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **\_list** list / elements=list | success | list of lists composed of elements of the input lists | ### Authors * Unknown (!UNKNOWN) ansible community.general.rollbar_deployment – Notify Rollbar about app deployments community.general.rollbar\_deployment – Notify Rollbar about app deployments ============================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rollbar_deployment`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Notify Rollbar about app deployments (see <https://rollbar.com/docs/deploys_other/>) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **comment** string | | Deploy comment (e.g. what is being deployed). | | **environment** string / required | | Name of the environment being deployed, e.g. 'production'. | | **revision** string / required | | Revision number/sha being deployed. | | **rollbar\_user** string | | Rollbar username of the user who deployed. | | **token** string / required | | Your project access token. | | **url** string | **Default:**"https://api.rollbar.com/api/1/deploy/" | Optional URL to submit the notification to. | | **user** string | | User who deployed. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates for the target url will not be validated. This should only be used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Rollbar deployment notification community.general.rollbar_deployment: token: AAAAAA environment: staging user: ansible revision: '4.2' rollbar_user: admin comment: Test Deploy - name: Notify rollbar about current git revision deployment by current user community.general.rollbar_deployment: token: "{{ rollbar_access_token }}" environment: production revision: "{{ lookup('pipe', 'git rev-parse HEAD') }}" user: "{{ lookup('env', 'USER') }}" ``` ### Authors * Max Riveiro (@kavu)
programming_docs
ansible community.general.gitlab_runners – Ansible dynamic inventory plugin for GitLab runners. community.general.gitlab\_runners – Ansible dynamic inventory plugin for GitLab runners. ======================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.gitlab_runners`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Reads inventories from the GitLab API. * Uses a YAML configuration file gitlab\_runners.[yml|yaml]. Requirements ------------ The below requirements are needed on the local controller node that executes this inventory. * python >= 2.7 * python-gitlab > 1.8.0 Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **api\_token** string | | env:GITLAB\_API\_TOKEN added in 1.0.0 of community.general | GitLab token for logging in. aliases: private\_token, access\_token | | **compose** dictionary | **Default:**{} | | Create vars from jinja2 expressions. | | **filter** string | **Choices:*** active * paused * online * specific * shared | env:GITLAB\_FILTER added in 1.0.0 of community.general | filter runners from GitLab API | | **groups** dictionary | **Default:**{} | | Add hosts to group based on Jinja2 conditionals. | | **keyed\_groups** list / elements=string | **Default:**[] | | Add hosts to group based on the values of a variable. | | **leading\_separator** boolean added in 2.11 of ansible.builtin | **Choices:*** no * **yes** ← | | Use in conjunction with keyed\_groups. By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. This is because the default prefix is "" and the default separator is "\_". Set this option to False to omit the leading underscore (or other separator) if no prefix is given. If the group name is derived from a mapping the separator is still used to concatenate the items. To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. | | **plugin** string / required | **Choices:*** gitlab\_runners * community.general.gitlab\_runners | | The name of this plugin, it should always be set to 'gitlab\_runners' for this plugin to recognize it as it's own. | | **server\_url** string / required | **Default:**"https://gitlab.com" | env:GITLAB\_SERVER\_URL added in 1.0.0 of community.general | The URL of the GitLab server, with protocol (i.e. http or https). | | **strict** boolean | **Choices:*** **no** ← * yes | | If `yes` make invalid entries a fatal error, otherwise skip and continue. Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. | | **use\_extra\_vars** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** ← * yes | ini entries: [inventory\_plugins]use\_extra\_vars = no env:ANSIBLE\_INVENTORY\_USE\_EXTRA\_VARS | Merge extra vars into the available variables for composition (highest precedence). | | **verbose\_output** boolean | **Choices:*** no * **yes** ← | | Toggle to (not) include all available nodes metadata | Examples -------- ``` # gitlab_runners.yml plugin: community.general.gitlab_runners host: https://gitlab.com # Example using constructed features to create groups and set ansible_host plugin: community.general.gitlab_runners host: https://gitlab.com strict: False keyed_groups: # add e.g. amd64 hosts to an arch_amd64 group - prefix: arch key: 'architecture' # add e.g. linux hosts to an os_linux group - prefix: os key: 'platform' # create a group per runner tag # e.g. a runner tagged w/ "production" ends up in group "label_production" # hint: labels containing special characters will be converted to safe names - key: 'tag_list' prefix: tag ``` ### Authors * Stefan Heitmüller (@morph027) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#e7949382818689c1c4d3d1dc8f828e938a92828b8b8295c1c4d4d0dcc1c4d2d5dcc1c4d3dfdc808a9fc1c4d3d1dc84888a)> ansible community.general.office_365_connector_card – Use webhooks to create Connector Card messages within an Office 365 group community.general.office\_365\_connector\_card – Use webhooks to create Connector Card messages within an Office 365 group ========================================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.office_365_connector_card`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Creates Connector Card messages through * Office 365 Connectors <https://dev.outlook.com/Connectors> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **actions** list / elements=dictionary | | This array of objects will power the action links found at the bottom of the card. | | **color** string | | Accent color used for branding or indicating status in the card. | | **sections** list / elements=dictionary | | Contains a list of sections to display in the card. For more information see https://dev.outlook.com/Connectors/reference. | | **summary** string | | A string used for summarizing card content. This will be shown as the message subject. This is required if the text parameter isn't populated. | | **text** string | | The main text of the card. This will be rendered below the sender information and optional title, and above any sections or actions present. | | **title** string | | A title for the Connector message. Shown at the top of the message. | | **webhook** string / required | | The webhook URL is given to you when you create a new Connector. | Notes ----- Note * This module is not idempotent, therefore if the same task is run twice there will be two Connector Cards created Examples -------- ``` - name: Create a simple Connector Card community.general.office_365_connector_card: webhook: https://outlook.office.com/webhook/GUID/IncomingWebhook/GUID/GUID text: 'Hello, World!' - name: Create a Connector Card with the full format community.general.office_365_connector_card: webhook: https://outlook.office.com/webhook/GUID/IncomingWebhook/GUID/GUID summary: This is the summary property title: This is the **card's title** property text: This is the **card's text** property. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. color: E81123 sections: - title: This is the **section's title** property activity_image: http://connectorsdemo.azurewebsites.net/images/MSC12_Oscar_002.jpg activity_title: This is the section's **activityTitle** property activity_subtitle: This is the section's **activitySubtitle** property activity_text: This is the section's **activityText** property. hero_image: image: http://connectorsdemo.azurewebsites.net/images/WIN12_Scene_01.jpg title: This is the image's alternate text text: This is the section's text property. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. facts: - name: This is a fact name value: This is a fact value - name: This is a fact name value: This is a fact value - name: This is a fact name value: This is a fact value images: - image: http://connectorsdemo.azurewebsites.net/images/MicrosoftSurface_024_Cafe_OH-06315_VS_R1c.jpg title: This is the image's alternate text - image: http://connectorsdemo.azurewebsites.net/images/WIN12_Scene_01.jpg title: This is the image's alternate text - image: http://connectorsdemo.azurewebsites.net/images/WIN12_Anthony_02.jpg title: This is the image's alternate text actions: - "@type": ActionCard name: Comment inputs: - "@type": TextInput id: comment is_multiline: true title: Input's title property actions: - "@type": HttpPOST name: Save target: http://... - "@type": ActionCard name: Due Date inputs: - "@type": DateInput id: dueDate title: Input's title property actions: - "@type": HttpPOST name: Save target: http://... - "@type": HttpPOST name: Action's name prop. target: http://... - "@type": OpenUri name: Action's name prop targets: - os: default uri: http://... - start_group: true title: This is the title of a **second section** text: This second section is visually separated from the first one by setting its **startGroup** property to true. ``` ### Authors * Marc Sensenich (@marc-sensenich) ansible community.general.clc_blueprint_package – deploys a blue print package on a set of servers in CenturyLink Cloud. community.general.clc\_blueprint\_package – deploys a blue print package on a set of servers in CenturyLink Cloud. ================================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.clc_blueprint_package`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * An Ansible module to deploy blue print package on a set of servers in CenturyLink Cloud. Requirements ------------ The below requirements are needed on the host that executes this module. * python = 2.7 * requests >= 2.5.0 * clc-sdk Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **package\_id** string / required | | The package id of the blue print. | | **package\_params** dictionary | **Default:**{} | The dictionary of arguments required to deploy the blue print. | | **server\_ids** list / elements=string / required | | A list of server Ids to deploy the blue print package. | | **state** string | **Choices:*** **present** ← | Whether to install or uninstall the package. Currently it supports only "present" for install action. | | **wait** string | **Default:**"yes" | Whether to wait for the tasks to finish before returning. | Notes ----- Note * To use this module, it is required to set the below environment variables which enables access to the Centurylink Cloud - CLC\_V2\_API\_USERNAME, the account login id for the centurylink cloud - CLC\_V2\_API\_PASSWORD, the account password for the centurylink cloud * Alternatively, the module accepts the API token and account alias. The API token can be generated using the CLC account login and password via the HTTP api call @ <https://api.ctl.io/v2/authentication/login> - CLC\_V2\_API\_TOKEN, the API token generated from <https://api.ctl.io/v2/authentication/login> - CLC\_ACCT\_ALIAS, the account alias associated with the centurylink cloud * Users can set CLC\_V2\_API\_URL to specify an endpoint for pointing to a different CLC environment. Examples -------- ``` # Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples - name: Deploy package community.general.clc_blueprint_package: server_ids: - UC1TEST-SERVER1 - UC1TEST-SERVER2 package_id: 77abb844-579d-478d-3955-c69ab4a7ba1a package_params: {} ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **server\_ids** list / elements=string | success | The list of server ids that are changed **Sample:** ['UC1TEST-SERVER1', 'UC1TEST-SERVER2'] | ### Authors * CLC Runner (@clc-runner) ansible community.general.lvol – Configure LVM logical volumes community.general.lvol – Configure LVM logical volumes ====================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.lvol`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module creates, removes or resizes logical volumes. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **active** boolean | **Choices:*** no * **yes** ← | Whether the volume is active and visible to the host. | | **force** boolean | **Choices:*** **no** ← * yes | Shrink or remove operations of volumes requires this switch. Ensures that that filesystems get never corrupted/destroyed by mistake. | | **lv** string | | The name of the logical volume. | | **opts** string | | Free-form options to be passed to the lvcreate command. | | **pvs** string | | Comma separated list of physical volumes (e.g. /dev/sda,/dev/sdb). | | **resizefs** boolean | **Choices:*** **no** ← * yes | Resize the underlying filesystem together with the logical volume. Supported for `ext2`, `ext3`, `ext4`, `reiserfs` and `XFS` filesystems. Attempts to resize other filesystem types will fail. | | **shrink** boolean | **Choices:*** no * **yes** ← | Shrink if current size is higher than size requested. | | **size** string | | The size of the logical volume, according to lvcreate(8) --size, by default in megabytes or optionally with one of [bBsSkKmMgGtTpPeE] units; or according to lvcreate(8) --extents as a percentage of [VG|PVS|FREE]; Float values must begin with a digit. When resizing, apart from specifying an absolute size you may, according to lvextend(8)|lvreduce(8) `--size`, specify the amount to extend the logical volume with the prefix `+` or the amount to reduce the logical volume by with prefix `-`. Resizing using `+` or `-` was not supported prior to community.general 3.0.0. Please note that when using `+` or `-`, the module is **not idempotent**. | | **snapshot** string | | The name of the snapshot volume | | **state** string | **Choices:*** absent * **present** ← | Control if the logical volume exists. If `present` and the volume does not already exist then the `size` option is required. | | **thinpool** string | | The thin pool volume name. When you want to create a thin provisioned volume, specify a thin pool volume name. | | **vg** string / required | | The volume group this logical volume is part of. | Notes ----- Note * You must specify lv (when managing the state of logical volumes) or thinpool (when managing a thin provisioned volume). Examples -------- ``` - name: Create a logical volume of 512m community.general.lvol: vg: firefly lv: test size: 512 - name: Create a logical volume of 512m with disks /dev/sda and /dev/sdb community.general.lvol: vg: firefly lv: test size: 512 pvs: /dev/sda,/dev/sdb - name: Create cache pool logical volume community.general.lvol: vg: firefly lv: lvcache size: 512m opts: --type cache-pool - name: Create a logical volume of 512g. community.general.lvol: vg: firefly lv: test size: 512g - name: Create a logical volume the size of all remaining space in the volume group community.general.lvol: vg: firefly lv: test size: 100%FREE - name: Create a logical volume with special options community.general.lvol: vg: firefly lv: test size: 512g opts: -r 16 - name: Extend the logical volume to 1024m. community.general.lvol: vg: firefly lv: test size: 1024 - name: Extend the logical volume to consume all remaining space in the volume group community.general.lvol: vg: firefly lv: test size: +100%FREE - name: Extend the logical volume by given space community.general.lvol: vg: firefly lv: test size: +512M - name: Extend the logical volume to take all remaining space of the PVs and resize the underlying filesystem community.general.lvol: vg: firefly lv: test size: 100%PVS resizefs: true - name: Resize the logical volume to % of VG community.general.lvol: vg: firefly lv: test size: 80%VG force: yes - name: Reduce the logical volume to 512m community.general.lvol: vg: firefly lv: test size: 512 force: yes - name: Reduce the logical volume by given space community.general.lvol: vg: firefly lv: test size: -512M force: yes - name: Set the logical volume to 512m and do not try to shrink if size is lower than current one community.general.lvol: vg: firefly lv: test size: 512 shrink: no - name: Remove the logical volume. community.general.lvol: vg: firefly lv: test state: absent force: yes - name: Create a snapshot volume of the test logical volume. community.general.lvol: vg: firefly lv: test snapshot: snap1 size: 100m - name: Deactivate a logical volume community.general.lvol: vg: firefly lv: test active: false - name: Create a deactivated logical volume community.general.lvol: vg: firefly lv: test size: 512g active: false - name: Create a thin pool of 512g community.general.lvol: vg: firefly thinpool: testpool size: 512g - name: Create a thin volume of 128g community.general.lvol: vg: firefly lv: test thinpool: testpool size: 128g ``` ### Authors * Jeroen Hoekx (@jhoekx) * Alexander Bulimov (@abulimov) * Raoul Baudach (@unkaputtbar112) * Ziga Kern (@zigaSRC) ansible community.general.rax_mon_notification – Create or delete a Rackspace Cloud Monitoring notification. community.general.rax\_mon\_notification – Create or delete a Rackspace Cloud Monitoring notification. ====================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rax_mon_notification`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Create or delete a Rackspace Cloud Monitoring notification that specifies a channel that can be used to communicate alarms, such as email, webhooks, or PagerDuty. Rackspace monitoring module flow | rax\_mon\_entity -> rax\_mon\_check -> *rax\_mon\_notification* -> rax\_mon\_notification\_plan -> rax\_mon\_alarm Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * pyrax Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string | | Rackspace API key, overrides *credentials*. aliases: password | | **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/> | | **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided. aliases: creds\_file | | **details** dictionary / required | | Dictionary of key-value pairs used to initialize the notification. Required keys and meanings vary with notification type. See http://docs.rackspace.com/cm/api/v1.0/cm-devguide/content/ service-notification-types-crud.html for details. | | **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. | | **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. | | **label** string / required | | Defines a friendly name for this notification. String between 1 and 255 characters long. | | **notification\_type** string / required | **Choices:*** webhook * email * pagerduty | A supported notification type. | | **region** string | | Region to create an instance in. | | **state** string | **Choices:*** **present** ← * absent | Ensure that the notification with this `label` exists or does not exist. | | **tenant\_id** string | | The tenant ID used for authentication. | | **tenant\_name** string | | The tenant name used for authentication. | | **username** string | | Rackspace username, overrides *credentials*. | | **validate\_certs** boolean | **Choices:*** no * yes | Whether or not to require SSL validation of API endpoints. aliases: verify\_ssl | Notes ----- Note * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) Examples -------- ``` - name: Monitoring notification example gather_facts: False hosts: local connection: local tasks: - name: Email me when something goes wrong. rax_mon_entity: credentials: ~/.rax_pub label: omg type: email details: address: [email protected] register: the_notification ``` ### Authors * Ash Wilson (@smashwilson)
programming_docs
ansible community.general.proxmox_snap – Snapshot management of instances in Proxmox VE cluster community.general.proxmox\_snap – Snapshot management of instances in Proxmox VE cluster ======================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.proxmox_snap`. New in version 2.0.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Allows you to create/delete snapshots from instances in Proxmox VE cluster. * Supports both KVM and LXC, OpenVZ has not been tested, as it is no longer supported on Proxmox VE. Requirements ------------ The below requirements are needed on the host that executes this module. * proxmoxer * python >= 2.7 * requests Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_host** string / required | | The host of the Proxmox VE cluster. | | **api\_password** string / required | | The password to authenticate with. You can use PROXMOX\_PASSWORD environment variable. | | **api\_user** string / required | | The user to authenticate with. | | **description** string | | Specify the description for the snapshot. Only used on the configuration web interface. This is saved as a comment inside the configuration file. | | **force** boolean | **Choices:*** **no** ← * yes | For removal from config file, even if removing disk snapshot fails. | | **hostname** string | | The instance name. | | **snapname** string | **Default:**"ansible\_snap" | Name of the snapshot that has to be created. | | **state** string | **Choices:*** **present** ← * absent | Indicate desired state of the instance snapshot. | | **timeout** integer | **Default:**30 | Timeout for operations. | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | Enable / disable https certificate verification. | | **vmid** string | | The instance id. If not set, will be fetched from PromoxAPI based on the hostname. | | **vmstate** boolean | **Choices:*** **no** ← * yes | Snapshot includes RAM. | Notes ----- Note * Requires proxmoxer and requests modules on host. These modules can be installed with pip. * Supports `check_mode`. Examples -------- ``` - name: Create new container snapshot community.general.proxmox_snap: api_user: root@pam api_password: 1q2w3e api_host: node1 vmid: 100 state: present snapname: pre-updates - name: Remove container snapshot community.general.proxmox_snap: api_user: root@pam api_password: 1q2w3e api_host: node1 vmid: 100 state: absent snapname: pre-updates ``` ### Authors * Jeffrey van Pelt (@Thulium-Drake) ansible community.general.logentries – Sends events to Logentries community.general.logentries – Sends events to Logentries ========================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.logentries`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This callback plugin will generate JSON objects and send them to Logentries via TCP for auditing/debugging purposes. * Before 2.4, if you wanted to use an ini configuration, the file must be placed in the same directory as this plugin and named logentries.ini * In 2.4 and above you can just put it in the main Ansible configuration file. Requirements ------------ The below requirements are needed on the local controller node that executes this callback. * whitelisting in configuration * certifi (python library) * flatdict (python library), if you want to use the ‘flatten’ option Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **api** string | **Default:**"data.logentries.com" | ini entries: [callback\_logentries]api = data.logentries.com env:LOGENTRIES\_API | URI to the Logentries API | | **flatten** boolean | **Choices:*** **no** ← * yes | ini entries: [callback\_logentries]flatten = no env:LOGENTRIES\_FLATTEN | flatten complex data structures into a single dictionary with complex keys | | **port** string | **Default:**80 | ini entries: [callback\_logentries]port = 80 env:LOGENTRIES\_PORT | HTTP port to use when connecting to the API | | **tls\_port** string | **Default:**443 | ini entries: [callback\_logentries]tls\_port = 443 env:LOGENTRIES\_TLS\_PORT | Port to use when connecting to the API when TLS is enabled | | **token** string / required | | ini entries: [callback\_logentries]token = None env:LOGENTRIES\_ANSIBLE\_TOKEN | The logentries "TCP token" | | **use\_tls** boolean | **Choices:*** **no** ← * yes | ini entries: [callback\_logentries]use\_tls = no env:LOGENTRIES\_USE\_TLS | Toggle to decide whether to use TLS to encrypt the communications with the API server | Examples -------- ``` examples: > To enable, add this to your ansible.cfg file in the defaults block [defaults] callback_whitelist = community.general.logentries Either set the environment variables export LOGENTRIES_API=data.logentries.com export LOGENTRIES_PORT=10000 export LOGENTRIES_ANSIBLE_TOKEN=dd21fc88-f00a-43ff-b977-e3a4233c53af Or in the main Ansible config file [callback_logentries] api = data.logentries.com port = 10000 tls_port = 20000 use_tls = no token = dd21fc88-f00a-43ff-b977-e3a4233c53af flatten = False ``` ### Authors * Unknown (!UNKNOWN) ansible community.general.stackpath_compute – StackPath Edge Computing inventory source community.general.stackpath\_compute – StackPath Edge Computing inventory source ================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.stackpath_compute`. New in version 1.2.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Get inventory hosts from StackPath Edge Computing. * Uses a YAML configuration file that ends with stackpath\_compute.(yml|yaml). Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **cache** boolean | **Choices:*** **no** ← * yes | ini entries: [inventory]cache = no env:ANSIBLE\_INVENTORY\_CACHE | Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work. | | **cache\_connection** string | | ini entries: [defaults]fact\_caching\_connection = None [inventory]cache\_connection = None env:ANSIBLE\_CACHE\_PLUGIN\_CONNECTION env:ANSIBLE\_INVENTORY\_CACHE\_CONNECTION | Cache connection data or path, read cache plugin documentation for specifics. | | **cache\_plugin** string | **Default:**"memory" | ini entries: [defaults]fact\_caching = memory [inventory]cache\_plugin = memory env:ANSIBLE\_CACHE\_PLUGIN env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN | Cache plugin to use for the inventory's source data. | | **cache\_prefix** string | **Default:**"ansible\_inventory\_" | ini entries: [default]fact\_caching\_prefix = ansible\_inventory\_ [inventory]cache\_prefix = ansible\_inventory\_ env:ANSIBLE\_CACHE\_PLUGIN\_PREFIX env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN\_PREFIX | Prefix to use for cache plugin files/tables | | **cache\_timeout** integer | **Default:**3600 | ini entries: [defaults]fact\_caching\_timeout = 3600 [inventory]cache\_timeout = 3600 env:ANSIBLE\_CACHE\_PLUGIN\_TIMEOUT env:ANSIBLE\_INVENTORY\_CACHE\_TIMEOUT | Cache duration in seconds | | **client\_id** string / required | | | An OAuth client ID generated from the API Management section of the StackPath customer portal <https://control.stackpath.net/api-management>. | | **client\_secret** string / required | | | An OAuth client secret generated from the API Management section of the StackPath customer portal <https://control.stackpath.net/api-management>. | | **compose** dictionary | **Default:**{} | | Create vars from jinja2 expressions. | | **groups** dictionary | **Default:**{} | | Add hosts to group based on Jinja2 conditionals. | | **keyed\_groups** list / elements=string | **Default:**[] | | Add hosts to group based on the values of a variable. | | **leading\_separator** boolean added in 2.11 of ansible.builtin | **Choices:*** no * **yes** ← | | Use in conjunction with keyed\_groups. By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. This is because the default prefix is "" and the default separator is "\_". Set this option to False to omit the leading underscore (or other separator) if no prefix is given. If the group name is derived from a mapping the separator is still used to concatenate the items. To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. | | **plugin** string / required | **Choices:*** community.general.stackpath\_compute | | A token that ensures this is a source file for the plugin. | | **stack\_slugs** list / elements=string | | | A list of Stack slugs to query instances in. If no entry then get instances in all stacks on the account. | | **strict** boolean | **Choices:*** **no** ← * yes | | If `yes` make invalid entries a fatal error, otherwise skip and continue. Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. | | **use\_extra\_vars** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** ← * yes | ini entries: [inventory\_plugins]use\_extra\_vars = no env:ANSIBLE\_INVENTORY\_USE\_EXTRA\_VARS | Merge extra vars into the available variables for composition (highest precedence). | | **use\_internal\_ip** boolean | **Choices:*** no * yes | | Whether or not to use internal IP addresses, If false, uses external IP addresses, internal otherwise. If an instance doesn't have an external IP it will not be returned when this option is set to false. | Examples -------- ``` # Example using credentials to fetch all workload instances in a stack. --- plugin: community.general.stackpath_compute client_id: my_client_id client_secret: my_client_secret stack_slugs: - my_first_stack_slug - my_other_stack_slug use_internal_ip: false ``` ### Authors * UNKNOWN (@shayrybak) ansible community.general.aix_devices – Manages AIX devices community.general.aix\_devices – Manages AIX devices ==================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.aix_devices`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This module discovers, defines, removes and modifies attributes of AIX devices. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **attributes** dictionary | | A list of device attributes. | | **device** string | | The name of the device. `all` is valid to rescan `available` all devices (AIX cfgmgr command). | | **force** boolean | **Choices:*** **no** ← * yes | Forces action. | | **recursive** boolean | **Choices:*** **no** ← * yes | Removes or defines a device and children devices. | | **state** string | **Choices:*** **available** ← * defined * removed | Controls the device state. `available` (alias `present`) rescan a specific device or all devices (when `device` is not specified). `removed` (alias `absent` removes a device. `defined` changes device to Defined state. | Examples -------- ``` - name: Scan new devices community.general.aix_devices: device: all state: available - name: Scan new virtual devices (vio0) community.general.aix_devices: device: vio0 state: available - name: Removing IP alias to en0 community.general.aix_devices: device: en0 attributes: delalias4: 10.0.0.100,255.255.255.0 - name: Removes ent2 community.general.aix_devices: device: ent2 state: removed - name: Put device en2 in Defined community.general.aix_devices: device: en2 state: defined - name: Removes ent4 (inexistent). community.general.aix_devices: device: ent4 state: removed - name: Put device en4 in Defined (inexistent) community.general.aix_devices: device: en4 state: defined - name: Put vscsi1 and children devices in Defined state. community.general.aix_devices: device: vscsi1 recursive: yes state: defined - name: Removes vscsi1 and children devices. community.general.aix_devices: device: vscsi1 recursive: yes state: removed - name: Changes en1 mtu to 9000 and disables arp. community.general.aix_devices: device: en1 attributes: mtu: 900 arp: off state: available - name: Configure IP, netmask and set en1 up. community.general.aix_devices: device: en1 attributes: netaddr: 192.168.0.100 netmask: 255.255.255.0 state: up state: available - name: Adding IP alias to en0 community.general.aix_devices: device: en0 attributes: alias4: 10.0.0.100,255.255.255.0 state: available ``` ### Authors * Kairo Araujo (@kairoaraujo) ansible community.general.nios_next_network – Return the next available network range for a network-container community.general.nios\_next\_network – Return the next available network range for a network-container ======================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nios_next_network`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 5.0.0 Why Please install the infoblox.nios\_modules collection and use the corresponding lookup from it. Alternative infoblox.nios\_modules.nios\_next\_network Synopsis -------- * Uses the Infoblox WAPI API to return the next available network addresses for a given network CIDR Requirements ------------ The below requirements are needed on the local controller node that executes this lookup. * infoblox\_client Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **\_terms** string / required | | | The CIDR network to retrieve the next network from next available network within the specified container. | | **cidr** string / required | **Default:**24 | | The CIDR of the network to retrieve the next network from next available network within the specified container. Also, Requested CIDR must be specified and greater than the parent CIDR. | | **exclude** string | **Default:**"" | | Network addresses returned from network-container excluding list of user's input network range | | **num** string | **Default:**1 | | The number of network addresses to return from network-container | | **provider** dictionary | | | A dict object containing connection details. | | | **host** string | | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. | | | **http\_pool\_connections** integer | **Default:**10 | | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_pool\_maxsize** integer | **Default:**10 | | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_request\_timeout** integer | **Default:**10 | | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. | | | **max\_results** integer | **Default:**1000 | | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. | | | **max\_retries** integer | **Default:**3 | | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. | | | **password** string | | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. | | | **silent\_ssl\_warnings** boolean | **Choices:*** no * **yes** ← | | Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **username** string | | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. | | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | | Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable. aliases: ssl\_verify | | | **wapi\_version** string | **Default:**"2.1" | | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 | Notes ----- Note * This module must be run locally, which can be achieved by specifying `connection: local`. * Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible. Examples -------- ``` - name: return next available network for network-container 192.168.10.0/24 ansible.builtin.set_fact: networkaddr: "{{ lookup('community.general.nios_next_network', '192.168.10.0/24', cidr=25, provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}" - name: return the next 2 available network addresses for network-container 192.168.10.0/24 ansible.builtin.set_fact: networkaddr: "{{ lookup('community.general.nios_next_network', '192.168.10.0/24', cidr=25, num=2, provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}" - name: return the available network addresses for network-container 192.168.10.0/24 excluding network range '192.168.10.0/25' ansible.builtin.set_fact: networkaddr: "{{ lookup('community.general.nios_next_network', '192.168.10.0/24', cidr=25, exclude=['192.168.10.0/25'], provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **\_list** list / elements=string | success | The list of next network addresses available | Status ------ * This lookup will be removed in version 5.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Unknown (!UNKNOWN)
programming_docs
ansible community.general.python_requirements_info – Show python path and assert dependency versions community.general.python\_requirements\_info – Show python path and assert dependency versions ============================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.python_requirements_info`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Get info about available Python requirements on the target host, including listing required libraries and gathering versions. * This module was called `python_requirements_facts` before Ansible 2.9. The usage did not change. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **dependencies** list / elements=string | | A list of version-likes or module names to check for installation. Supported operators: <, >, <=, >=, or ==. The bare module name like *ansible*, the module with a specific version like *boto3==1.6.1*, or a partial version like *requests>2* are all valid specifications. | Examples -------- ``` - name: Show python lib/site paths community.general.python_requirements_info: - name: Check for modern boto3 and botocore versions community.general.python_requirements_info: dependencies: - boto3>1.6 - botocore<2 ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **mismatched** dictionary | always | A dictionary of dependencies that did not satisfy the desired version **Sample:** {'botocore': {'desired': 'botocore>2', 'installed': '1.10.60'}} | | **not\_found** list / elements=string | always | A list of packages that could not be imported at all, and are not installed **Sample:** ['boto4', 'requests'] | | **python** string | always | path to python version used **Sample:** /usr/local/opt/python@2/bin/python2.7 | | **python\_system\_path** list / elements=string | always | List of paths python is looking for modules in **Sample:** ['/usr/local/opt/python@2/site-packages/', '/usr/lib/python/site-packages/', '/usr/lib/python/site-packages/'] | | **python\_version** string | always | version of python **Sample:** 2.7.15 (default, May 1 2018, 16:44:08) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] | | **valid** dictionary | always | A dictionary of dependencies that matched their desired versions. If no version was specified, then *desired* will be null **Sample:** {'boto3': {'desired': None, 'installed': '1.7.60'}, 'botocore': {'desired': 'botocore<2', 'installed': '1.10.60'}} | ### Authors * Will Thames (@willthames) * Ryan Scott Brown (@ryansb) ansible community.general.jabber – post task events to a jabber server community.general.jabber – post task events to a jabber server ============================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.jabber`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) Synopsis -------- * The chatty part of ChatOps with a Hipchat server as a target * This callback plugin sends status updates to a HipChat channel during playbook execution. Requirements ------------ The below requirements are needed on the local controller node that executes this callback. * xmpp (python lib <https://github.com/ArchipelProject/xmpppy>) Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **password** string / required | | env:JABBER\_PASS | Password for the user to the jabber server | | **server** string / required | | env:JABBER\_SERV | connection info to jabber server | | **to** string / required | | env:JABBER\_TO | chat identifier that will receive the message | | **user** string / required | | env:JABBER\_USER | Jabber user to authenticate as | ### Authors * Unknown (!UNKNOWN) ansible community.general.gitlab_group_variable – Creates, updates, or deletes GitLab groups variables community.general.gitlab\_group\_variable – Creates, updates, or deletes GitLab groups variables ================================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.gitlab_group_variable`. New in version 1.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Creates a group variable if it does not exist. * When a group variable does exist, its value will be updated when the values are different. * Variables which are untouched in the playbook, but are not untouched in the GitLab group, they stay untouched (*purge* is `false`) or will be deleted (*purge* is `true`). Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * python-gitlab python module Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_password** string | | The password to use for authentication against the API | | **api\_token** string / required | | GitLab access token with API permissions. | | **api\_url** string | | The resolvable endpoint for the API | | **api\_username** string | | The username to use for authentication against the API | | **group** string / required | | The path and name of the group. | | **purge** boolean | **Choices:*** **no** ← * yes | When set to `true`, delete all variables which are not untouched in the task. | | **state** string | **Choices:*** **present** ← * absent | Create or delete group variable. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether or not to validate SSL certs when supplying a https endpoint. | | **vars** dictionary | **Default:**{} | When the list element is a simple key-value pair, set masked and protected to false. When the list element is a dict with the keys *value*, *masked* and *protected*, the user can have full control about whether a value should be masked, protected or both. Support for protected values requires GitLab >= 9.3. Support for masked values requires GitLab >= 11.10. A *value* must be a string or a number. Field *variable\_type* must be a string with either `env_var`, which is the default, or `file`. When a value is masked, it must be in Base64 and have a length of at least 8 characters. See GitLab documentation on acceptable values for a masked variable (<https://docs.gitlab.com/ce/ci/variables/#masked-variables>). | Notes ----- Note * Supports *check\_mode*. Examples -------- ``` - name: Set or update some CI/CD variables community.general.gitlab_group_variable: api_url: https://gitlab.com api_token: secret_access_token group: scodeman/testgroup/ purge: false vars: ACCESS_KEY_ID: abc123 SECRET_ACCESS_KEY: 321cba - name: Set or update some CI/CD variables community.general.gitlab_group_variable: api_url: https://gitlab.com api_token: secret_access_token group: scodeman/testgroup/ purge: false vars: ACCESS_KEY_ID: abc123 SECRET_ACCESS_KEY: value: 3214cbad masked: true protected: true variable_type: env_var - name: Delete one variable community.general.gitlab_group_variable: api_url: https://gitlab.com api_token: secret_access_token group: scodeman/testgroup/ state: absent vars: ACCESS_KEY_ID: abc123 ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **group\_variable** dictionary | always | Four lists of the variablenames which were added, updated, removed or exist. | | | **added** list / elements=string | always | A list of variables which were created. **Sample:** ['ACCESS\_KEY\_ID', 'SECRET\_ACCESS\_KEY'] | | | **removed** list / elements=string | always | A list of variables which were deleted. **Sample:** ['ACCESS\_KEY\_ID', 'SECRET\_ACCESS\_KEY'] | | | **untouched** list / elements=string | always | A list of variables which exist. **Sample:** ['ACCESS\_KEY\_ID', 'SECRET\_ACCESS\_KEY'] | | | **updated** list / elements=string | always | A list of variables whose values were changed. **Sample:** ['ACCESS\_KEY\_ID', 'SECRET\_ACCESS\_KEY'] | ### Authors * Florent Madiot (@scodeman) ansible community.general.xenserver_facts – get facts reported on xenserver community.general.xenserver\_facts – get facts reported on xenserver ==================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.xenserver_facts`. * [Synopsis](#synopsis) * [Examples](#examples) Synopsis -------- * Reads data out of XenAPI, can be used instead of multiple xe commands. Examples -------- ``` - name: Gather facts from xenserver community.general.xenserver_facts: - name: Print running VMs ansible.builtin.debug: msg: "{{ item }}" with_items: "{{ xs_vms.keys() }}" when: xs_vms[item]['power_state'] == "Running" # Which will print: # # TASK: [Print running VMs] *********************************************************** # skipping: [10.13.0.22] => (item=CentOS 4.7 (32-bit)) # ok: [10.13.0.22] => (item=Control domain on host: 10.0.13.22) => { # "item": "Control domain on host: 10.0.13.22", # "msg": "Control domain on host: 10.0.13.22" # } ``` ### Authors * Andy Hill (@andyhky) * Tim Rupp (@caphrim007) * Robin Lee (@cheese) ansible community.general.spectrum_model_attrs – Enforce a model’s attributes in CA Spectrum. community.general.spectrum\_model\_attrs – Enforce a model’s attributes in CA Spectrum. ======================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.spectrum_model_attrs`. New in version 2.5.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module can be used to enforce a model’s attributes in CA Spectrum. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **attributes** list / elements=dictionary / required | | A list of attribute names and values to enforce. All values and parameters are case sensitive and must be provided as strings only. | | | **name** string / required | | Attribute name OR hex ID. Currently defined names are: `App_Manufacturer` (`0x230683`) `CollectionsModelNameString` (`0x12adb`) `Condition` (`0x1000a`) `Criticality` (`0x1290c`) `DeviceType` (`0x23000e`) `isManaged` (`0x1295d`) `Model_Class` (`0x11ee8`) `Model_Handle` (`0x129fa`) `Model_Name` (`0x1006e`) `Modeltype_Handle` (`0x10001`) `Modeltype_Name` (`0x10000`) `Network_Address` (`0x12d7f`) `Notes` (`0x11564`) `ServiceDesk_Asset_ID` (`0x12db9`) `TopologyModelNameString` (`0x129e7`) `sysDescr` (`0x10052`) `sysName` (`0x10b5b`) `Vendor_Name` (`0x11570`) `Description` (`0x230017`) Hex IDs are the direct identifiers in Spectrum and will always work. To lookup hex IDs go to the UI: Locator -> Devices -> By Model Name -> <enter any model> -> Attributes tab. | | | **value** string / required | | Attribute value. Empty strings should be `""` or `null`. | | **name** string / required | | Model name. | | **type** string / required | | Model type. | | **url** string / required | | URL of OneClick server. | | **url\_password** string / required | | OneClick password. aliases: password | | **url\_username** string / required | | OneClick username. aliases: username | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | if `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Validate SSL certificates. Only change this to `false` if you can guarantee that you are talking to the correct endpoint and there is no man-in-the-middle attack happening. | Notes ----- Note * Tested on CA Spectrum version 10.4.2.0.189. * Model creation and deletion are not possible with this module. For that use [community.general.spectrum\_device](spectrum_device_module#ansible-collections-community-general-spectrum-device-module) instead. Examples -------- ``` - name: Enforce maintenance mode for modelxyz01 with a note about why community.general.spectrum_model_attrs: url: "http://oneclick.url.com" username: "{{ oneclick_username }}" password: "{{ oneclick_password }}" name: "modelxyz01" type: "Host_Device" validate_certs: true attributes: - name: "isManaged" value: "false" - name: "Notes" value: "MM set on {{ ansible_date_time.iso8601 }} via CO {{ CO }} by {{ tower_user_name | default(ansible_user_id) }}" delegate_to: localhost register: spectrum_model_attrs_status ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **changed\_attrs** dictionary | always | Dictionary of changed name or hex IDs (whichever was specified) to their new corresponding values. **Sample:** {'Notes': 'MM set on 2021-02-03T22:04:02Z via CO CO9999 by tgates', 'isManaged': 'true'} | | **msg** string | always | Informational message on the job result. **Sample:** Success | ### Authors * Tyler Gates (@tgates81) ansible community.general.copr – Manage one of the Copr repositories community.general.copr – Manage one of the Copr repositories ============================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.copr`. New in version 2.0.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module can enable, disable or remove the specified repository. Requirements ------------ The below requirements are needed on the host that executes this module. * dnf * dnf-plugins-core Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **chroot** string | | The name of the chroot that you want to enable/disable/remove in the project, for example `epel-7-x86_64`. Default chroot is determined by the operating system, version of the operating system, and architecture on which the module is run. | | **host** string | **Default:**"copr.fedorainfracloud.org" | The Copr host to work with. | | **name** string / required | | Copr directory name, for example `@copr/copr-dev`. | | **protocol** string | **Default:**"https" | This indicate which protocol to use with the host. | | **state** string | **Choices:*** absent * **enabled** ← * disabled | Whether to set this project as `enabled`, `disabled` or `absent`. | Notes ----- Note * Supports `check_mode`. Examples -------- ``` - name: Enable project Test of the user schlupov community.general.copr: host: copr.fedorainfracloud.org state: enabled name: schlupov/Test chroot: fedora-31-x86_64 - name: Remove project integration_tests of the group copr community.general.copr: state: absent name: '@copr/integration_tests' ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **repo** string | success | Path to the project on the host. **Sample:** copr.fedorainfracloud.org/group\_copr/integration\_tests | | **repo\_filename** string | success | The name of the repo file in which the copr project information is stored. **Sample:** \_copr:copr.fedorainfracloud.org:group\_copr:integration\_tests.repo | ### Authors * Silvie Chlupova (@schlupov) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#1d6e7e7571686d726b3b3e2e2a263b3e282f263b3e2925266f7879757c693b3e292b267e7270)> ansible community.general.rundeck_job_run – Run a Rundeck job community.general.rundeck\_job\_run – Run a Rundeck job ======================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rundeck_job_run`. New in version 3.8.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module runs a Rundeck job specified by ID. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **abort\_on\_timeout** boolean | **Choices:*** **no** ← * yes | Send a job abort request if exceeded the *wait\_execution\_timeout* specified. | | **api\_token** string / required | | Rundeck User API Token. | | **api\_version** integer | **Default:**39 | Rundeck API version to be used. API version must be at least 14. | | **client\_cert** path | | PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, `client_key` is not required. | | **client\_key** path | | PEM formatted file that contains your private key to be used for SSL client authentication. If `client_cert` contains both the certificate and key, this option is not required. | | **filter\_nodes** string | | Filter the nodes where the jobs must run. See <https://docs.rundeck.com/docs/manual/11-node-filters.html#node-filter-syntax>. | | **force** boolean | **Choices:*** **no** ← * yes | If `yes` do not get a cached copy. Alias `thirsty` has been deprecated and will be removed in 2.13. aliases: thirsty | | **force\_basic\_auth** boolean | **Choices:*** **no** ← * yes | Credentials specified with *url\_username* and *url\_password* should be passed in HTTP Header. | | **http\_agent** string | **Default:**"ansible-httpget" | Header to identify as, generally appears in web server logs. | | **job\_id** string / required | | The job unique ID. | | **job\_options** dictionary | | The job options for the steps. Numeric values must be quoted. | | **loglevel** string | **Choices:*** debug * verbose * **info** ← * warn * error | Log level configuration. | | **run\_at\_time** string | | Schedule the job execution to run at specific date and time. ISO-8601 date and time format like `2021-10-05T15:45:00-03:00`. | | **url** string / required | | Rundeck instance URL. | | **url\_password** string | | The password for use in HTTP basic authentication. If the *url\_username* parameter is not specified, the *url\_password* parameter will not be used. | | **url\_username** string | | The username for use in HTTP basic authentication. This parameter can be used without *url\_password* for sites that allow empty passwords | | **use\_gssapi** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** ← * yes | Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication. Requires the Python library [gssapi](https://github.com/pythongssapi/python-gssapi) to be installed. Credentials for GSSAPI can be specified with *url\_username*/*url\_password* or with the GSSAPI env var `KRB5CCNAME` that specified a custom Kerberos credential cache. NTLM authentication is `not` supported even if the GSSAPI mech for NTLM has been installed. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | | **wait\_execution** boolean | **Choices:*** no * **yes** ← | Wait until the job finished the execution. | | **wait\_execution\_delay** integer | **Default:**5 | Delay, in seconds, between job execution status check requests. | | **wait\_execution\_timeout** integer | **Default:**120 | Job execution wait timeout in seconds. If the timeout is reached, the job will be aborted. Keep in mind that there is a sleep based on *wait\_execution\_delay* after each job status check. | Examples -------- ``` - name: Run a Rundeck job community.general.rundeck_job_run: url: "https://rundeck.example.org" api_version: 39 api_token: "mytoken" job_id: "xxxxxxxxxxxxxxxxx" register: rundeck_job_run - name: Show execution info ansible.builtin.debug: var: rundeck_job_run.execution_info - name: Run a Rundeck job with options community.general.rundeck_job_run: url: "https://rundeck.example.org" api_version: 39 api_token: "mytoken" job_id: "xxxxxxxxxxxxxxxxx" job_options: option_1: "value_1" option_2: "value_3" option_3: "value_3" register: rundeck_job_run - name: Run a Rundeck job with timeout, delay between status check and abort on timeout community.general.rundeck_job_run: url: "https://rundeck.example.org" api_version: 39 api_token: "mytoken" job_id: "xxxxxxxxxxxxxxxxx" wait_execution_timeout: 30 wait_execution_delay: 10 abort_on_timeout: true register: rundeck_job_run - name: Schedule a Rundeck job community.general.rundeck_job_run: url: "https://rundeck.example.org" api_version: 39 api_token: "mytoken" job_id: "xxxxxxxxxxxxxxxxx" run_at_time: "2021-10-05T15:45:00-03:00" register: rundeck_job_schedule - name: Fire-and-forget a Rundeck job community.general.rundeck_job_run: url: "https://rundeck.example.org" api_version: 39 api_token: "mytoken" job_id: "xxxxxxxxxxxxxxxxx" wait_execution: false register: rundeck_job_run ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **execution\_info** dictionary | always | Rundeck job execution metadata. **Sample:** {'execution\_info': {'argstring': '-exit\_code 0', 'date-ended': {'date': '2021-10-05T15:50:26Z', 'unixtime': 1633449026358}, 'date-started': {'date': '2021-10-05T15:50:20Z', 'unixtime': 1633449020784}, 'description': "sleep 5 && echo 'Test!' && exit ${option.exit\_code}", 'executionType': 'user', 'href': 'https://rundeck.example.org/api/39/execution/1', 'id': 1, 'job': {'averageDuration': 4917, 'description': '', 'group': '', 'href': 'https://rundeck.example.org/api/39/job/697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a', 'id': '697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a', 'name': 'Test', 'options': {'exit\_code': '0'}, 'permalink': 'https://rundeck.example.org/project/myproject/job/show/697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a', 'project': 'myproject'}, 'output': 'Test!', 'permalink': 'https://rundeck.example.org/project/myproject/execution/show/1', 'project': 'myproject', 'serverUUID': '5b9a1438-fa3a-457e-b254-8f3d70338068', 'status': 'succeeded', 'successfulNodes': ['localhost'], 'user': 'admin'}, 'msg': 'Job execution succeeded!'} | ### Authors * Phillipe Smith (@phsmith)
programming_docs
ansible community.general.bigpanda – Notify BigPanda about deployments community.general.bigpanda – Notify BigPanda about deployments ============================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.bigpanda`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Notify BigPanda when deployments start and end (successfully or not). Returns a deployment object containing all the parameters for future module calls. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **component** string / required | | The name of the component being deployed. Ex: billing aliases: name | | **deployment\_message** string added in 0.2.0 of community.general | | Message about the deployment. | | **description** string | | Free text description of the deployment. | | **env** string | | The environment name, typically 'production', 'staging', etc. | | **hosts** string | | Name of affected host name. Can be a list. If not specified, it defaults to the remote system's hostname. aliases: host | | **owner** string | | The person responsible for the deployment. | | **source\_system** string | **Default:**"ansible" | Source system used in the requests to the API | | **state** string / required | **Choices:*** started * finished * failed | State of the deployment. | | **token** string / required | | API token. | | **url** string | **Default:**"https://api.bigpanda.io" | Base URL of the API server. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates for the target url will not be validated. This should only be used on personally controlled sites using self-signed certificates. | | **version** string / required | | The deployment version. | Examples -------- ``` - name: Notify BigPanda about a deployment community.general.bigpanda: component: myapp version: '1.3' token: '{{ bigpanda_token }}' state: started - name: Notify BigPanda about a deployment community.general.bigpanda: component: myapp version: '1.3' token: '{{ bigpanda_token }}' state: finished # If outside servers aren't reachable from your machine, use delegate_to and override hosts: - name: Notify BigPanda about a deployment community.general.bigpanda: component: myapp version: '1.3' token: '{{ bigpanda_token }}' hosts: '{{ ansible_hostname }}' state: started delegate_to: localhost register: deployment - name: Notify BigPanda about a deployment community.general.bigpanda: component: '{{ deployment.component }}' version: '{{ deployment.version }}' token: '{{ deployment.token }}' state: finished delegate_to: localhost ``` ### Authors * Hagai Kariti (@hkariti) ansible community.general.online_server_info – Gather information about Online servers. community.general.online\_server\_info – Gather information about Online servers. ================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.online_server_info`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Gather information about the servers. * <https://www.online.net/en/dedicated-server> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_timeout** integer | **Default:**30 | HTTP timeout to Online API in seconds. aliases: timeout | | **api\_token** string / required | | Online OAuth token. aliases: oauth\_token | | **api\_url** string | **Default:**"https://api.online.net" | Online API URL aliases: base\_url | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Validate SSL certs of the Online API. | Notes ----- Note * Also see the API documentation on <https://console.online.net/en/api/> * If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `ONLINE_TOKEN`, `ONLINE_API_KEY`, `ONLINE_OAUTH_TOKEN`, `ONLINE_API_TOKEN` * If one wants to use a different `api_url` one can also set the `ONLINE_API_URL` environment variable. Examples -------- ``` - name: Gather Online server information community.general.online_server_info: api_token: '0d1627e8-bbf0-44c5-a46f-5c4d3aef033f' register: result - ansible.builtin.debug: msg: "{{ result.online_server_info }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **online\_server\_info** list / elements=dictionary | success | Response from Online API. For more details please refer to: <https://console.online.net/en/api/>. **Sample:** {'online\_server\_info': [{'abuse': '[email protected]', 'anti\_ddos': False, 'bmc': {'session\_key': None}, 'boot\_mode': 'normal', 'contacts': {'owner': 'foobar', 'tech': 'foobar'}, 'disks': [{'$ref': '/api/v1/server/hardware/disk/68452'}, {'$ref': '/api/v1/server/hardware/disk/68453'}], 'drive\_arrays': [{'disks': [{'$ref': '/api/v1/server/hardware/disk/68452'}, {'$ref': '/api/v1/server/hardware/disk/68453'}], 'raid\_controller': {'$ref': '/api/v1/server/hardware/raidController/9910'}, 'raid\_level': 'RAID1'}], 'hardware\_watch': True, 'hostname': 'sd-42', 'id': 42, 'ip': [{'address': '195.154.172.149', 'mac': '28:92:4a:33:5e:c6', 'reverse': '195-154-172-149.rev.poneytelecom.eu.', 'switch\_port\_state': 'up', 'type': 'public'}, {'address': '10.90.53.212', 'mac': '28:92:4a:33:5e:c7', 'reverse': None, 'switch\_port\_state': 'up', 'type': 'private'}], 'last\_reboot': '2018-08-23T08:32:03.000Z', 'location': {'block': 'A', 'datacenter': 'DC3', 'position': 19, 'rack': 'A23', 'room': '4 4-4'}, 'network': {'ip': ['195.154.172.149'], 'ipfo': [], 'private': ['10.90.53.212']}, 'offer': 'Pro-1-S-SATA', 'os': {'name': 'FreeBSD', 'version': '11.1-RELEASE'}, 'power': 'ON', 'proactive\_monitoring': False, 'raid\_controllers': [{'$ref': '/api/v1/server/hardware/raidController/9910'}], 'support': 'Basic service level'}]} | ### Authors * Remy Leone (@sieben) ansible community.general.utm_aaa_group – Create, update or destroy an aaa group object in Sophos UTM. community.general.utm\_aaa\_group – Create, update or destroy an aaa group object in Sophos UTM. ================================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.utm_aaa_group`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Create, update or destroy an aaa group object in Sophos UTM. * This module needs to have the REST Ability of the UTM to be activated. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **adirectory\_groups** list / elements=string | | List of adirectory group strings. | | **adirectory\_groups\_sids** dictionary | | Dictionary of group sids. | | **backend\_match** string | **Choices:*** **none** ← * adirectory * edirectory * radius * tacacs * ldap | The backend for the group. | | **comment** string | **Default:**"" | Comment that describes the AAA group. | | **dynamic** string | **Choices:*** **none** ← * ipsec\_dn * directory\_groups | Group type. Is static if none is selected. | | **edirectory\_groups** list / elements=string | | List of edirectory group strings. | | **headers** dictionary | | A dictionary of additional headers to be sent to POST and PUT requests. Is needed for some modules | | **ipsec\_dn** string | | The ipsec dn string. | | **ldap\_attribute** string | | The ldap attribute to check against. | | **ldap\_attribute\_value** string | | The ldap attribute value to check against. | | **members** list / elements=string | **Default:**[] | A list of user ref names (aaa/user). | | **name** string / required | | The name of the object. Will be used to identify the entry. | | **network** string | **Default:**"" | The network reference name. The objects contains the known ip addresses for the authentication object (network/aaa). | | **radius\_groups** list / elements=string | **Default:**[] | A list of radius group strings. | | **state** string | **Choices:*** absent * **present** ← | The desired state of the object. `present` will create or update an object `absent` will delete an object if it was present | | **tacacs\_groups** list / elements=string | **Default:**[] | A list of tacacs group strings. | | **utm\_host** string / required | | The REST Endpoint of the Sophos UTM. | | **utm\_port** integer | **Default:**4444 | The port of the REST interface. | | **utm\_protocol** string | **Choices:*** http * **https** ← | The protocol of the REST Endpoint. | | **utm\_token** string / required | | The token used to identify at the REST-API. See <https://www.sophos.com/en-us/medialibrary/PDFs/documentation/UTMonAWS/Sophos-UTM-RESTful-API.pdf?la=en>, Chapter 2.4.2. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether the REST interface's ssl certificate should be verified or not. | Examples -------- ``` - name: Create UTM aaa_group community.general.utm_aaa_group: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestAAAGroupEntry backend_match: ldap dynamic: directory_groups ldap_attributes: memberof ldap_attributes_value: "cn=groupname,ou=Groups,dc=mydomain,dc=com" network: REF_OBJECT_STRING state: present - name: Remove UTM aaa_group community.general.utm_aaa_group: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestAAAGroupEntry state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **result** complex | success | The utm object that was created. | | | **\_locked** boolean | success | Whether or not the object is currently locked. | | | **\_ref** string | success | The reference name of the object. | | | **\_type** string | success | The type of the object. | | | **adirectory\_groups** string | success | List of Active Directory Groups. | | | **adirectory\_groups\_sids** list / elements=string | success | List of Active Directory Groups SIDS. | | | **backend\_match** string | success | The backend to use. | | | **comment** string | success | The comment string. | | | **dynamic** string | success | Whether the group match is ipsec\_dn or directory\_group. | | | **edirectory\_groups** string | success | List of eDirectory Groups. | | | **ipsec\_dn** string | success | ipsec\_dn identifier to match. | | | **ldap\_attribute** string | success | The LDAP Attribute to match against. | | | **ldap\_attribute\_value** string | success | The LDAP Attribute Value to match against. | | | **members** list / elements=string | success | List of member identifiers of the group. | | | **name** string | success | The name of the object. | | | **network** string | success | The identifier of the network (network/aaa). | | | **radius\_group** string | success | The radius group identifier. | | | **tacacs\_group** string | success | The tacacs group identifier. | ### Authors * Johannes Brunswicker (@MatrixCrawler) ansible community.general.apt_repo – Manage APT repositories via apt-repo community.general.apt\_repo – Manage APT repositories via apt-repo ================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.apt_repo`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manages APT repositories using apt-repo tool. * See <https://www.altlinux.org/Apt-repo> for details about apt-repo Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **remove\_others** boolean | **Choices:*** **no** ← * yes | Remove other then added repositories Used if *state=present* | | **repo** string / required | | Name of the repository to add or remove. | | **state** string | **Choices:*** absent * **present** ← | Indicates the desired repository state. | | **update** boolean | **Choices:*** **no** ← * yes | Update the package database after changing repositories. | Notes ----- Note * This module works on ALT based distros. * Does NOT support checkmode, due to a limitation in apt-repo tool. Examples -------- ``` - name: Remove all repositories community.general.apt_repo: repo: all state: absent - name: Add repository `Sisysphus` and remove other repositories community.general.apt_repo: repo: Sisysphus state: present remove_others: yes - name: Add local repository `/space/ALT/Sisyphus` and update package cache community.general.apt_repo: repo: copy:///space/ALT/Sisyphus state: present update: yes ``` ### Authors * Mikhail Gordeev (@obirvalger) ansible community.general.pritunl_user_info – List Pritunl Users using the Pritunl API community.general.pritunl\_user\_info – List Pritunl Users using the Pritunl API ================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pritunl_user_info`. New in version 2.3.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * A module to list Pritunl users using the Pritunl API. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **organization** string / required | | The name of the organization the user is part of. aliases: org | | **pritunl\_api\_secret** string / required | | API Secret found in Administrators > USERNAME > API Secret. | | **pritunl\_api\_token** string / required | | API Token of a Pritunl admin user. It needs to be enabled in Administrators > USERNAME > Enable Token Authentication. | | **pritunl\_url** string / required | | URL and port of the Pritunl server on which the API is enabled. | | **user\_name** string | | Name of the user to filter on Pritunl. | | **user\_type** string | **Choices:*** **client** ← * server | Type of the user *user\_name*. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If certificates should be validated or not. This should never be set to `false`, except if you are very sure that your connection to the server can not be subject to a Man In The Middle attack. | Examples -------- ``` - name: List all existing users part of the organization MyOrg community.general.pritunl_user_info: state: list organization: MyOrg - name: Search for the user named Florian part of the organization MyOrg community.general.pritunl_user_info: state: list organization: MyOrg user_name: Florian ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **users** list / elements=dictionary | success | List of Pritunl users. **Sample:** [{'audit': False, 'auth\_type': 'google', 'bypass\_secondary': False, 'client\_to\_client': False, 'disabled': False, 'dns\_mapping': None, 'dns\_servers': None, 'dns\_suffix': None, 'email': '[email protected]', 'gravatar': True, 'groups': ['foo', 'bar'], 'id': '5d070dafe63q3b2e6s472c3b', 'name': '[email protected]', 'network\_links': [], 'organization': '58070daee6sf342e6e4s2c36', 'organization\_name': 'Acme', 'otp\_auth': True, 'otp\_secret': '35H5EJA3XB2$4CWG', 'pin': False, 'port\_forwarding': [], 'servers': []}] | ### Authors * Florian Dambrine (@Lowess) ansible community.general.utm_network_interface_address – Create, update or destroy network/interface_address object community.general.utm\_network\_interface\_address – Create, update or destroy network/interface\_address object ================================================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.utm_network_interface_address`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Create, update or destroy a network/interface\_address object in SOPHOS UTM. * This module needs to have the REST Ability of the UTM to be activated. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **address** string / required | | The ip4 address of the network/interface\_address object. | | **address6** string | | The ip6 address of the network/interface\_address object. | | **comment** string | | An optional comment to add to the object | | **headers** dictionary | | A dictionary of additional headers to be sent to POST and PUT requests. Is needed for some modules | | **name** string / required | | The name of the object. Will be used to identify the entry | | **resolved** boolean | **Choices:*** no * yes | Whether or not the object is resolved | | **resolved6** boolean | **Choices:*** no * yes | Whether or not the object is resolved | | **state** string | **Choices:*** absent * **present** ← | The desired state of the object. `present` will create or update an object `absent` will delete an object if it was present | | **utm\_host** string / required | | The REST Endpoint of the Sophos UTM. | | **utm\_port** integer | **Default:**4444 | The port of the REST interface. | | **utm\_protocol** string | **Choices:*** http * **https** ← | The protocol of the REST Endpoint. | | **utm\_token** string / required | | The token used to identify at the REST-API. See <https://www.sophos.com/en-us/medialibrary/PDFs/documentation/UTMonAWS/Sophos-UTM-RESTful-API.pdf?la=en>, Chapter 2.4.2. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether the REST interface's ssl certificate should be verified or not. | Examples -------- ``` - name: Create a network interface address utm_proxy_backend: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestNetworkInterfaceAddress address: 0.0.0.0 state: present - name: Remove a network interface address network_interface_address: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestNetworkInterfaceAddress address: 0.0.0.0 state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **result** complex | success | The utm object that was created | | | **\_locked** boolean | success | Whether or not the object is currently locked | | | **\_ref** string | success | The reference name of the object | | | **\_type** string | success | The type of the object | | | **address** string | success | The ip4 address of the network/interface\_address object | | | **address6** string | success | The ip6 address of the network/interface\_address object | | | **comment** string | success | The comment string | | | **name** string | success | The name of the object | | | **resolved** boolean | success | Whether or not the object is resolved | | | **resolved6** boolean | success | Whether or not the object is resolved | ### Authors * Juergen Wiebe (@steamx)
programming_docs
ansible community.general.redis_data_info – Get value of key in Redis database community.general.redis\_data\_info – Get value of key in Redis database ======================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.redis_data_info`. New in version 3.7.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Get value of keys in Redis database. Requirements ------------ The below requirements are needed on the host that executes this module. * redis * certifi Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ca\_certs** string | | Path to root certificates file. If not set and *tls* is set to `true`, certifi ca-certificates will be used. | | **key** string / required | | Database key. | | **login\_host** string | **Default:**"localhost" | Specify the target host running the database. | | **login\_password** string | | Specify the password to authenticate with. Usually not used when target is localhost. | | **login\_port** integer | **Default:**6379 | Specify the port to connect to. | | **login\_user** string | | Specify the user to authenticate with. Requires [redis](https://pypi.org/project/redis) >= 3.4.0. | | **tls** boolean | **Choices:*** no * **yes** ← | Specify whether or not to use TLS for the connection. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Specify whether or not to validate TLS certificates. This should only be turned off for personally controlled sites or with `localhost` as target. | Notes ----- Note * Requires the `redis` Python package on the remote host. You can install it with pip (`pip install redis`) or with a package manager. Information on the library can be found at <https://github.com/andymccurdy/redis-py>. See Also -------- See also [community.general.redis\_info](redis_info_module#ansible-collections-community-general-redis-info-module) The official documentation on the **community.general.redis\_info** module. [community.general.redis](redis_module#ansible-collections-community-general-redis-module) The official documentation on the **community.general.redis** module. Examples -------- ``` - name: Get key foo=bar from loalhost with no username community.general.redis_data_info: login_host: localhost login_password: supersecret key: foo - name: Get key foo=bar on redishost with custom ca-cert file community.general.redis_data_info: login_host: redishost login_password: supersecret login_user: somuser validate_certs: true ssl_ca_certs: /path/to/ca/certs key: foo ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **exists** boolean | on success | If they key exists in the database. | | **msg** string | always | A short message. **Sample:** Got key: foo with value: bar | | **value** string | if existing | Value key was set to. **Sample:** value\_of\_some\_key | ### Authors * Andreas Botzner (@paginabianca) ansible community.general.ufw – Manage firewall with UFW community.general.ufw – Manage firewall with UFW ================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ufw`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage firewall with UFW. Requirements ------------ The below requirements are needed on the host that executes this module. * `ufw` package Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **comment** string | | Add a comment to the rule. Requires UFW version >=0.35. | | **default** string | **Choices:*** allow * deny * reject | Change the default policy for incoming or outgoing traffic. aliases: policy | | **delete** boolean | **Choices:*** **no** ← * yes | Delete rule. If *delete=true* and a value is provided for *insert*, then *insert* is ignored. | | **direction** string | **Choices:*** in * incoming * out * outgoing * routed | Select direction for a rule or default policy command. Mutually exclusive with *interface\_in* and *interface\_out*. | | **from\_ip** string | **Default:**"any" | Source IP address. aliases: from, src | | **from\_port** string | | Source port. | | **insert** integer | | Insert the corresponding rule as rule number NUM. Note that ufw numbers rules starting with 1. If *delete=true* and a value is provided for *insert*, then *insert* is ignored. | | **insert\_relative\_to** string | **Choices:*** first-ipv4 * first-ipv6 * last-ipv4 * last-ipv6 * **zero** ← | Allows to interpret the index in *insert* relative to a position. `zero` interprets the rule number as an absolute index (i.e. 1 is the first rule). `first-ipv4` interprets the rule number relative to the index of the first IPv4 rule, or relative to the position where the first IPv4 rule would be if there is currently none. `last-ipv4` interprets the rule number relative to the index of the last IPv4 rule, or relative to the position where the last IPv4 rule would be if there is currently none. `first-ipv6` interprets the rule number relative to the index of the first IPv6 rule, or relative to the position where the first IPv6 rule would be if there is currently none. `last-ipv6` interprets the rule number relative to the index of the last IPv6 rule, or relative to the position where the last IPv6 rule would be if there is currently none. | | **interface** string | | Specify interface for the rule. The direction (in or out) used for the interface depends on the value of *direction*. See *interface\_in* and *interface\_out* for routed rules that needs to supply both an input and output interface. Mutually exclusive with *interface\_in* and *interface\_out*. aliases: if | | **interface\_in** string added in 0.2.0 of community.general | | Specify input interface for the rule. This is mutually exclusive with *direction* and *interface*. However, it is compatible with *interface\_out* for routed rules. aliases: if\_in | | **interface\_out** string added in 0.2.0 of community.general | | Specify output interface for the rule. This is mutually exclusive with *direction* and *interface*. However, it is compatible with *interface\_in* for routed rules. aliases: if\_out | | **log** boolean | **Choices:*** **no** ← * yes | Log new connections matched to this rule | | **logging** string | **Choices:*** on * off * low * medium * high * full | Toggles logging. Logged packets use the LOG\_KERN syslog facility. | | **name** string | | Use profile located in `/etc/ufw/applications.d`. aliases: app | | **proto** string | **Choices:*** any * tcp * udp * ipv6 * esp * ah * gre * igmp | TCP/IP protocol. aliases: protocol | | **route** boolean | **Choices:*** **no** ← * yes | Apply the rule to routed/forwarded packets. | | **rule** string | **Choices:*** allow * deny * limit * reject | Add firewall rule | | **state** string | **Choices:*** disabled * enabled * reloaded * reset | `enabled` reloads firewall and enables firewall on boot. `disabled` unloads firewall and disables firewall on boot. `reloaded` reloads firewall. `reset` disables and resets firewall to installation defaults. | | **to\_ip** string | **Default:**"any" | Destination IP address. aliases: dest, to | | **to\_port** string | | Destination port. aliases: port | Notes ----- Note * See `man ufw` for more examples. Examples -------- ``` - name: Allow everything and enable UFW community.general.ufw: state: enabled policy: allow - name: Set logging community.general.ufw: logging: 'on' # Sometimes it is desirable to let the sender know when traffic is # being denied, rather than simply ignoring it. In these cases, use # reject instead of deny. In addition, log rejected connections: - community.general.ufw: rule: reject port: auth log: yes # ufw supports connection rate limiting, which is useful for protecting # against brute-force login attacks. ufw will deny connections if an IP # address has attempted to initiate 6 or more connections in the last # 30 seconds. See http://www.debian-administration.org/articles/187 # for details. Typical usage is: - community.general.ufw: rule: limit port: ssh proto: tcp # Allow OpenSSH. (Note that as ufw manages its own state, simply removing # a rule=allow task can leave those ports exposed. Either use delete=yes # or a separate state=reset task) - community.general.ufw: rule: allow name: OpenSSH - name: Delete OpenSSH rule community.general.ufw: rule: allow name: OpenSSH delete: yes - name: Deny all access to port 53 community.general.ufw: rule: deny port: '53' - name: Allow port range 60000-61000 community.general.ufw: rule: allow port: 60000:61000 proto: tcp - name: Allow all access to tcp port 80 community.general.ufw: rule: allow port: '80' proto: tcp - name: Allow all access from RFC1918 networks to this host community.general.ufw: rule: allow src: '{{ item }}' loop: - 10.0.0.0/8 - 172.16.0.0/12 - 192.168.0.0/16 - name: Deny access to udp port 514 from host 1.2.3.4 and include a comment community.general.ufw: rule: deny proto: udp src: 1.2.3.4 port: '514' comment: Block syslog - name: Allow incoming access to eth0 from 1.2.3.5 port 5469 to 1.2.3.4 port 5469 community.general.ufw: rule: allow interface: eth0 direction: in proto: udp src: 1.2.3.5 from_port: '5469' dest: 1.2.3.4 to_port: '5469' # Note that IPv6 must be enabled in /etc/default/ufw for IPv6 firewalling to work. - name: Deny all traffic from the IPv6 2001:db8::/32 to tcp port 25 on this host community.general.ufw: rule: deny proto: tcp src: 2001:db8::/32 port: '25' - name: Deny all IPv6 traffic to tcp port 20 on this host # this should be the first IPv6 rule community.general.ufw: rule: deny proto: tcp port: '20' to_ip: "::" insert: 0 insert_relative_to: first-ipv6 - name: Deny all IPv4 traffic to tcp port 20 on this host # This should be the third to last IPv4 rule # (insert: -1 addresses the second to last IPv4 rule; # so the new rule will be inserted before the second # to last IPv4 rule, and will be come the third to last # IPv4 rule.) community.general.ufw: rule: deny proto: tcp port: '20' to_ip: "::" insert: -1 insert_relative_to: last-ipv4 # Can be used to further restrict a global FORWARD policy set to allow - name: Deny forwarded/routed traffic from subnet 1.2.3.0/24 to subnet 4.5.6.0/24 community.general.ufw: rule: deny route: yes src: 1.2.3.0/24 dest: 4.5.6.0/24 ``` ### Authors * Aleksey Ovcharenko (@ovcharenko) * Jarno Keskikangas (@pyykkis) * Ahti Kitsik (@ahtik) ansible community.general.ipmi_power – Power management for machine community.general.ipmi\_power – Power management for machine ============================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ipmi_power`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Use this module for power management Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * pyghmi Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **name** string / required | | Hostname or ip address of the BMC. | | **password** string / required | | Password to connect to the BMC. | | **port** integer | **Default:**623 | Remote RMCP port. | | **state** string / required | **Choices:*** on * off * shutdown * reset * boot | Whether to ensure that the machine in desired state. The choices for state are: - on -- Request system turn on - off -- Request system turn off without waiting for OS to shutdown - shutdown -- Have system request OS proper shutdown - reset -- Request system reset without waiting for OS - boot -- If system is off, then 'on', else 'reset' | | **timeout** integer | **Default:**300 | Maximum number of seconds before interrupt request. | | **user** string / required | | Username to use to connect to the BMC. | Examples -------- ``` - name: Ensure machine is powered on community.general.ipmi_power: name: test.testdomain.com user: admin password: password state: on ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **powerstate** string | success | The current power state of the machine. **Sample:** True | ### Authors * Bulat Gaifullin (@bgaifullin) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#6403050d021108080d0a0602424757535f424751565f4247505c5f0309050d08424750525f070b09)> ansible community.general.newrelic_deployment – Notify newrelic about app deployments community.general.newrelic\_deployment – Notify newrelic about app deployments ============================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.newrelic_deployment`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Notify newrelic about app deployments (see <https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/deployment-notifications#api>) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **app\_name** string | | (one of app\_name or application\_id are required) The value of app\_name in the newrelic.yml file used by the application | | **application\_id** string | | (one of app\_name or application\_id are required) The application id, found in the URL when viewing the application in RPM | | **appname** string | | Name of the application | | **changelog** string | | A list of changes for this deployment | | **description** string | | Text annotation for the deployment - notes for you | | **environment** string | | The environment for this deployment | | **revision** string | | A revision number (e.g., git commit SHA) | | **token** string / required | | API token, to place in the x-api-key header. | | **user** string | | The name of the user/process that triggered this deployment | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Notify newrelic about an app deployment community.general.newrelic_deployment: token: AAAAAA app_name: myapp user: ansible deployment revision: '1.0' ``` ### Authors * Matt Coddington (@mcodd) ansible community.general.lastpass – fetch data from lastpass community.general.lastpass – fetch data from lastpass ===================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.lastpass`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * use the lpass command line utility to fetch specific fields from lastpass Requirements ------------ The below requirements are needed on the local controller node that executes this lookup. * lpass (command line utility) * must have already logged into lastpass Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **\_terms** string / required | | | key from which you want to retrieve the field | | **field** string | **Default:**"password" | | field to return from lastpass | Examples -------- ``` - name: get 'custom_field' from lastpass entry 'entry-name' ansible.builtin.debug: msg: "{{ lookup('community.general.lastpass', 'entry-name', field='custom_field') }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **\_raw** list / elements=string | success | secrets stored | ### Authors * Andrew Zenk (!UNKNOWN) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#e28398878c89c4c1d1d5d9c4c1d7d0d9c4c1d6dad9978f8cc4c1d6d4d9878697)> ansible community.general.online_user_info – Gather information about Online user. community.general.online\_user\_info – Gather information about Online user. ============================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.online_user_info`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Gather information about the user. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_timeout** integer | **Default:**30 | HTTP timeout to Online API in seconds. aliases: timeout | | **api\_token** string / required | | Online OAuth token. aliases: oauth\_token | | **api\_url** string | **Default:**"https://api.online.net" | Online API URL aliases: base\_url | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Validate SSL certs of the Online API. | Notes ----- Note * Also see the API documentation on <https://console.online.net/en/api/> * If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `ONLINE_TOKEN`, `ONLINE_API_KEY`, `ONLINE_OAUTH_TOKEN`, `ONLINE_API_TOKEN` * If one wants to use a different `api_url` one can also set the `ONLINE_API_URL` environment variable. Examples -------- ``` - name: Gather Online user info community.general.online_user_info: register: result - ansible.builtin.debug: msg: "{{ result.online_user_info }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **online\_user\_info** dictionary | success | Response from Online API. For more details please refer to: <https://console.online.net/en/api/>. **Sample:** {'online\_user\_info': {'company': 'foobar LLC', 'email': '[email protected]', 'first\_name': 'foo', 'id': 42, 'last\_name': 'bar', 'login': 'foobar'}} | ### Authors * Remy Leone (@sieben)
programming_docs
ansible community.general.diy – Customize the output community.general.diy – Customize the output ============================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.diy`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Callback plugin that allows you to supply your own custom callback templates to be output. Requirements ------------ The below requirements are needed on the local controller node that executes this callback. * set as stdout\_callback in configuration Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **check\_mode\_markers** boolean added in 2.9 of ansible.builtin | **Choices:*** **no** ← * yes | ini entries: [defaults]check\_mode\_markers = no env:ANSIBLE\_CHECK\_MODE\_MARKERS | Toggle to control displaying markers when running in check mode. The markers are `DRY RUN` at the beggining and ending of playbook execution (when calling `ansible-playbook --check`) and `CHECK MODE` as a suffix at every play and task that is run in check mode. | | **display\_failed\_stderr** boolean added in 2.7 of ansible.builtin | **Choices:*** **no** ← * yes | ini entries: [defaults]display\_failed\_stderr = no env:ANSIBLE\_DISPLAY\_FAILED\_STDERR | Toggle to control whether failed and unreachable tasks are displayed to STDERR (vs. STDOUT) | | **display\_ok\_hosts** boolean added in 2.7 of ansible.builtin | **Choices:*** no * **yes** ← | ini entries: [defaults]display\_ok\_hosts = yes env:ANSIBLE\_DISPLAY\_OK\_HOSTS | Toggle to control displaying 'ok' task/host results in a task | | **display\_skipped\_hosts** boolean | **Choices:*** no * **yes** ← | ini entries: [defaults]display\_skipped\_hosts = yes env:DISPLAY\_SKIPPED\_HOSTS Removed in: version 2.12 of ansible.builtin Why: environment variables without "ANSIBLE\_" prefix are deprecated Alternative: the "ANSIBLE\_DISPLAY\_SKIPPED\_HOSTS" environment variable env:ANSIBLE\_DISPLAY\_SKIPPED\_HOSTS | Toggle to control displaying skipped task/host results in a task | | **on\_any\_msg** string | | ini entries: [callback\_diy]on\_any\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_ON\_ANY\_MSG var: ansible\_callback\_diy\_on\_any\_msg | Output to be used for callback on\_any. | | **on\_any\_msg\_color** string | | ini entries: [callback\_diy]on\_any\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_ON\_ANY\_MSG\_COLOR var: ansible\_callback\_diy\_on\_any\_msg\_color | Output color to be used for *on\_any\_msg*. Template should render a [valid color value](#notes). | | **on\_file\_diff\_msg** string | | ini entries: [callback\_diy]on\_file\_diff\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_ON\_FILE\_DIFF\_MSG var: ansible\_callback\_diy\_on\_file\_diff\_msg | Output to be used for callback on\_file\_diff. | | **on\_file\_diff\_msg\_color** string | | ini entries: [callback\_diy]on\_file\_diff\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_ON\_FILE\_DIFF\_MSG\_COLOR var: ansible\_callback\_diy\_on\_file\_diff\_msg\_color | Output color to be used for *on\_file\_diff\_msg*. Template should render a [valid color value](#notes). | | **playbook\_on\_handler\_task\_start\_msg** string | | ini entries: [callback\_diy]playbook\_on\_handler\_task\_start\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_HANDLER\_TASK\_START\_MSG var: ansible\_callback\_diy\_playbook\_on\_handler\_task\_start\_msg | Output to be used for callback playbook\_on\_handler\_task\_start. | | **playbook\_on\_handler\_task\_start\_msg\_color** string | | ini entries: [callback\_diy]playbook\_on\_handler\_task\_start\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_HANDLER\_TASK\_START\_MSG\_COLOR var: ansible\_callback\_diy\_playbook\_on\_handler\_task\_start\_msg\_color | Output color to be used for *playbook\_on\_handler\_task\_start\_msg*. Template should render a [valid color value](#notes). | | **playbook\_on\_include\_msg** string | | ini entries: [callback\_diy]playbook\_on\_include\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_INCLUDE\_MSG var: ansible\_callback\_diy\_playbook\_on\_include\_msg | Output to be used for callback playbook\_on\_include. | | **playbook\_on\_include\_msg\_color** string | | ini entries: [callback\_diy]playbook\_on\_include\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_INCLUDE\_MSG\_COLOR var: ansible\_callback\_diy\_playbook\_on\_include\_msg\_color | Output color to be used for *playbook\_on\_include\_msg*. Template should render a [valid color value](#notes). | | **playbook\_on\_no\_hosts\_matched\_msg** string | | ini entries: [callback\_diy]playbook\_on\_no\_hosts\_matched\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_NO\_HOSTS\_MATCHED\_MSG var: ansible\_callback\_diy\_playbook\_on\_no\_hosts\_matched\_msg | Output to be used for callback playbook\_on\_no\_hosts\_matched. | | **playbook\_on\_no\_hosts\_matched\_msg\_color** string | | ini entries: [callback\_diy]playbook\_on\_no\_hosts\_matched\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_NO\_HOSTS\_MATCHED\_MSG\_COLOR var: ansible\_callback\_diy\_playbook\_on\_no\_hosts\_matched\_msg\_color | Output color to be used for *playbook\_on\_no\_hosts\_matched\_msg*. Template should render a [valid color value](#notes). | | **playbook\_on\_no\_hosts\_remaining\_msg** string | | ini entries: [callback\_diy]playbook\_on\_no\_hosts\_remaining\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_NO\_HOSTS\_REMAINING\_MSG var: ansible\_callback\_diy\_playbook\_on\_no\_hosts\_remaining\_msg | Output to be used for callback playbook\_on\_no\_hosts\_remaining. | | **playbook\_on\_no\_hosts\_remaining\_msg\_color** string | | ini entries: [callback\_diy]playbook\_on\_no\_hosts\_remaining\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_NO\_HOSTS\_REMAINING\_MSG\_COLOR var: ansible\_callback\_diy\_playbook\_on\_no\_hosts\_remaining\_msg\_color | Output color to be used for *playbook\_on\_no\_hosts\_remaining\_msg*. Template should render a [valid color value](#notes). | | **playbook\_on\_notify\_msg** string | | ini entries: [callback\_diy]playbook\_on\_notify\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_NOTIFY\_MSG var: ansible\_callback\_diy\_playbook\_on\_notify\_msg | Output to be used for callback playbook\_on\_notify. | | **playbook\_on\_notify\_msg\_color** string | | ini entries: [callback\_diy]playbook\_on\_notify\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_NOTIFY\_MSG\_COLOR var: ansible\_callback\_diy\_playbook\_on\_notify\_msg\_color | Output color to be used for *playbook\_on\_notify\_msg*. Template should render a [valid color value](#notes). | | **playbook\_on\_play\_start\_msg** string | | ini entries: [callback\_diy]playbook\_on\_play\_start\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_PLAY\_START\_MSG var: ansible\_callback\_diy\_playbook\_on\_play\_start\_msg | Output to be used for callback playbook\_on\_play\_start. | | **playbook\_on\_play\_start\_msg\_color** string | | ini entries: [callback\_diy]playbook\_on\_play\_start\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_PLAY\_START\_MSG\_COLOR var: ansible\_callback\_diy\_playbook\_on\_play\_start\_msg\_color | Output color to be used for *playbook\_on\_play\_start\_msg*. Template should render a [valid color value](#notes). | | **playbook\_on\_setup\_msg** string | | ini entries: [callback\_diy]playbook\_on\_setup\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_SETUP\_MSG var: ansible\_callback\_diy\_playbook\_on\_setup\_msg | Output to be used for callback playbook\_on\_setup. | | **playbook\_on\_setup\_msg\_color** string | | ini entries: [callback\_diy]playbook\_on\_setup\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_SETUP\_MSG\_COLOR var: ansible\_callback\_diy\_playbook\_on\_setup\_msg\_color | Output color to be used for *playbook\_on\_setup\_msg*. Template should render a [valid color value](#notes). | | **playbook\_on\_start\_msg** string | | ini entries: [callback\_diy]playbook\_on\_start\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_START\_MSG var: ansible\_callback\_diy\_playbook\_on\_start\_msg | Output to be used for callback playbook\_on\_start. | | **playbook\_on\_start\_msg\_color** string | | ini entries: [callback\_diy]playbook\_on\_start\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_START\_MSG\_COLOR var: ansible\_callback\_diy\_playbook\_on\_start\_msg\_color | Output color to be used for *playbook\_on\_start\_msg*. Template should render a [valid color value](#notes). | | **playbook\_on\_stats\_msg** string | | ini entries: [callback\_diy]playbook\_on\_stats\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_STATS\_MSG var: ansible\_callback\_diy\_playbook\_on\_stats\_msg | Output to be used for callback playbook\_on\_stats. | | **playbook\_on\_stats\_msg\_color** string | | ini entries: [callback\_diy]playbook\_on\_stats\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_STATS\_MSG\_COLOR var: ansible\_callback\_diy\_playbook\_on\_stats\_msg\_color | Output color to be used for *playbook\_on\_stats\_msg*. Template should render a [valid color value](#notes). | | **playbook\_on\_task\_start\_msg** string | | ini entries: [callback\_diy]playbook\_on\_task\_start\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_TASK\_START\_MSG var: ansible\_callback\_diy\_playbook\_on\_task\_start\_msg | Output to be used for callback playbook\_on\_task\_start. | | **playbook\_on\_task\_start\_msg\_color** string | | ini entries: [callback\_diy]playbook\_on\_task\_start\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_TASK\_START\_MSG\_COLOR var: ansible\_callback\_diy\_playbook\_on\_task\_start\_msg\_color | Output color to be used for *playbook\_on\_task\_start\_msg*. Template should render a [valid color value](#notes). | | **playbook\_on\_vars\_prompt\_msg** string | | ini entries: [callback\_diy]playbook\_on\_vars\_prompt\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_VARS\_PROMPT\_MSG var: ansible\_callback\_diy\_playbook\_on\_vars\_prompt\_msg | Output to be used for callback playbook\_on\_vars\_prompt. | | **playbook\_on\_vars\_prompt\_msg\_color** string | | ini entries: [callback\_diy]playbook\_on\_vars\_prompt\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_PLAYBOOK\_ON\_VARS\_PROMPT\_MSG\_COLOR var: ansible\_callback\_diy\_playbook\_on\_vars\_prompt\_msg\_color | Output color to be used for *playbook\_on\_vars\_prompt\_msg*. Template should render a [valid color value](#notes). | | **runner\_item\_on\_failed\_msg** string | | ini entries: [callback\_diy]runner\_item\_on\_failed\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ITEM\_ON\_FAILED\_MSG var: ansible\_callback\_diy\_runner\_item\_on\_failed\_msg | Output to be used for callback runner\_item\_on\_failed. | | **runner\_item\_on\_failed\_msg\_color** string | | ini entries: [callback\_diy]runner\_item\_on\_failed\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ITEM\_ON\_FAILED\_MSG\_COLOR var: ansible\_callback\_diy\_runner\_item\_on\_failed\_msg\_color | Output color to be used for *runner\_item\_on\_failed\_msg*. Template should render a [valid color value](#notes). | | **runner\_item\_on\_ok\_msg** string | | ini entries: [callback\_diy]runner\_item\_on\_ok\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ITEM\_ON\_OK\_MSG var: ansible\_callback\_diy\_runner\_item\_on\_ok\_msg | Output to be used for callback runner\_item\_on\_ok. | | **runner\_item\_on\_ok\_msg\_color** string | | ini entries: [callback\_diy]runner\_item\_on\_ok\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ITEM\_ON\_OK\_MSG\_COLOR var: ansible\_callback\_diy\_runner\_item\_on\_ok\_msg\_color | Output color to be used for *runner\_item\_on\_ok\_msg*. Template should render a [valid color value](#notes). | | **runner\_item\_on\_skipped\_msg** string | | ini entries: [callback\_diy]runner\_item\_on\_skipped\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ITEM\_ON\_SKIPPED\_MSG var: ansible\_callback\_diy\_runner\_item\_on\_skipped\_msg | Output to be used for callback runner\_item\_on\_skipped. | | **runner\_item\_on\_skipped\_msg\_color** string | | ini entries: [callback\_diy]runner\_item\_on\_skipped\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ITEM\_ON\_SKIPPED\_MSG\_COLOR var: ansible\_callback\_diy\_runner\_item\_on\_skipped\_msg\_color | Output color to be used for *runner\_item\_on\_skipped\_msg*. Template should render a [valid color value](#notes). | | **runner\_on\_failed\_msg** string | | ini entries: [callback\_diy]runner\_on\_failed\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ON\_FAILED\_MSG var: ansible\_callback\_diy\_runner\_on\_failed\_msg | Output to be used for callback runner\_on\_failed. | | **runner\_on\_failed\_msg\_color** string | | ini entries: [callback\_diy]runner\_on\_failed\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ON\_FAILED\_MSG\_COLOR var: ansible\_callback\_diy\_runner\_on\_failed\_msg\_color | Output color to be used for *runner\_on\_failed\_msg*. Template should render a [valid color value](#notes). | | **runner\_on\_no\_hosts\_msg** string | | ini entries: [callback\_diy]runner\_on\_no\_hosts\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ON\_NO\_HOSTS\_MSG var: ansible\_callback\_diy\_runner\_on\_no\_hosts\_msg | Output to be used for callback runner\_on\_no\_hosts. | | **runner\_on\_no\_hosts\_msg\_color** string | | ini entries: [callback\_diy]runner\_on\_no\_hosts\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ON\_NO\_HOSTS\_MSG\_COLOR var: ansible\_callback\_diy\_runner\_on\_no\_hosts\_msg\_color | Output color to be used for *runner\_on\_no\_hosts\_msg*. Template should render a [valid color value](#notes). | | **runner\_on\_ok\_msg** string | | ini entries: [callback\_diy]runner\_on\_ok\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ON\_OK\_MSG var: ansible\_callback\_diy\_runner\_on\_ok\_msg | Output to be used for callback runner\_on\_ok. | | **runner\_on\_ok\_msg\_color** string | | ini entries: [callback\_diy]runner\_on\_ok\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ON\_OK\_MSG\_COLOR var: ansible\_callback\_diy\_runner\_on\_ok\_msg\_color | Output color to be used for *runner\_on\_ok\_msg*. Template should render a [valid color value](#notes). | | **runner\_on\_skipped\_msg** string | | ini entries: [callback\_diy]runner\_on\_skipped\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ON\_SKIPPED\_MSG var: ansible\_callback\_diy\_runner\_on\_skipped\_msg | Output to be used for callback runner\_on\_skipped. | | **runner\_on\_skipped\_msg\_color** string | | ini entries: [callback\_diy]runner\_on\_skipped\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ON\_SKIPPED\_MSG\_COLOR var: ansible\_callback\_diy\_runner\_on\_skipped\_msg\_color | Output color to be used for *runner\_on\_skipped\_msg*. Template should render a [valid color value](#notes). | | **runner\_on\_start\_msg** string | | ini entries: [callback\_diy]runner\_on\_start\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ON\_START\_MSG var: ansible\_callback\_diy\_runner\_on\_start\_msg | Output to be used for callback runner\_on\_start. | | **runner\_on\_start\_msg\_color** string | | ini entries: [callback\_diy]runner\_on\_start\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ON\_START\_MSG\_COLOR var: ansible\_callback\_diy\_runner\_on\_start\_msg\_color | Output color to be used for *runner\_on\_start\_msg*. Template should render a [valid color value](#notes). | | **runner\_on\_unreachable\_msg** string | | ini entries: [callback\_diy]runner\_on\_unreachable\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ON\_UNREACHABLE\_MSG var: ansible\_callback\_diy\_runner\_on\_unreachable\_msg | Output to be used for callback runner\_on\_unreachable. | | **runner\_on\_unreachable\_msg\_color** string | | ini entries: [callback\_diy]runner\_on\_unreachable\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_ON\_UNREACHABLE\_MSG\_COLOR var: ansible\_callback\_diy\_runner\_on\_unreachable\_msg\_color | Output color to be used for *runner\_on\_unreachable\_msg*. Template should render a [valid color value](#notes). | | **runner\_retry\_msg** string | | ini entries: [callback\_diy]runner\_retry\_msg = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_RETRY\_MSG var: ansible\_callback\_diy\_runner\_retry\_msg | Output to be used for callback runner\_retry. | | **runner\_retry\_msg\_color** string | | ini entries: [callback\_diy]runner\_retry\_msg\_color = None env:ANSIBLE\_CALLBACK\_DIY\_RUNNER\_RETRY\_MSG\_COLOR var: ansible\_callback\_diy\_runner\_retry\_msg\_color | Output color to be used for *runner\_retry\_msg*. Template should render a [valid color value](#notes). | | **show\_custom\_stats** boolean | **Choices:*** **no** ← * yes | ini entries: [defaults]show\_custom\_stats = no env:ANSIBLE\_SHOW\_CUSTOM\_STATS | This adds the custom stats set via the set\_stats plugin to the play recap | | **show\_per\_host\_start** boolean added in 2.9 of ansible.builtin | **Choices:*** **no** ← * yes | ini entries: [defaults]show\_per\_host\_start = no env:ANSIBLE\_SHOW\_PER\_HOST\_START | This adds output that shows when a task is started to execute for each host | | **show\_task\_path\_on\_failure** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** ← * yes | ini entries: [defaults]show\_task\_path\_on\_failure = no env:ANSIBLE\_SHOW\_TASK\_PATH\_ON\_FAILURE | When a task fails, display the path to the file containing the failed task and the line number. This information is displayed automatically for every task when running with `-vv` or greater verbosity. | Notes ----- Note * Uses the `default` callback plugin output when a custom callback message(`msg`) is not provided. * Makes the callback event data available via the `ansible_callback_diy` dictionary, which can be used in the templating context for the options. The dictionary is only available in the templating context for the options. It is not a variable that is available via the other various execution contexts, such as playbook, play, task etc. * Options being set by their respective variable input can only be set using the variable if the variable was set in a context that is available to the respective callback. Use the `ansible_callback_diy` dictionary to see what is available to a callback. Additionally, `ansible_callback_diy.top_level_var_names` will output the top level variable names available to the callback. * Each option value is rendered as a template before being evaluated. This allows for the dynamic usage of an option. For example, `"{{ 'yellow' if ansible_callback_diy.result.is_changed else 'bright green' }}"` * **Condition** for all `msg` options: if value `is None or omit`, then the option is not being used. **Effect**: use of the `default` callback plugin for output * **Condition** for all `msg` options: if value `is not None and not omit and length is not greater than 0`, then the option is being used without output. **Effect**: suppress output * **Condition** for all `msg` options: if value `is not None and not omit and length is greater than 0`, then the option is being used with output. **Effect**: render value as template and output * Valid color values: `black`, `bright gray`, `blue`, `white`, `green`, `bright blue`, `cyan`, `bright green`, `red`, `bright cyan`, `purple`, `bright red`, `yellow`, `bright purple`, `dark gray`, `bright yellow`, `magenta`, `bright magenta`, `normal` See Also -------- See also [default – default Ansible screen output](../../../plugins/callback/default) The official documentation on the **default** callback plugin. Examples -------- ``` ansible.cfg: > # Enable plugin [defaults] stdout_callback=community.general.diy [callback_diy] # Output when playbook starts playbook_on_start_msg="DIY output(via ansible.cfg): playbook example: {{ ansible_callback_diy.playbook.file_name }}" playbook_on_start_msg_color=yellow # Comment out to allow default plugin output # playbook_on_play_start_msg="PLAY: starting play {{ ansible_callback_diy.play.name }}" # Accept on_skipped_msg or ansible_callback_diy_runner_on_skipped_msg as input vars # If neither are supplied, omit the option runner_on_skipped_msg="{{ on_skipped_msg | default(ansible_callback_diy_runner_on_skipped_msg) | default(omit) }}" # Newline after every callback # on_any_msg='{{ " " | join("\n") }}' playbook.yml: > --- - name: "Default plugin output: play example" hosts: localhost gather_facts: no tasks: - name: Default plugin output ansible.builtin.debug: msg: default plugin output - name: Override from play vars hosts: localhost gather_facts: no vars: ansible_connection: local green: "\e[0m\e[38;5;82m" yellow: "\e[0m\e[38;5;11m" bright_purple: "\e[0m\e[38;5;105m" cyan: "\e[0m\e[38;5;51m" green_bg_black_fg: "\e[0m\e[48;5;40m\e[38;5;232m" yellow_bg_black_fg: "\e[0m\e[48;5;226m\e[38;5;232m" purple_bg_white_fg: "\e[0m\e[48;5;57m\e[38;5;255m" cyan_bg_black_fg: "\e[0m\e[48;5;87m\e[38;5;232m" magenta: "\e[38;5;198m" white: "\e[0m\e[38;5;255m" ansible_callback_diy_playbook_on_play_start_msg: "\n{{green}}DIY output(via play vars): play example: {{magenta}}{{ansible_callback_diy.play.name}}\n\n" ansible_callback_diy_playbook_on_task_start_msg: "DIY output(via play vars): task example: {{ ansible_callback_diy.task.name }}" ansible_callback_diy_playbook_on_task_start_msg_color: cyan ansible_callback_diy_playbook_on_stats_msg: |+2 CUSTOM STATS ============================== {% for key in ansible_callback_diy.stats | sort %} {% if ansible_callback_diy.stats[key] %} {% if key == 'ok' %} {% set color_one = lookup('vars','green_bg_black_fg') %} {% set prefix = ' ' %} {% set suffix = ' ' %} {% set color_two = lookup('vars','green') %} {% elif key == 'changed' %} {% set color_one = lookup('vars','yellow_bg_black_fg') %} {% set prefix = ' ' %} {% set suffix = ' ' %} {% set color_two = lookup('vars','yellow') %} {% elif key == 'processed' %} {% set color_one = lookup('vars','purple_bg_white_fg') %} {% set prefix = ' ' %} {% set suffix = ' ' %} {% set color_two = lookup('vars','bright_purple') %} {% elif key == 'skipped' %} {% set color_one = lookup('vars','cyan_bg_black_fg') %} {% set prefix = ' ' %} {% set suffix = ' ' %} {% set color_two = lookup('vars','cyan') %} {% else %} {% set color_one = "" %} {% set prefix = "" %} {% set suffix = "" %} {% set color_two = "" %} {% endif %} {{ color_one }}{{ "%s%s%s" | format(prefix,key,suffix) }}{{ color_two }}: {{ ansible_callback_diy.stats[key] | to_nice_yaml }} {% endif %} {% endfor %} tasks: - name: Custom banner with default plugin result output ansible.builtin.debug: msg: "default plugin output: result example" - name: Override from task vars ansible.builtin.debug: msg: "example {{ two }}" changed_when: true vars: white_fg_red_bg: "\e[0m\e[48;5;1m" two: "{{ white_fg_red_bg }} 2 " ansible_callback_diy_playbook_on_task_start_msg: "\nDIY output(via task vars): task example: {{ ansible_callback_diy.task.name }}" ansible_callback_diy_playbook_on_task_start_msg_color: bright magenta ansible_callback_diy_runner_on_ok_msg: "DIY output(via task vars): result example: \n{{ ansible_callback_diy.result.output.msg }}\n" ansible_callback_diy_runner_on_ok_msg_color: "{{ 'yellow' if ansible_callback_diy.result.is_changed else 'bright green' }}" - name: Suppress output ansible.builtin.debug: msg: i should not be displayed vars: ansible_callback_diy_playbook_on_task_start_msg: "" ansible_callback_diy_runner_on_ok_msg: "" - name: Using alias vars (see ansible.cfg) ansible.builtin.debug: msg: when: False vars: ansible_callback_diy_playbook_on_task_start_msg: "" on_skipped_msg: "DIY output(via task vars): skipped example:\n\e[0m\e[38;5;4m\u25b6\u25b6 {{ ansible_callback_diy.result.task.name }}\n" on_skipped_msg_color: white - name: Just stdout ansible.builtin.command: echo some stdout vars: ansible_callback_diy_playbook_on_task_start_msg: "\n" ansible_callback_diy_runner_on_ok_msg: "{{ ansible_callback_diy.result.output.stdout }}\n" - name: Multiline output ansible.builtin.debug: msg: "{{ multiline }}" vars: ansible_callback_diy_playbook_on_task_start_msg: "\nDIY output(via task vars): task example: {{ ansible_callback_diy.task.name }}" multiline: "line\nline\nline" ansible_callback_diy_runner_on_ok_msg: |+2 some {{ ansible_callback_diy.result.output.msg }} output ansible_callback_diy_playbook_on_task_start_msg_color: bright blue - name: Indentation ansible.builtin.debug: msg: "{{ item.msg }}" with_items: - { indent: 1, msg: one., color: red } - { indent: 2, msg: two.., color: yellow } - { indent: 3, msg: three..., color: bright yellow } vars: ansible_callback_diy_runner_item_on_ok_msg: "{{ ansible_callback_diy.result.output.msg | indent(item.indent, True) }}" ansible_callback_diy_runner_item_on_ok_msg_color: "{{ item.color }}" ansible_callback_diy_runner_on_ok_msg: "GO!!!" ansible_callback_diy_runner_on_ok_msg_color: bright green - name: Using lookup and template as file ansible.builtin.shell: "echo {% raw %}'output from {{ file_name }}'{% endraw %} > {{ file_name }}" vars: ansible_callback_diy_playbook_on_task_start_msg: "\nDIY output(via task vars): task example: {{ ansible_callback_diy.task.name }}" file_name: diy_file_template_example ansible_callback_diy_runner_on_ok_msg: "{{ lookup('template', file_name) }}" - name: 'Look at top level vars available to the "runner_on_ok" callback' ansible.builtin.debug: msg: '' vars: ansible_callback_diy_playbook_on_task_start_msg: "\nDIY output(via task vars): task example: {{ ansible_callback_diy.task.name }}" ansible_callback_diy_runner_on_ok_msg: |+2 {% for var in (ansible_callback_diy.top_level_var_names|reject('match','vars|ansible_callback_diy.*')) | sort %} {{ green }}{{ var }}: {{ white }}{{ lookup('vars', var) }} {% endfor %} ansible_callback_diy_runner_on_ok_msg_color: white - name: 'Look at event data available to the "runner_on_ok" callback' ansible.builtin.debug: msg: '' vars: ansible_callback_diy_playbook_on_task_start_msg: "\nDIY output(via task vars): task example: {{ ansible_callback_diy.task.name }}" ansible_callback_diy_runner_on_ok_msg: |+2 {% for key in ansible_callback_diy | sort %} {{ green }}{{ key }}: {{ white }}{{ ansible_callback_diy[key] }} {% endfor %} ``` ### Authors * Trevor Highfill (@theque5t)
programming_docs
ansible community.general.puppet – Runs puppet community.general.puppet – Runs puppet ====================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.puppet`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Runs *puppet* agent or apply in a reliable manner. Requirements ------------ The below requirements are needed on the host that executes this module. * puppet Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **certname** string | | The name to use when handling certificates. | | **debug** boolean | **Choices:*** **no** ← * yes | Enable full debugging. | | **environment** string | | Puppet environment to be used. | | **execute** string | | Execute a specific piece of Puppet code. It has no effect with a puppetmaster. | | **facter\_basename** string | **Default:**"ansible" | Basename of the facter output file. | | **facts** dictionary | | A dict of values to pass in as persistent external facter facts. | | **logdest** string | **Choices:*** all * **stdout** ← * syslog | Where the puppet logs should go, if puppet apply is being used. `all` will go to both `console` and `syslog`. `stdout` will be deprecated and replaced by `console`. | | **manifest** string | | Path to the manifest file to run puppet apply on. | | **modulepath** string | | Path to an alternate location for puppet modules. | | **noop** boolean | **Choices:*** no * yes | Override puppet.conf noop mode. When `yes`, run Puppet agent with `--noop` switch set. When `no`, run Puppet agent with `--no-noop` switch set. When unset (default), use default or puppet.conf value if defined. | | **puppetmaster** string | | The hostname of the puppetmaster to contact. | | **summarize** boolean | **Choices:*** **no** ← * yes | Whether to print a transaction summary. | | **tags** list / elements=string | | A list of puppet tags to be used. | | **timeout** string | **Default:**"30m" | How long to wait for *puppet* to finish. | | **use\_srv\_records** boolean | **Choices:*** no * yes | Toggles use\_srv\_records flag | | **verbose** boolean | **Choices:*** **no** ← * yes | Print extra information. | Examples -------- ``` - name: Run puppet agent and fail if anything goes wrong community.general.puppet: - name: Run puppet and timeout in 5 minutes community.general.puppet: timeout: 5m - name: Run puppet using a different environment community.general.puppet: environment: testing - name: Run puppet using a specific certname community.general.puppet: certname: agent01.example.com - name: Run puppet using a specific piece of Puppet code. Has no effect with a puppetmaster community.general.puppet: execute: include ::mymodule - name: Run puppet using a specific tags community.general.puppet: tags: - update - nginx - name: Run puppet agent in noop mode community.general.puppet: noop: yes - name: Run a manifest with debug, log to both syslog and console, specify module path community.general.puppet: modulepath: /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules logdest: all manifest: /var/lib/example/puppet_step_config.pp ``` ### Authors * Monty Taylor (@emonty) ansible community.general.influxdb_query – Query data points from InfluxDB community.general.influxdb\_query – Query data points from InfluxDB =================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.influxdb_query`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Query data points from InfluxDB. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * influxdb >= 0.9 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **database\_name** string / required | | Name of the database. | | **hostname** string | **Default:**"localhost" | The hostname or IP address on which InfluxDB server is listening. Since Ansible 2.5, defaulted to localhost. | | **password** string | **Default:**"root" | Password that will be used to authenticate against InfluxDB server. Alias `login_password` added in Ansible 2.5. aliases: login\_password | | **path** string added in 0.2.0 of community.general | | The path on which InfluxDB server is accessible Only available when using python-influxdb >= 5.1.0 | | **port** integer | **Default:**8086 | The port on which InfluxDB server is listening | | **proxies** dictionary | | HTTP(S) proxy to use for Requests to connect to InfluxDB server. | | **query** string / required | | Query to be executed. | | **retries** integer | **Default:**3 | Number of retries client will try before aborting. `0` indicates try until success. Only available when using python-influxdb >= 4.1.0 | | **ssl** boolean | **Choices:*** **no** ← * yes | Use https instead of http to connect to InfluxDB server. | | **timeout** integer | | Number of seconds Requests will wait for client to establish a connection. | | **udp\_port** integer | **Default:**4444 | UDP port to connect to InfluxDB server. | | **use\_udp** boolean | **Choices:*** **no** ← * yes | Use UDP to connect to InfluxDB server. | | **username** string | **Default:**"root" | Username that will be used to authenticate against InfluxDB server. Alias `login_username` added in Ansible 2.5. aliases: login\_username | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Query connections community.general.influxdb_query: hostname: "{{ influxdb_ip_address }}" database_name: "{{ influxdb_database_name }}" query: "select mean(value) from connections" register: connection - name: Query connections with tags filters community.general.influxdb_query: hostname: "{{ influxdb_ip_address }}" database_name: "{{ influxdb_database_name }}" query: "select mean(value) from connections where region='zue01' and host='server01'" register: connection - name: Print results from the query ansible.builtin.debug: var: connection.query_results ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **query\_results** list / elements=string | success | Result from the query **Sample:** [{'mean': 1245.5333333333333, 'time': '1970-01-01T00:00:00Z'}] | ### Authors * René Moser (@resmo) ansible community.general.nios_txt_record – Configure Infoblox NIOS txt records community.general.nios\_txt\_record – Configure Infoblox NIOS txt records ========================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nios_txt_record`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Status](#status) DEPRECATED ---------- Removed in version 5.0.0 Why Please install the infoblox.nios\_modules collection and use the corresponding module from it. Alternative infoblox.nios\_modules.nios\_txt\_record Synopsis -------- * Adds and/or removes instances of txt record objects from Infoblox NIOS servers. This module manages NIOS `record:txt` objects using the Infoblox WAPI interface over REST. Requirements ------------ The below requirements are needed on the host that executes this module. * infoblox\_client Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **comment** string | | Configures a text string comment to be associated with the instance of this object. The provided text string will be configured on the object instance. | | **extattrs** dictionary | | Allows for the configuration of Extensible Attributes on the instance of the object. This argument accepts a set of key / value pairs for configuration. | | **name** string / required | | Specifies the fully qualified hostname to add or remove from the system | | **provider** dictionary | | A dict object containing connection details. | | | **host** string | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. | | | **http\_pool\_connections** integer | **Default:**10 | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_pool\_maxsize** integer | **Default:**10 | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_request\_timeout** integer | **Default:**10 | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. | | | **max\_results** integer | **Default:**1000 | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. | | | **max\_retries** integer | **Default:**3 | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. | | | **password** string | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. | | | **silent\_ssl\_warnings** boolean | **Choices:*** no * **yes** ← | Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **username** string | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. | | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable. aliases: ssl\_verify | | | **wapi\_version** string | **Default:**"2.1" | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 | | **state** string | **Choices:*** **present** ← * absent | Configures the intended state of the instance of the object on the NIOS server. When this value is set to `present`, the object is configured on the device and when this value is set to `absent` the value is removed (if necessary) from the device. | | **text** string | | Text associated with the record. It can contain up to 255 bytes per substring, up to a total of 512 bytes. To enter leading, trailing, or embedded spaces in the text, add quotes around the text to preserve the spaces. | | **ttl** integer | | Configures the TTL to be associated with this tst record | | **view** string | **Default:**"default" | Sets the DNS view to associate this tst record with. The DNS view must already be configured on the system aliases: dns\_view | Notes ----- Note * This module must be run locally, which can be achieved by specifying `connection: local`. * Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible. Examples -------- ``` - name: Ensure a text Record Exists community.general.nios_txt_record: name: fqdn.txt.record.com text: mytext state: present view: External provider: host: "{{ inventory_hostname_short }}" username: admin password: admin - name: Ensure a text Record does not exist community.general.nios_txt_record: name: fqdn.txt.record.com text: mytext state: absent view: External provider: host: "{{ inventory_hostname_short }}" username: admin password: admin ``` Status ------ * This module will be removed in version 5.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Corey Wanless (@coreywan) ansible community.general.aix_inittab – Manages the inittab on AIX community.general.aix\_inittab – Manages the inittab on AIX =========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.aix_inittab`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages the inittab on AIX. Requirements ------------ The below requirements are needed on the host that executes this module. * itertools Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **action** string | **Choices:*** boot * bootwait * hold * initdefault * off * once * ondemand * powerfail * powerwait * respawn * sysinit * wait | Action what the init has to do with this entry. | | **command** string / required | | What command has to run. | | **insertafter** string | | After which inittabline should the new entry inserted. | | **name** string / required | | Name of the inittab entry. aliases: service | | **runlevel** string / required | | Runlevel of the entry. | | **state** string | **Choices:*** absent * **present** ← | Whether the entry should be present or absent in the inittab file. | Notes ----- Note * The changes are persistent across reboots. * You need root rights to read or adjust the inittab with the `lsitab`, `chitab`, `mkitab` or `rmitab` commands. * Tested on AIX 7.1. Examples -------- ``` # Add service startmyservice to the inittab, directly after service existingservice. - name: Add startmyservice to inittab community.general.aix_inittab: name: startmyservice runlevel: 4 action: once command: echo hello insertafter: existingservice state: present become: yes # Change inittab entry startmyservice to runlevel "2" and processaction "wait". - name: Change startmyservice to inittab community.general.aix_inittab: name: startmyservice runlevel: 2 action: wait command: echo hello state: present become: yes - name: Remove startmyservice from inittab community.general.aix_inittab: name: startmyservice runlevel: 2 action: wait command: echo hello state: absent become: yes ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **changed** boolean | always | Whether the inittab changed or not **Sample:** True | | **msg** string | changed | Action done with the inittab entry **Sample:** changed inittab entry startmyservice | | **name** string | always | Name of the adjusted inittab entry **Sample:** startmyservice | ### Authors * Joris Weijters (@molekuul) ansible community.general.redfish_info – Manages Out-Of-Band controllers using Redfish APIs community.general.redfish\_info – Manages Out-Of-Band controllers using Redfish APIs ==================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.redfish_info`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Builds Redfish URIs locally and sends them to remote OOB controllers to get information back. * Information retrieved is placed in a location specified by the user. * This module was called `redfish_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [community.general.redfish\_info](#ansible-collections-community-general-redfish-info-module) module no longer returns `ansible_facts`! Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auth\_token** string added in 2.3.0 of community.general | | Security token for authentication with OOB controller | | **baseuri** string / required | | Base URI of OOB controller | | **category** list / elements=string | **Default:**["Systems"] | List of categories to execute on OOB controller | | **command** list / elements=string | | List of commands to execute on OOB controller | | **password** string | | Password for authentication with OOB controller | | **timeout** integer | **Default:**10 | Timeout in seconds for URL requests to OOB controller | | **username** string | | User for authentication with OOB controller | Examples -------- ``` - name: Get CPU inventory community.general.redfish_info: category: Systems command: GetCpuInventory baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" register: result - name: Print fetched information ansible.builtin.debug: msg: "{{ result.redfish_facts.cpu.entries | to_nice_json }}" - name: Get CPU model community.general.redfish_info: category: Systems command: GetCpuInventory baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" register: result - name: Print fetched information ansible.builtin.debug: msg: "{{ result.redfish_facts.cpu.entries.0.Model }}" - name: Get memory inventory community.general.redfish_info: category: Systems command: GetMemoryInventory baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" register: result - name: Get fan inventory with a timeout of 20 seconds community.general.redfish_info: category: Chassis command: GetFanInventory baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" timeout: 20 register: result - name: Get Virtual Media information community.general.redfish_info: category: Manager command: GetVirtualMedia baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" register: result - name: Print fetched information ansible.builtin.debug: msg: "{{ result.redfish_facts.virtual_media.entries | to_nice_json }}" - name: Get Volume Inventory community.general.redfish_info: category: Systems command: GetVolumeInventory baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" register: result - name: Print fetched information ansible.builtin.debug: msg: "{{ result.redfish_facts.volume.entries | to_nice_json }}" - name: Get Session information community.general.redfish_info: category: Sessions command: GetSessions baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" register: result - name: Print fetched information ansible.builtin.debug: msg: "{{ result.redfish_facts.session.entries | to_nice_json }}" - name: Get default inventory information community.general.redfish_info: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" register: result - name: Print fetched information ansible.builtin.debug: msg: "{{ result.redfish_facts | to_nice_json }}" - name: Get several inventories community.general.redfish_info: category: Systems command: GetNicInventory,GetBiosAttributes baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Get default system inventory and user information community.general.redfish_info: category: Systems,Accounts baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Get default system, user and firmware information community.general.redfish_info: category: ["Systems", "Accounts", "Update"] baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Get Manager NIC inventory information community.general.redfish_info: category: Manager command: GetManagerNicInventory baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Get boot override information community.general.redfish_info: category: Systems command: GetBootOverride baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Get chassis inventory community.general.redfish_info: category: Chassis command: GetChassisInventory baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Get all information available in the Manager category community.general.redfish_info: category: Manager command: all baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Get firmware update capability information community.general.redfish_info: category: Update command: GetFirmwareUpdateCapabilities baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Get firmware inventory community.general.redfish_info: category: Update command: GetFirmwareInventory baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Get software inventory community.general.redfish_info: category: Update command: GetSoftwareInventory baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Get Manager Services community.general.redfish_info: category: Manager command: GetNetworkProtocols baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Get all information available in all categories community.general.redfish_info: category: all command: all baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Get system health report community.general.redfish_info: category: Systems command: GetHealthReport baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Get chassis health report community.general.redfish_info: category: Chassis command: GetHealthReport baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Get manager health report community.general.redfish_info: category: Manager command: GetHealthReport baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **result** dictionary | always | different results depending on task **Sample:** List of CPUs on system | ### Authors * Jose Delarosa (@jose-delarosa)
programming_docs
ansible community.general.redis – fetch data from Redis community.general.redis – fetch data from Redis =============================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.redis`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This lookup returns a list of results from a Redis DB corresponding to a list of items given to it Requirements ------------ The below requirements are needed on the local controller node that executes this lookup. * redis (python library <https://github.com/andymccurdy/redis-py/>) Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **\_terms** string | | | list of keys to query | | **host** string | **Default:**"127.0.0.1" | ini entries: [lookup\_redis]host = 127.0.0.1 env:ANSIBLE\_REDIS\_HOST | location of Redis host | | **port** integer | **Default:**6379 | ini entries: [lookup\_redis]port = 6379 env:ANSIBLE\_REDIS\_PORT | port on which Redis is listening on | | **socket** path | | ini entries: [lookup\_redis]socket = None env:ANSIBLE\_REDIS\_SOCKET | path to socket on which to query Redis, this option overrides host and port options when set. | Examples -------- ``` - name: query redis for somekey (default or configured settings used) ansible.builtin.debug: msg: "{{ lookup('community.general.redis', 'somekey') }}" - name: query redis for list of keys and non-default host and port ansible.builtin.debug: msg: "{{ lookup('community.general.redis', item, host='myredis.internal.com', port=2121) }}" loop: '{{list_of_redis_keys}}' - name: use list directly ansible.builtin.debug: msg: "{{ lookup('community.general.redis', 'key1', 'key2', 'key3') }}" - name: use list directly with a socket ansible.builtin.debug: msg: "{{ lookup('community.general.redis', 'key1', 'key2', socket='/var/tmp/redis.sock') }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **\_raw** list / elements=string | success | value(s) stored in Redis | ### Authors * Jan-Piet Mens (@jpmens) <jpmens(at)gmail.com> * Ansible Core Team ansible community.general.sensu_check – Manage Sensu checks community.general.sensu\_check – Manage Sensu checks ==================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.sensu_check`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manage the checks that should be run on a machine by *Sensu*. * Most options do not have a default and will not be added to the check definition unless specified. * All defaults except *path*, *state*, *backup* and *metric* are not managed by this module, * they are simply specified for your convenience. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **aggregate** boolean | **Choices:*** no * yes | Classifies the check as an aggregate check, making it available via the aggregate API Default is `false`. | | **backup** boolean | **Choices:*** **no** ← * yes | Create a backup file (if yes), including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. | | **command** string | | Path to the sensu check to run (not required when *state=absent*) | | **custom** dictionary | **Default:**{} | A hash/dictionary of custom parameters for mixing to the configuration. You can't rewrite others module parameters using this | | **dependencies** list / elements=string | **Default:**[] | Other checks this check depends on, if dependencies fail handling of this check will be disabled | | **handle** boolean | **Choices:*** no * yes | Whether the check should be handled or not Default is `false`. | | **handlers** list / elements=string | **Default:**[] | List of handlers to notify when the check fails | | **high\_flap\_threshold** integer | | The high threshold for flap detection | | **interval** integer | | Check interval in seconds | | **low\_flap\_threshold** integer | | The low threshold for flap detection | | **metric** boolean | **Choices:*** **no** ← * yes | Whether the check is a metric | | **name** string / required | | The name of the check This is the key that is used to determine whether a check exists | | **occurrences** integer | | Number of event occurrences before the handler should take action If not specified, defaults to 1. | | **path** string | **Default:**"/etc/sensu/conf.d/checks.json" | Path to the json file of the check to be added/removed. Will be created if it does not exist (unless *state=absent*). The parent folders need to exist when *state=present*, otherwise an error will be thrown | | **publish** boolean | **Choices:*** no * yes | Whether the check should be scheduled at all. You can still issue it via the sensu api Default is `false`. | | **refresh** integer | | Number of seconds handlers should wait before taking second action | | **source** string | | The check source, used to create a JIT Sensu client for an external resource (e.g. a network switch). | | **standalone** boolean | **Choices:*** no * yes | Whether the check should be scheduled by the sensu client or server This option obviates the need for specifying the *subscribers* option Default is `false`. | | **state** string | **Choices:*** **present** ← * absent | Whether the check should be present or not | | **subdue\_begin** string | | When to disable handling of check failures | | **subdue\_end** string | | When to enable handling of check failures | | **subscribers** list / elements=string | **Default:**[] | List of subscribers/channels this check should run for See sensu\_subscribers to subscribe a machine to a channel | | **timeout** integer | | Timeout for the check If not specified, it defaults to 10. | | **ttl** integer | | Time to live in seconds until the check is considered stale | Examples -------- ``` # Fetch metrics about the CPU load every 60 seconds, # the sensu server has a handler called 'relay' which forwards stats to graphite - name: Get cpu metrics community.general.sensu_check: name: cpu_load command: /etc/sensu/plugins/system/cpu-mpstat-metrics.rb metric: yes handlers: relay subscribers: common interval: 60 # Check whether nginx is running - name: Check nginx process community.general.sensu_check: name: nginx_running command: /etc/sensu/plugins/processes/check-procs.rb -f /var/run/nginx.pid handlers: default subscribers: nginx interval: 60 # Stop monitoring the disk capacity. # Note that the check will still show up in the sensu dashboard, # to remove it completely you need to issue a DELETE request to the sensu api. - name: Check disk community.general.sensu_check: name: check_disk_capacity state: absent ``` ### Authors * Anders Ingemann (@andsens) ansible community.general.hwc_evs_disk – Creates a resource of Evs/Disk in Huawei Cloud community.general.hwc\_evs\_disk – Creates a resource of Evs/Disk in Huawei Cloud ================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.hwc_evs_disk`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * block storage management. Requirements ------------ The below requirements are needed on the host that executes this module. * keystoneauth1 >= 3.6.0 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **availability\_zone** string / required | | Specifies the AZ where you want to create the disk. | | **backup\_id** string | | Specifies the ID of the backup that can be used to create a disk. This parameter is mandatory when you use a backup to create the disk. | | **description** string | | Specifies the disk description. The value can contain a maximum of 255 bytes. | | **domain** string / required | | The name of the Domain to scope to (Identity v3). (currently only domain names are supported, and not domain IDs). | | **enable\_full\_clone** boolean | **Choices:*** no * yes | If the disk is created from a snapshot and linked cloning needs to be used, set this parameter to True. | | **enable\_scsi** boolean | **Choices:*** no * yes | If this parameter is set to True, the disk device type will be SCSI, which allows ECS OSs to directly access underlying storage media. SCSI reservation command is supported. If this parameter is set to False, the disk device type will be VBD, which supports only simple SCSI read/write commands. If parameter enable\_share is set to True and this parameter is not specified, shared SCSI disks are created. SCSI EVS disks cannot be created from backups, which means that this parameter cannot be True if backup\_id has been specified. | | **enable\_share** boolean | **Choices:*** no * yes | Specifies whether the disk is shareable. The default value is False. | | **encryption\_id** string | | Specifies the encryption ID. The length of it fixes at 36 bytes. | | **enterprise\_project\_id** string | | Specifies the enterprise project ID. This ID is associated with the disk during the disk creation. If it is not specified, the disk is bound to the default enterprise project. | | **id** string | | The id of resource to be managed. | | **identity\_endpoint** string / required | | The Identity authentication URL. | | **image\_id** string | | Specifies the image ID. If this parameter is specified, the disk is created from an image. BMS system disks cannot be created from BMS images. | | **name** string / required | | Specifies the disk name. The value can contain a maximum of 255 bytes. | | **password** string / required | | The password to login with. | | **project** string / required | | The name of the Tenant (Identity v2) or Project (Identity v3). (currently only project names are supported, and not project IDs). | | **region** string | | The region to which the project belongs. | | **size** integer | | Specifies the disk size, in GB. Its values are as follows, System disk 1 GB to 1024 GB, Data disk 10 GB to 32768 GB. This parameter is mandatory when you create an empty disk or use an image or a snapshot to create a disk. If you use an image or a snapshot to create a disk, the disk size must be greater than or equal to the image or snapshot size. This parameter is optional when you use a backup to create a disk. If this parameter is not specified, the disk size is equal to the backup size. | | **snapshot\_id** string | | Specifies the snapshot ID. If this parameter is specified, the disk is created from a snapshot. | | **state** string | **Choices:*** **present** ← * absent | Whether the given object should exist in Huaweicloud Cloud. | | **timeouts** dictionary | | The timeouts for each operations. | | | **create** string | **Default:**"30m" | The timeouts for create operation. | | | **delete** string | **Default:**"30m" | The timeouts for delete operation. | | | **update** string | **Default:**"30m" | The timeouts for update operation. | | **user** string / required | | The user name to login with (currently only user names are supported, and not user IDs). | | **volume\_type** string / required | | Specifies the disk type. Currently, the value can be SSD, SAS, or SATA. SSD specifies the ultra-high I/O disk type. SAS specifies the high I/O disk type. SATA specifies the common I/O disk type. If the specified disk type is not available in the AZ, the disk will fail to create. If the EVS disk is created from a snapshot, the volume\_type field must be the same as that of the snapshot's source disk. | Notes ----- Note * For authentication, you can set identity\_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT` env variable. * For authentication, you can set user using the `ANSIBLE_HWC_USER` env variable. * For authentication, you can set password using the `ANSIBLE_HWC_PASSWORD` env variable. * For authentication, you can set domain using the `ANSIBLE_HWC_DOMAIN` env variable. * For authentication, you can set project using the `ANSIBLE_HWC_PROJECT` env variable. * For authentication, you can set region using the `ANSIBLE_HWC_REGION` env variable. * Environment variables values will only be used if the playbook values are not set. Examples -------- ``` # test create disk - name: Create a disk community.general.hwc_evs_disk: availability_zone: "cn-north-1a" name: "ansible_evs_disk_test" volume_type: "SATA" size: 10 ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **attachments** complex | success | Specifies the disk attachment information. | | | **attached\_at** string | success | Specifies the time when the disk was attached. Time format is 'UTC YYYY-MM-DDTHH:MM:SS'. | | | **attachment\_id** string | success | Specifies the ID of the attachment information. | | | **device** string | success | Specifies the device name. | | | **server\_id** string | success | Specifies the ID of the server to which the disk is attached. | | **availability\_zone** string | success | Specifies the AZ where you want to create the disk. | | **backup\_id** string | success | Specifies the ID of the backup that can be used to create a disk. This parameter is mandatory when you use a backup to create the disk. | | **backup\_policy\_id** string | success | Specifies the backup policy ID. | | **created\_at** string | success | Specifies the time when the disk was created. Time format is 'UTC YYYY-MM-DDTHH:MM:SS'. | | **description** string | success | Specifies the disk description. The value can contain a maximum of 255 bytes. | | **enable\_full\_clone** boolean | success | If the disk is created from a snapshot and linked cloning needs to be used, set this parameter to True. | | **enable\_scsi** boolean | success | If this parameter is set to True, the disk device type will be SCSI, which allows ECS OSs to directly access underlying storage media. SCSI reservation command is supported. If this parameter is set to False, the disk device type will be VBD, which supports only simple SCSI read/write commands. If parameter enable\_share is set to True and this parameter is not specified, shared SCSI disks are created. SCSI EVS disks cannot be created from backups, which means that this parameter cannot be True if backup\_id has been specified. | | **enable\_share** boolean | success | Specifies whether the disk is shareable. The default value is False. | | **encryption\_id** string | success | Specifies the encryption ID. The length of it fixes at 36 bytes. | | **enterprise\_project\_id** string | success | Specifies the enterprise project ID. This ID is associated with the disk during the disk creation. If it is not specified, the disk is bound to the default enterprise project. | | **image\_id** string | success | Specifies the image ID. If this parameter is specified, the disk is created from an image. BMS system disks cannot be created from BMS images. | | **is\_bootable** boolean | success | Specifies whether the disk is bootable. | | **is\_readonly** boolean | success | Specifies whether the disk is read-only or read/write. True indicates that the disk is read-only. False indicates that the disk is read/write. | | **name** string | success | Specifies the disk name. The value can contain a maximum of 255 bytes. | | **size** integer | success | Specifies the disk size, in GB. Its values are as follows, System disk 1 GB to 1024 GB, Data disk 10 GB to 32768 GB. This parameter is mandatory when you create an empty disk or use an image or a snapshot to create a disk. If you use an image or a snapshot to create a disk, the disk size must be greater than or equal to the image or snapshot size. This parameter is optional when you use a backup to create a disk. If this parameter is not specified, the disk size is equal to the backup size. | | **snapshot\_id** string | success | Specifies the snapshot ID. If this parameter is specified, the disk is created from a snapshot. | | **source\_volume\_id** string | success | Specifies the source disk ID. This parameter has a value if the disk is created from a source disk. | | **status** string | success | Specifies the disk status. | | **tags** dictionary | success | Specifies the disk tags. | | **volume\_type** string | success | Specifies the disk type. Currently, the value can be SSD, SAS, or SATA. SSD specifies the ultra-high I/O disk type. SAS specifies the high I/O disk type. SATA specifies the common I/O disk type. If the specified disk type is not available in the AZ, the disk will fail to create. If the EVS disk is created from a snapshot, the volume\_type field must be the same as that of the snapshot's source disk. | ### Authors * Huawei Inc. (@huaweicloud) ansible community.general.proxmox – management of instances in Proxmox VE cluster community.general.proxmox – management of instances in Proxmox VE cluster ========================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.proxmox`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * allows you to create/delete/stop instances in Proxmox VE cluster * Starting in Ansible 2.1, it automatically detects containerization type (lxc for PVE 4, openvz for older) * From community.general 4.0.0 on, there will be no default values, see *proxmox\_default\_behavior*. Requirements ------------ The below requirements are needed on the host that executes this module. * proxmoxer * requests Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_host** string / required | | Specify the target host of the Proxmox VE cluster. | | **api\_password** string | | Specify the password to authenticate with. You can use `PROXMOX_PASSWORD` environment variable. | | **api\_token\_id** string added in 1.3.0 of community.general | | Specify the token ID. | | **api\_token\_secret** string added in 1.3.0 of community.general | | Specify the token secret. | | **api\_user** string / required | | Specify the user to authenticate with. | | **cores** integer | | Specify number of cores per socket. If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `1`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **cpus** integer | | numbers of allocated cpus for instance If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `1`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **cpuunits** integer | | CPU weight for a VM If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `1000`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **description** string added in 0.2.0 of community.general | | Specify the description for the container. Only used on the configuration web interface. This is saved as a comment inside the configuration file. | | **disk** string | | This option was previously described as "hard disk size in GB for instance" however several formats describing a lxc mount are permitted. Older versions of Proxmox will accept a numeric value for size using the *storage* parameter to automatically choose which storage to allocate from, however new versions enforce the `<STORAGE>:<SIZE>` syntax. Additional options are available by using some combination of the following key-value pairs as a comma-delimited list `[volume=]<volume> [,acl=<1|0>] [,mountoptions=<opt[;opt...]>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]`. See <https://pve.proxmox.com/wiki/Linux_Container> for a full description. If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `3`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **features** list / elements=string added in 2.0.0 of community.general | | Specifies a list of features to be enabled. For valid options, see <https://pve.proxmox.com/wiki/Linux_Container#pct_options>. Some features require the use of a privileged container. | | **force** boolean | **Choices:*** **no** ← * yes | forcing operations can be used only with states `present`, `stopped`, `restarted` with `state=present` force option allow to overwrite existing container with states `stopped` , `restarted` allow to force stop instance | | **hookscript** string added in 0.2.0 of community.general | | Script that will be executed during various steps in the containers lifetime. | | **hostname** string | | the instance hostname required only for `state=present` must be unique if vmid is not passed | | **ip\_address** string | | specifies the address the container will be assigned | | **memory** integer | | memory size in MB for instance If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `512`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **mounts** dictionary | | specifies additional mounts (separate disks) for the container. As a hash/dictionary defining mount points | | **nameserver** string | | sets DNS server IP address for a container | | **netif** dictionary | | specifies network interfaces for the container. As a hash/dictionary defining interfaces. | | **node** string | | Proxmox VE node on which to operate. Only required for *state=present*. For every other states it will be autodiscovered. | | **onboot** boolean | **Choices:*** no * yes | specifies whether a VM will be started during system bootup If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `no`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **ostemplate** string | | the template for VM creating required only for `state=present` | | **password** string | | the instance root password | | **pool** string | | Add the new VM to the specified pool. | | **proxmox\_default\_behavior** string added in 1.3.0 of community.general | **Choices:*** compatibility * no\_defaults | Various module options used to have default values. This cause problems when user expects different behavior from proxmox by default or fill options which cause problems when they have been set. The default value is `compatibility`, which will ensure that the default values are used when the values are not explicitly specified by the user. From community.general 4.0.0 on, the default value will switch to `no_defaults`. To avoid deprecation warnings, please set *proxmox\_default\_behavior* to an explicit value. This affects the *disk*, *cores*, *cpus*, *memory*, *onboot*, *swap*, *cpuunits* options. | | **pubkey** string | | Public key to add to /root/.ssh/authorized\_keys. This was added on Proxmox 4.2, it is ignored for earlier versions | | **purge** boolean added in 2.3.0 of community.general | **Choices:*** **no** ← * yes | Remove container from all related configurations. For example backup jobs, replication jobs, or HA. Related ACLs and Firewall entries will always be removed. Used with state `absent`. | | **searchdomain** string | | sets DNS search domain for a container | | **state** string | **Choices:*** **present** ← * started * absent * stopped * restarted | Indicate desired state of the instance | | **storage** string | **Default:**"local" | target storage | | **swap** integer | | swap memory size in MB for instance If *proxmox\_default\_behavior* is set to `compatiblity` (the default value), this option has a default of `0`. Note that the default value of *proxmox\_default\_behavior* changes in community.general 4.0.0. | | **timeout** integer | **Default:**30 | timeout for operations | | **unprivileged** boolean | **Choices:*** **no** ← * yes | Indicate if the container should be unprivileged | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | | **vmid** integer | | Specifies the instance ID. If not set the next available ID will be fetched from ProxmoxAPI. | Examples -------- ``` - name: Create new container with minimal options community.general.proxmox: vmid: 100 node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 password: 123456 hostname: example.org ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' - name: Create new container with hookscript and description community.general.proxmox: vmid: 100 node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 password: 123456 hostname: example.org ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' hookscript: 'local:snippets/vm_hook.sh' description: created with ansible - name: Create new container automatically selecting the next available vmid. community.general.proxmox: node: 'uk-mc02' api_user: 'root@pam' api_password: '1q2w3e' api_host: 'node1' password: '123456' hostname: 'example.org' ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' - name: Create new container with minimal options with force(it will rewrite existing container) community.general.proxmox: vmid: 100 node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 password: 123456 hostname: example.org ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' force: yes - name: Create new container with minimal options use environment PROXMOX_PASSWORD variable(you should export it before) community.general.proxmox: vmid: 100 node: uk-mc02 api_user: root@pam api_host: node1 password: 123456 hostname: example.org ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' - name: Create new container with minimal options defining network interface with dhcp community.general.proxmox: vmid: 100 node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 password: 123456 hostname: example.org ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' netif: '{"net0":"name=eth0,ip=dhcp,ip6=dhcp,bridge=vmbr0"}' - name: Create new container with minimal options defining network interface with static ip community.general.proxmox: vmid: 100 node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 password: 123456 hostname: example.org ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' netif: '{"net0":"name=eth0,gw=192.168.0.1,ip=192.168.0.2/24,bridge=vmbr0"}' - name: Create new container with minimal options defining a mount with 8GB community.general.proxmox: vmid: 100 node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 password: 123456 hostname: example.org ostemplate: local:vztmpl/ubuntu-14.04-x86_64.tar.gz' mounts: '{"mp0":"local:8,mp=/mnt/test/"}' - name: Create new container with minimal options defining a cpu core limit community.general.proxmox: vmid: 100 node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 password: 123456 hostname: example.org ostemplate: local:vztmpl/ubuntu-14.04-x86_64.tar.gz' cores: 2 - name: Create a new container with nesting enabled and allows the use of CIFS/NFS inside the container. community.general.proxmox: vmid: 100 node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 password: 123456 hostname: example.org ostemplate: local:vztmpl/ubuntu-14.04-x86_64.tar.gz' features: - nesting=1 - mount=cifs,nfs - name: Start container community.general.proxmox: vmid: 100 api_user: root@pam api_password: 1q2w3e api_host: node1 state: started - name: > Start container with mount. You should enter a 90-second timeout because servers with additional disks take longer to boot community.general.proxmox: vmid: 100 api_user: root@pam api_password: 1q2w3e api_host: node1 state: started timeout: 90 - name: Stop container community.general.proxmox: vmid: 100 api_user: root@pam api_password: 1q2w3e api_host: node1 state: stopped - name: Stop container with force community.general.proxmox: vmid: 100 api_user: root@pam api_password: 1q2w3e api_host: node1 force: yes state: stopped - name: Restart container(stopped or mounted container you can't restart) community.general.proxmox: vmid: 100 api_user: root@pam api_password: 1q2w3e api_host: node1 state: restarted - name: Remove container community.general.proxmox: vmid: 100 api_user: root@pam api_password: 1q2w3e api_host: node1 state: absent ``` ### Authors * Sergei Antipov (@UnderGreen)
programming_docs
ansible community.general.installp – Manage packages on AIX community.general.installp – Manage packages on AIX =================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.installp`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage packages using ‘installp’ on AIX Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **accept\_license** boolean | **Choices:*** **no** ← * yes | Whether to accept the license for the package(s). | | **name** list / elements=string / required | | One or more packages to install or remove. Use `all` to install all packages available on informed `repository_path`. aliases: pkg | | **repository\_path** path | | Path with AIX packages (required to install). | | **state** string | **Choices:*** absent * **present** ← | Whether the package needs to be present on or absent from the system. | Notes ----- Note * If the package is already installed, even the package/fileset is new, the module will not install it. Examples -------- ``` - name: Install package foo community.general.installp: name: foo repository_path: /repository/AIX71/installp/base accept_license: yes state: present - name: Install bos.sysmgt that includes bos.sysmgt.nim.master, bos.sysmgt.nim.spot community.general.installp: name: bos.sysmgt repository_path: /repository/AIX71/installp/base accept_license: yes state: present - name: Install bos.sysmgt.nim.master only community.general.installp: name: bos.sysmgt.nim.master repository_path: /repository/AIX71/installp/base accept_license: yes state: present - name: Install bos.sysmgt.nim.master and bos.sysmgt.nim.spot community.general.installp: name: bos.sysmgt.nim.master, bos.sysmgt.nim.spot repository_path: /repository/AIX71/installp/base accept_license: yes state: present - name: Remove packages bos.sysmgt.nim.master community.general.installp: name: bos.sysmgt.nim.master state: absent ``` ### Authors * Kairo Araujo (@kairoaraujo) ansible community.general.nios_network – Configure Infoblox NIOS network object community.general.nios\_network – Configure Infoblox NIOS network object ======================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nios_network`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Status](#status) DEPRECATED ---------- Removed in version 5.0.0 Why Please install the infoblox.nios\_modules collection and use the corresponding module from it. Alternative infoblox.nios\_modules.nios\_network Synopsis -------- * Adds and/or removes instances of network objects from Infoblox NIOS servers. This module manages NIOS `network` objects using the Infoblox WAPI interface over REST. * Supports both IPV4 and IPV6 internet protocols Requirements ------------ The below requirements are needed on the host that executes this module. * infoblox-client Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **comment** string | | Configures a text string comment to be associated with the instance of this object. The provided text string will be configured on the object instance. | | **container** boolean | **Choices:*** no * yes | If set to true it'll create the network container to be added or removed from the system. | | **extattrs** dictionary | | Allows for the configuration of Extensible Attributes on the instance of the object. This argument accepts a set of key / value pairs for configuration. | | **network** string / required | | Specifies the network to add or remove from the system. The value should use CIDR notation. aliases: name, cidr | | **network\_view** string | **Default:**"default" | Configures the name of the network view to associate with this configured instance. | | **options** list / elements=dictionary | | Configures the set of DHCP options to be included as part of the configured network instance. This argument accepts a list of values (see suboptions). When configuring suboptions at least one of `name` or `num` must be specified. | | | **name** string | | The name of the DHCP option to configure. The standard options are `router`, `router-templates`, `domain-name-servers`, `domain-name`, `broadcast-address`, `broadcast-address-offset`, `dhcp-lease-time`, and `dhcp6.name-servers`. | | | **num** integer | | The number of the DHCP option to configure | | | **use\_option** boolean | **Choices:*** no * **yes** ← | Only applies to a subset of options (see NIOS API documentation) | | | **value** string / required | | The value of the DHCP option specified by `name` | | | **vendor\_class** string | **Default:**"DHCP" | The name of the space this DHCP option is associated to | | **provider** dictionary | | A dict object containing connection details. | | | **host** string | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. | | | **http\_pool\_connections** integer | **Default:**10 | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_pool\_maxsize** integer | **Default:**10 | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_request\_timeout** integer | **Default:**10 | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. | | | **max\_results** integer | **Default:**1000 | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. | | | **max\_retries** integer | **Default:**3 | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. | | | **password** string | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. | | | **silent\_ssl\_warnings** boolean | **Choices:*** no * **yes** ← | Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **username** string | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. | | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable. aliases: ssl\_verify | | | **wapi\_version** string | **Default:**"2.1" | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 | | **state** string | **Choices:*** **present** ← * absent | Configures the intended state of the instance of the object on the NIOS server. When this value is set to `present`, the object is configured on the device and when this value is set to `absent` the value is removed (if necessary) from the device. | Notes ----- Note * This module must be run locally, which can be achieved by specifying `connection: local`. * Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible. Examples -------- ``` - name: Configure a network ipv4 community.general.nios_network: network: 192.168.10.0/24 comment: this is a test comment state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Configure a network ipv6 community.general.nios_network: network: fe80::/64 comment: this is a test comment state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Set dhcp options for a network ipv4 community.general.nios_network: network: 192.168.10.0/24 comment: this is a test comment options: - name: domain-name value: ansible.com state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Remove a network ipv4 community.general.nios_network: network: 192.168.10.0/24 state: absent provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Configure a ipv4 network container community.general.nios_network: network: 192.168.10.0/24 container: true comment: test network container state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Configure a ipv6 network container community.general.nios_network: network: fe80::/64 container: true comment: test network container state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Remove a ipv4 network container community.general.nios_network: networkr: 192.168.10.0/24 container: true comment: test network container state: absent provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local ``` Status ------ * This module will be removed in version 5.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Peter Sprygada (@privateip) ansible community.general.pagerduty_change – Track a code or infrastructure change as a PagerDuty change event community.general.pagerduty\_change – Track a code or infrastructure change as a PagerDuty change event ======================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pagerduty_change`. New in version 1.3.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module will let you create a PagerDuty change event each time the module is run. * This is not an idempotent action and a new change event will be created each time it is run. Requirements ------------ The below requirements are needed on the host that executes this module. * PagerDuty integration key Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **environment** string | | The environment name, typically `production`, `staging`, etc. | | **integration\_key** string / required | | The integration key that identifies the service the change was made to. This can be found by adding an integration to a service in PagerDuty. | | **link\_text** string | | Descriptive text for a URL where more information about the deployment can be obtained. | | **link\_url** string | | A URL where more information about the deployment can be obtained. | | **repo** string | | The URL of the project repository. | | **revision** string | | An identifier of the revision being deployed, typically a number or SHA from a version control system. | | **source** string | **Default:**"Ansible" | The source of the change event. | | **summary** string / required | | A short description of the change that occurred. | | **url** string | **Default:**"https://events.pagerduty.com/v2/change/enqueue" | URL to submit the change event to. | | **user** string | | The name of the user or process that triggered this deployment. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates for the target URL will not be validated. This should only be used on personally controlled sites using self-signed certificates. | Notes ----- Note * Supports `check_mode`. Note that check mode simply does nothing except returning `changed=true` in case the *url* seems to be correct. Examples -------- ``` - name: Track the deployment as a PagerDuty change event community.general.pagerduty_change: integration_key: abc123abc123abc123abc123abc123ab summary: The application was deployed - name: Track the deployment as a PagerDuty change event with more details community.general.pagerduty_change: integration_key: abc123abc123abc123abc123abc123ab summary: The application was deployed source: Ansible Deploy user: ansible repo: github.com/ansible/ansible revision: '4.2' environment: production link_url: https://github.com/ansible-collections/community.general/pull/1269 link_text: View changes on GitHub ``` ### Authors * Adam Vaughan (@adamvaughan) ansible community.general.influxdb_retention_policy – Manage InfluxDB retention policies community.general.influxdb\_retention\_policy – Manage InfluxDB retention policies ================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.influxdb_retention_policy`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manage InfluxDB retention policies. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * influxdb >= 0.9 * requests Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **database\_name** string / required | | Name of the database. | | **default** boolean | **Choices:*** **no** ← * yes | Sets the retention policy as default retention policy. | | **duration** string | | Determines how long InfluxDB should keep the data. If specified, it should be `INF` or at least one hour. If not specified, `INF` is assumed. Supports complex duration expressions with multiple units. Required only if *state* is set to `present`. | | **hostname** string | **Default:**"localhost" | The hostname or IP address on which InfluxDB server is listening. Since Ansible 2.5, defaulted to localhost. | | **password** string | **Default:**"root" | Password that will be used to authenticate against InfluxDB server. Alias `login_password` added in Ansible 2.5. aliases: login\_password | | **path** string added in 0.2.0 of community.general | | The path on which InfluxDB server is accessible Only available when using python-influxdb >= 5.1.0 | | **policy\_name** string / required | | Name of the retention policy. | | **port** integer | **Default:**8086 | The port on which InfluxDB server is listening | | **proxies** dictionary | | HTTP(S) proxy to use for Requests to connect to InfluxDB server. | | **replication** integer | | Determines how many independent copies of each point are stored in the cluster. Required only if *state* is set to `present`. | | **retries** integer | **Default:**3 | Number of retries client will try before aborting. `0` indicates try until success. Only available when using python-influxdb >= 4.1.0 | | **shard\_group\_duration** string added in 2.0.0 of community.general | | Determines the time range covered by a shard group. If specified it must be at least one hour. If none, it's determined by InfluxDB by the rentention policy's duration. Supports complex duration expressions with multiple units. | | **ssl** boolean | **Choices:*** **no** ← * yes | Use https instead of http to connect to InfluxDB server. | | **state** string added in 3.1.0 of community.general | **Choices:*** absent * **present** ← | State of the retention policy. | | **timeout** integer | | Number of seconds Requests will wait for client to establish a connection. | | **udp\_port** integer | **Default:**4444 | UDP port to connect to InfluxDB server. | | **use\_udp** boolean | **Choices:*** **no** ← * yes | Use UDP to connect to InfluxDB server. | | **username** string | **Default:**"root" | Username that will be used to authenticate against InfluxDB server. Alias `login_username` added in Ansible 2.5. aliases: login\_username | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. | Examples -------- ``` # Example influxdb_retention_policy command from Ansible Playbooks - name: Create 1 hour retention policy community.general.influxdb_retention_policy: hostname: "{{ influxdb_ip_address }}" database_name: "{{ influxdb_database_name }}" policy_name: test duration: 1h replication: 1 ssl: yes validate_certs: yes state: present - name: Create 1 day retention policy with 1 hour shard group duration community.general.influxdb_retention_policy: hostname: "{{ influxdb_ip_address }}" database_name: "{{ influxdb_database_name }}" policy_name: test duration: 1d replication: 1 shard_group_duration: 1h state: present - name: Create 1 week retention policy with 1 day shard group duration community.general.influxdb_retention_policy: hostname: "{{ influxdb_ip_address }}" database_name: "{{ influxdb_database_name }}" policy_name: test duration: 1w replication: 1 shard_group_duration: 1d state: present - name: Create infinite retention policy with 1 week of shard group duration community.general.influxdb_retention_policy: hostname: "{{ influxdb_ip_address }}" database_name: "{{ influxdb_database_name }}" policy_name: test duration: INF replication: 1 ssl: no validate_certs: no shard_group_duration: 1w state: present - name: Create retention policy with complex durations community.general.influxdb_retention_policy: hostname: "{{ influxdb_ip_address }}" database_name: "{{ influxdb_database_name }}" policy_name: test duration: 5d1h30m replication: 1 ssl: no validate_certs: no shard_group_duration: 1d10h30m state: present - name: Drop retention policy community.general.influxdb_retention_policy: hostname: "{{ influxdb_ip_address }}" database_name: "{{ influxdb_database_name }}" policy_name: test state: absent ``` ### Authors * Kamil Szczygiel (@kamsz)
programming_docs
ansible community.general.nrdp – Post task results to a Nagios server through nrdp community.general.nrdp – Post task results to a Nagios server through nrdp ========================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nrdp`. * [Synopsis](#synopsis) * [Parameters](#parameters) Synopsis -------- * This callback send playbook result to Nagios. * Nagios shall use NRDP to recive passive events. * The passive check is sent to a dedicated host/service for Ansible. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **hostname** string / required | | ini entries: [callback\_nrdp]hostname = None env:NRDP\_HOSTNAME | Hostname where the passive check is linked to. | | **servicename** string / required | | ini entries: [callback\_nrdp]servicename = None env:NRDP\_SERVICENAME | Service where the passive check is linked to. | | **token** string / required | | ini entries: [callback\_nrdp]token = None env:NRDP\_TOKEN | Token to be allowed to push nrdp events. | | **url** string / required | | ini entries: [callback\_nrdp]url = None env:NRDP\_URL | URL of the nrdp server. | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | ini entries: [callback\_nrdp]validate\_nrdp\_certs = no [callback\_nrdp]validate\_certs = no env:NRDP\_VALIDATE\_CERTS | Validate the SSL certificate of the nrdp server. (Used for HTTPS URLs.) aliases: validate\_nrdp\_certs | ### Authors * Remi VERCHERE (@rverchere) ansible community.general.spotinst_aws_elastigroup – Create, update or delete Spotinst AWS Elastigroups community.general.spotinst\_aws\_elastigroup – Create, update or delete Spotinst AWS Elastigroups ================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.spotinst_aws_elastigroup`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Can create, update, or delete Spotinst AWS Elastigroups Launch configuration is part of the elastigroup configuration, so no additional modules are necessary for handling the launch configuration. You will have to have a credentials file in this location - <home>/.spotinst/credentials The credentials file must contain a row that looks like this token = <YOUR TOKEN> Full documentation available at <https://help.spotinst.com/hc/en-us/articles/115003530285-Ansible>- Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * spotinst\_sdk >= 1.0.38 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **account\_id** string | | Optional parameter that allows to set an account-id inside the module configuration. By default this is retrieved from the credentials path. | | **availability\_vs\_cost** string / required | | The strategy orientation. The choices available are: `availabilityOriented`, `costOriented`, `balanced`. | | **availability\_zones** list / elements=dictionary / required | | A list of hash/dictionaries of Availability Zones that are configured in the elastigroup; '[{"key":"value", "key":"value"}]'; keys allowed are name (String), subnet\_id (String), placement\_group\_name (String), | | **block\_device\_mappings** list / elements=dictionary | | A list of hash/dictionaries of Block Device Mappings for elastigroup instances; You can specify virtual devices and EBS volumes.; '[{"key":"value", "key":"value"}]'; keys allowed are device\_name (List of Strings), virtual\_name (String), no\_device (String), ebs (Object, expects the following keys- delete\_on\_termination(Boolean), encrypted(Boolean), iops (Integer), snapshot\_id(Integer), volume\_type(String), volume\_size(Integer)) | | **chef** dictionary | | The Chef integration configuration.; Expects the following keys - chef\_server (String), organization (String), user (String), pem\_key (String), chef\_version (String) | | **credentials\_path** path | **Default:**"~/.spotinst/credentials" | Optional parameter that allows to set a non-default credentials path. | | **down\_scaling\_policies** list / elements=dictionary | | A list of hash/dictionaries of scaling policies to configure in the elastigroup; '[{"key":"value", "key":"value"}]'; keys allowed are - policy\_name (String, required), namespace (String, required), metric\_name (String, required), dimensions ((List of Objects), Keys allowed are name (String, required) and value (String)), statistic (String, required), evaluation\_periods (String, required), period (String, required), threshold (String, required), cooldown (String, required), unit (String, required), operator (String, required), action\_type (String, required), adjustment (String), max\_target\_capacity (String), target (String), maximum (String), minimum (String) | | **draining\_timeout** integer | | Time for instance to be drained from incoming requests and deregistered from ELB before termination. | | **ebs\_optimized** boolean | **Choices:*** no * yes | Enable EBS optimization for supported instances which are not enabled by default.; Note - additional charges will be applied. | | **ebs\_volume\_pool** list / elements=dictionary | | A list of hash/dictionaries of EBS devices to reattach to the elastigroup when available; '[{"key":"value", "key":"value"}]'; keys allowed are - volume\_ids (List of Strings), device\_name (String) | | **ecs** dictionary | | The ECS integration configuration.; Expects the following key - cluster\_name (String) | | **elastic\_ips** list / elements=string | | List of ElasticIps Allocation Ids (Example `eipalloc-9d4e16f8`) to associate to the group instances | | **fallback\_to\_od** boolean | **Choices:*** no * yes | In case of no spots available, Elastigroup will launch an On-demand instance instead | | **health\_check\_grace\_period** integer | | The amount of time, in seconds, after the instance has launched to start and check its health. If not specified, it defaults to `300`. | | **health\_check\_type** string | | The service to use for the health check. The choices available are: `ELB`, `HCS`, `TARGET_GROUP`, `MLB`, `EC2`. | | **health\_check\_unhealthy\_duration\_before\_replacement** integer | | Minimal mount of time instance should be unhealthy for us to consider it unhealthy. | | **iam\_role\_arn** string | | The instance profile iamRole arn Only use iam\_role\_arn, or iam\_role\_name | | **iam\_role\_name** string | | The instance profile iamRole name Only use iam\_role\_arn, or iam\_role\_name | | **id** string | | The group id if it already exists and you want to update, or delete it. This will not work unless the uniqueness\_by field is set to id. When this is set, and the uniqueness\_by field is set, the group will either be updated or deleted, but not created. | | **image\_id** string / required | | The image Id used to launch the instance.; In case of conflict between Instance type and image type, an error will be returned | | **key\_pair** string | | Specify a Key Pair to attach to the instances | | **kubernetes** dictionary | | The Kubernetes integration configuration. Expects the following keys - api\_server (String), token (String) | | **lifetime\_period** integer | | Lifetime period | | **load\_balancers** list / elements=string | | List of classic ELB names | | **max\_size** integer / required | | The upper limit number of instances that you can scale up to | | **mesosphere** dictionary | | The Mesosphere integration configuration. Expects the following key - api\_server (String) | | **min\_size** integer / required | | The lower limit number of instances that you can scale down to | | **monitoring** string | | Describes whether instance Enhanced Monitoring is enabled | | **name** string / required | | Unique name for elastigroup to be created, updated or deleted | | **network\_interfaces** list / elements=dictionary | | A list of hash/dictionaries of network interfaces to add to the elastigroup; '[{"key":"value", "key":"value"}]'; keys allowed are - description (String), device\_index (Integer), secondary\_private\_ip\_address\_count (Integer), associate\_public\_ip\_address (Boolean), delete\_on\_termination (Boolean), groups (List of Strings), network\_interface\_id (String), private\_ip\_address (String), subnet\_id (String), associate\_ipv6\_address (Boolean), private\_ip\_addresses (List of Objects, Keys are privateIpAddress (String, required) and primary (Boolean)) | | **on\_demand\_count** integer | | Required if risk is not set Number of on demand instances to launch. All other instances will be spot instances.; Either set this parameter or the risk parameter | | **on\_demand\_instance\_type** string | | On-demand instance type that will be provisioned | | **opsworks** dictionary | | The elastigroup OpsWorks integration configration.; Expects the following key - layer\_id (String) | | **persistence** dictionary | | The Stateful elastigroup configration.; Accepts the following keys - should\_persist\_root\_device (Boolean), should\_persist\_block\_devices (Boolean), should\_persist\_private\_ip (Boolean) | | **product** string / required | | Operation system type. Available choices are: `Linux/UNIX`, `SUSE Linux`, `Windows`, `Linux/UNIX (Amazon VPC`), `SUSE Linux (Amazon VPC`). | | **rancher** dictionary | | The Rancher integration configuration.; Expects the following keys - version (String), access\_key (String), secret\_key (String), master\_host (String) | | **right\_scale** dictionary | | The Rightscale integration configuration.; Expects the following keys - account\_id (String), refresh\_token (String) | | **risk** integer | | Required if on demand is not set. The percentage of Spot instances to launch (0 - 100). | | **roll\_config** dictionary | | Roll configuration.; If you would like the group to roll after updating, please use this feature. Accepts the following keys - batch\_size\_percentage(Integer, Required), grace\_period - (Integer, Required), health\_check\_type(String, Optional) | | **scheduled\_tasks** list / elements=dictionary | | A list of hash/dictionaries of scheduled tasks to configure in the elastigroup; '[{"key":"value", "key":"value"}]'; keys allowed are - adjustment (Integer), scale\_target\_capacity (Integer), scale\_min\_capacity (Integer), scale\_max\_capacity (Integer), adjustment\_percentage (Integer), batch\_size\_percentage (Integer), cron\_expression (String), frequency (String), grace\_period (Integer), task\_type (String, required), is\_enabled (Boolean) | | **security\_group\_ids** list / elements=string / required | | One or more security group IDs. ; In case of update it will override the existing Security Group with the new given array | | **shutdown\_script** string | | The Base64-encoded shutdown script that executes prior to instance termination. Encode before setting. | | **signals** list / elements=dictionary | | A list of hash/dictionaries of signals to configure in the elastigroup; keys allowed are - name (String, required), timeout (Integer) | | **spin\_up\_time** integer | | Spin up time, in seconds, for the instance | | **spot\_instance\_types** list / elements=string / required | | Spot instance type that will be provisioned. | | **state** string | **Choices:*** **present** ← * absent | Create or delete the elastigroup | | **tags** list / elements=dictionary | | A list of tags to configure in the elastigroup. Please specify list of keys and values (key colon value); | | **target** integer / required | | The number of instances to launch | | **target\_group\_arns** list / elements=string | | List of target group arns instances should be registered to | | **target\_tracking\_policies** list / elements=dictionary | | A list of hash/dictionaries of target tracking policies to configure in the elastigroup; '[{"key":"value", "key":"value"}]'; keys allowed are - policy\_name (String, required), namespace (String, required), source (String, required), metric\_name (String, required), statistic (String, required), unit (String, required), cooldown (String, required), target (String, required) | | **tenancy** string | | Dedicated vs shared tenancy. The available choices are: `default`, `dedicated`. | | **terminate\_at\_end\_of\_billing\_hour** boolean | **Choices:*** no * yes | Terminate at the end of billing hour | | **uniqueness\_by** string | **Choices:*** id * **name** ← | If your group names are not unique, you may use this feature to update or delete a specific group. Whenever this property is set, you must set a group\_id in order to update or delete a group, otherwise a group will be created. | | **unit** string | | The capacity unit to launch instances by. The available choices are: `instance`, `weight`. | | **up\_scaling\_policies** list / elements=dictionary | | A list of hash/dictionaries of scaling policies to configure in the elastigroup; '[{"key":"value", "key":"value"}]'; keys allowed are - policy\_name (String, required), namespace (String, required), metric\_name (String, required), dimensions (List of Objects, Keys allowed are name (String, required) and value (String)), statistic (String, required) evaluation\_periods (String, required), period (String, required), threshold (String, required), cooldown (String, required), unit (String, required), operator (String, required), action\_type (String, required), adjustment (String), min\_target\_capacity (String), target (String), maximum (String), minimum (String) | | **user\_data** string | | Base64-encoded MIME user data. Encode before setting the value. | | **utilize\_reserved\_instances** boolean | **Choices:*** no * yes | In case of any available Reserved Instances, Elastigroup will utilize your reservations before purchasing Spot instances. | | **wait\_for\_instances** boolean | **Choices:*** **no** ← * yes | Whether or not the elastigroup creation / update actions should wait for the instances to spin | | **wait\_timeout** integer | | How long the module should wait for instances before failing the action.; Only works if wait\_for\_instances is True. | Examples -------- ``` # Basic configuration YAML example - hosts: localhost tasks: - name: Create elastigroup community.general.spotinst_aws_elastigroup: state: present risk: 100 availability_vs_cost: balanced availability_zones: - name: us-west-2a subnet_id: subnet-2b68a15c image_id: ami-f173cc91 key_pair: spotinst-oregon max_size: 15 min_size: 0 target: 0 unit: instance monitoring: True name: ansible-group on_demand_instance_type: c3.large product: Linux/UNIX load_balancers: - test-lb-1 security_group_ids: - sg-8f4b8fe9 spot_instance_types: - c3.large do_not_update: - image_id - target register: result - ansible.builtin.debug: var=result # In this example, we create an elastigroup and wait 600 seconds to retrieve the instances, and use their private ips - hosts: localhost tasks: - name: Create elastigroup community.general.spotinst_aws_elastigroup: state: present account_id: act-1a9dd2b risk: 100 availability_vs_cost: balanced availability_zones: - name: us-west-2a subnet_id: subnet-2b68a15c tags: - Environment: someEnvValue - OtherTagKey: otherValue image_id: ami-f173cc91 key_pair: spotinst-oregon max_size: 5 min_size: 0 target: 0 unit: instance monitoring: True name: ansible-group-tal on_demand_instance_type: c3.large product: Linux/UNIX security_group_ids: - sg-8f4b8fe9 block_device_mappings: - device_name: '/dev/sda1' ebs: volume_size: 100 volume_type: gp2 spot_instance_types: - c3.large do_not_update: - image_id wait_for_instances: True wait_timeout: 600 register: result - name: Store private ips to file ansible.builtin.shell: echo {{ item.private_ip }}\n >> list-of-private-ips with_items: "{{ result.instances }}" - ansible.builtin.debug: var=result # In this example, we create an elastigroup with multiple block device mappings, tags, and also an account id # In organizations with more than one account, it is required to specify an account_id - hosts: localhost tasks: - name: Create elastigroup community.general.spotinst_aws_elastigroup: state: present account_id: act-1a9dd2b risk: 100 availability_vs_cost: balanced availability_zones: - name: us-west-2a subnet_id: subnet-2b68a15c tags: - Environment: someEnvValue - OtherTagKey: otherValue image_id: ami-f173cc91 key_pair: spotinst-oregon max_size: 5 min_size: 0 target: 0 unit: instance monitoring: True name: ansible-group-tal on_demand_instance_type: c3.large product: Linux/UNIX security_group_ids: - sg-8f4b8fe9 block_device_mappings: - device_name: '/dev/xvda' ebs: volume_size: 60 volume_type: gp2 - device_name: '/dev/xvdb' ebs: volume_size: 120 volume_type: gp2 spot_instance_types: - c3.large do_not_update: - image_id wait_for_instances: True wait_timeout: 600 register: result - name: Store private ips to file ansible.builtin.shell: echo {{ item.private_ip }}\n >> list-of-private-ips with_items: "{{ result.instances }}" - ansible.builtin.debug: var=result # In this example we have set up block device mapping with ephemeral devices - hosts: localhost tasks: - name: Create elastigroup community.general.spotinst_aws_elastigroup: state: present risk: 100 availability_vs_cost: balanced availability_zones: - name: us-west-2a subnet_id: subnet-2b68a15c image_id: ami-f173cc91 key_pair: spotinst-oregon max_size: 15 min_size: 0 target: 0 unit: instance block_device_mappings: - device_name: '/dev/xvda' virtual_name: ephemeral0 - device_name: '/dev/xvdb/' virtual_name: ephemeral1 monitoring: True name: ansible-group on_demand_instance_type: c3.large product: Linux/UNIX load_balancers: - test-lb-1 security_group_ids: - sg-8f4b8fe9 spot_instance_types: - c3.large do_not_update: - image_id - target register: result - ansible.builtin.debug: var=result # In this example we create a basic group configuration with a network interface defined. # Each network interface must have a device index - hosts: localhost tasks: - name: Create elastigroup community.general.spotinst_aws_elastigroup: state: present risk: 100 availability_vs_cost: balanced network_interfaces: - associate_public_ip_address: true device_index: 0 availability_zones: - name: us-west-2a subnet_id: subnet-2b68a15c image_id: ami-f173cc91 key_pair: spotinst-oregon max_size: 15 min_size: 0 target: 0 unit: instance monitoring: True name: ansible-group on_demand_instance_type: c3.large product: Linux/UNIX load_balancers: - test-lb-1 security_group_ids: - sg-8f4b8fe9 spot_instance_types: - c3.large do_not_update: - image_id - target register: result - ansible.builtin.debug: var=result # In this example we create a basic group configuration with a target tracking scaling policy defined - hosts: localhost tasks: - name: Create elastigroup community.general.spotinst_aws_elastigroup: account_id: act-92d45673 state: present risk: 100 availability_vs_cost: balanced availability_zones: - name: us-west-2a subnet_id: subnet-79da021e image_id: ami-f173cc91 fallback_to_od: true tags: - Creator: ValueOfCreatorTag - Environment: ValueOfEnvironmentTag key_pair: spotinst-labs-oregon max_size: 10 min_size: 0 target: 2 unit: instance monitoring: True name: ansible-group-1 on_demand_instance_type: c3.large product: Linux/UNIX security_group_ids: - sg-46cdc13d spot_instance_types: - c3.large target_tracking_policies: - policy_name: target-tracking-1 namespace: AWS/EC2 metric_name: CPUUtilization statistic: average unit: percent target: 50 cooldown: 120 do_not_update: - image_id register: result - ansible.builtin.debug: var=result ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **group\_id** string | success | Created / Updated group's ID. **Sample:** sig-12345 | | **instances** dictionary | success | List of active elastigroup instances and their details. **Sample:** [{'availabilityZone': 'us-west-2b', 'createdAt': '2017-07-17T12:46:18.000Z', 'instanceId': 'i-09640ad8678234c', 'instanceType': 'm4.large', 'privateIp': '180.0.2.244', 'product': 'Linux/UNIX', 'spotInstanceRequestId': 'sir-regs25zp', 'status': 'fulfilled'}] | ### Authors * Spotinst (@talzur)
programming_docs
ansible community.general.context_demo – demo callback that adds play/task context community.general.context\_demo – demo callback that adds play/task context =========================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.context_demo`. * [Synopsis](#synopsis) * [Requirements](#requirements) Synopsis -------- * Displays some play and task context along with normal output * This is mostly for demo purposes Requirements ------------ The below requirements are needed on the local controller node that executes this callback. * whitelist in configuration ### Authors * Unknown (!UNKNOWN) ansible community.general.zfs – Manage zfs community.general.zfs – Manage zfs ================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.zfs`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manages ZFS file systems, volumes, clones and snapshots Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **extra\_zfs\_properties** dictionary | | A dictionary of zfs properties to be set. See the zfs(8) man page for more information. | | **name** string / required | | File system, snapshot or volume name e.g. `rpool/myfs`. | | **origin** string | | Snapshot from which to create a clone. | | **state** string / required | **Choices:*** absent * present | Whether to create (`present`), or remove (`absent`) a file system, snapshot or volume. All parents/children will be created/destroyed as needed to reach the desired state. | Notes ----- Note * `check_mode` is supported, but in certain situations it may report a task as changed that will not be reported as changed when `check_mode` is disabled. For example, this might occur when the zpool `altroot` option is set or when a size is written using human-readable notation, such as `1M` or `1024K`, instead of as an unqualified byte count, such as `1048576`. Examples -------- ``` - name: Create a new file system called myfs in pool rpool with the setuid property turned off community.general.zfs: name: rpool/myfs state: present extra_zfs_properties: setuid: off - name: Create a new volume called myvol in pool rpool. community.general.zfs: name: rpool/myvol state: present extra_zfs_properties: volsize: 10M - name: Create a snapshot of rpool/myfs file system. community.general.zfs: name: rpool/myfs@mysnapshot state: present - name: Create a new file system called myfs2 with snapdir enabled community.general.zfs: name: rpool/myfs2 state: present extra_zfs_properties: snapdir: enabled - name: Create a new file system by cloning a snapshot community.general.zfs: name: rpool/cloned_fs state: present origin: rpool/myfs@mysnapshot - name: Destroy a filesystem community.general.zfs: name: rpool/myfs state: absent ``` ### Authors * Johan Wiren (@johanwiren) ansible community.general.portage – Package manager for Gentoo community.general.portage – Package manager for Gentoo ====================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.portage`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manages Gentoo packages Requirements ------------ The below requirements are needed on the host that executes this module. * gentoolkit Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **changed\_use** boolean | **Choices:*** **no** ← * yes | Include installed packages where USE flags have changed, except when flags that the user has not enabled are added or removed (--changed-use) | | **deep** boolean | **Choices:*** **no** ← * yes | Consider the entire dependency tree of packages (--deep) | | **depclean** boolean | **Choices:*** **no** ← * yes | Remove packages not needed by explicitly merged packages (--depclean) If no package is specified, clean up the world's dependencies Otherwise, --depclean serves as a dependency aware version of --unmerge | | **getbinpkg** boolean | **Choices:*** **no** ← * yes | Prefer packages specified at `PORTAGE_BINHOST` in `make.conf`. | | **getbinpkgonly** boolean added in 1.3.0 of community.general | **Choices:*** **no** ← * yes | Merge only packages specified at `PORTAGE_BINHOST` in `make.conf`. | | **jobs** integer | | Specifies the number of packages to build simultaneously. Since version 2.6: Value of 0 or False resets any previously added --jobs setting values | | **keepgoing** boolean | **Choices:*** **no** ← * yes | Continue as much as possible after an error. | | **loadavg** float | | Specifies that no new builds should be started if there are other builds running and the load average is at least LOAD Since version 2.6: Value of 0 or False resets any previously added --load-average setting values | | **newuse** boolean | **Choices:*** **no** ← * yes | Include installed packages where USE flags have changed (--newuse) | | **nodeps** boolean | **Choices:*** **no** ← * yes | Only merge packages but not their dependencies (--nodeps) | | **noreplace** boolean | **Choices:*** no * **yes** ← | Do not re-emerge installed packages (--noreplace) | | **oneshot** boolean | **Choices:*** **no** ← * yes | Do not add the packages to the world file (--oneshot) | | **onlydeps** boolean | **Choices:*** **no** ← * yes | Only merge packages' dependencies but not the packages (--onlydeps) | | **package** list / elements=string | | Package atom or set, e.g. `sys-apps/foo` or `>foo-2.13` or `@world` aliases: name | | **quiet** boolean | **Choices:*** **no** ← * yes | Run emerge in quiet mode (--quiet) | | **quietbuild** boolean | **Choices:*** **no** ← * yes | Redirect all build output to logs alone, and do not display it on stdout (--quiet-build) | | **quietfail** boolean | **Choices:*** **no** ← * yes | Suppresses display of the build log on stdout (--quiet-fail) Only the die message and the path of the build log will be displayed on stdout. | | **state** string | **Choices:*** **present** ← * installed * emerged * absent * removed * unmerged * latest | State of the package atom | | **sync** string | **Choices:*** web * yes * no | Sync package repositories first If yes, perform "emerge --sync" If web, perform "emerge-webrsync" | | **update** boolean | **Choices:*** **no** ← * yes | Update packages to the best version available (--update) | | **usepkg** boolean | **Choices:*** **no** ← * yes | Tries to use the binary package(s) in the locally available packages directory. | | **usepkgonly** boolean | **Choices:*** **no** ← * yes | Merge only binaries (no compiling). | | **verbose** boolean | **Choices:*** **no** ← * yes | Run emerge in verbose mode (--verbose) | Examples -------- ``` - name: Make sure package foo is installed community.general.portage: package: foo state: present - name: Make sure package foo is not installed community.general.portage: package: foo state: absent - name: Update package foo to the latest version (os specific alternative to latest) community.general.portage: package: foo update: yes - name: Install package foo using PORTAGE_BINHOST setup community.general.portage: package: foo getbinpkg: yes - name: Re-install world from binary packages only and do not allow any compiling community.general.portage: package: '@world' usepkgonly: yes - name: Sync repositories and update world community.general.portage: package: '@world' update: yes deep: yes sync: yes - name: Remove unneeded packages community.general.portage: depclean: yes - name: Remove package foo if it is not explicitly needed community.general.portage: package: foo state: absent depclean: yes ``` ### Authors * William L Thomson Jr (@wltjr) * Yap Sok Ann (@sayap) * Andrew Udvare (@Tatsh) ansible community.general.clc_modify_server – modify servers in CenturyLink Cloud. community.general.clc\_modify\_server – modify servers in CenturyLink Cloud. ============================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.clc_modify_server`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * An Ansible module to modify servers in CenturyLink Cloud. Requirements ------------ The below requirements are needed on the host that executes this module. * python = 2.7 * requests >= 2.5.0 * clc-sdk Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **alert\_policy\_id** string | | The alert policy id to be associated to the server. This is mutually exclusive with 'alert\_policy\_name' | | **alert\_policy\_name** string | | The alert policy name to be associated to the server. This is mutually exclusive with 'alert\_policy\_id' | | **anti\_affinity\_policy\_id** string | | The anti affinity policy id to be set for a hyper scale server. This is mutually exclusive with 'anti\_affinity\_policy\_name' | | **anti\_affinity\_policy\_name** string | | The anti affinity policy name to be set for a hyper scale server. This is mutually exclusive with 'anti\_affinity\_policy\_id' | | **cpu** string | | How many CPUs to update on the server | | **memory** string | | Memory (in GB) to set to the server. | | **server\_ids** list / elements=string / required | | A list of server Ids to modify. | | **state** string | **Choices:*** **present** ← * absent | The state to insure that the provided resources are in. | | **wait** boolean | **Choices:*** no * **yes** ← | Whether to wait for the provisioning tasks to finish before returning. | Notes ----- Note * To use this module, it is required to set the below environment variables which enables access to the Centurylink Cloud - CLC\_V2\_API\_USERNAME, the account login id for the centurylink cloud - CLC\_V2\_API\_PASSWORD, the account password for the centurylink cloud * Alternatively, the module accepts the API token and account alias. The API token can be generated using the CLC account login and password via the HTTP api call @ <https://api.ctl.io/v2/authentication/login> - CLC\_V2\_API\_TOKEN, the API token generated from <https://api.ctl.io/v2/authentication/login> - CLC\_ACCT\_ALIAS, the account alias associated with the centurylink cloud * Users can set CLC\_V2\_API\_URL to specify an endpoint for pointing to a different CLC environment. Examples -------- ``` # Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples - name: Set the cpu count to 4 on a server community.general.clc_modify_server: server_ids: - UC1TESTSVR01 - UC1TESTSVR02 cpu: 4 state: present - name: Set the memory to 8GB on a server community.general.clc_modify_server: server_ids: - UC1TESTSVR01 - UC1TESTSVR02 memory: 8 state: present - name: Set the anti affinity policy on a server community.general.clc_modify_server: server_ids: - UC1TESTSVR01 - UC1TESTSVR02 anti_affinity_policy_name: 'aa_policy' state: present - name: Remove the anti affinity policy on a server community.general.clc_modify_server: server_ids: - UC1TESTSVR01 - UC1TESTSVR02 anti_affinity_policy_name: 'aa_policy' state: absent - name: Add the alert policy on a server community.general.clc_modify_server: server_ids: - UC1TESTSVR01 - UC1TESTSVR02 alert_policy_name: 'alert_policy' state: present - name: Remove the alert policy on a server community.general.clc_modify_server: server_ids: - UC1TESTSVR01 - UC1TESTSVR02 alert_policy_name: 'alert_policy' state: absent - name: Ret the memory to 16GB and cpu to 8 core on a lust if servers community.general.clc_modify_server: server_ids: - UC1TESTSVR01 - UC1TESTSVR02 cpu: 8 memory: 16 state: present ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **server\_ids** list / elements=string | success | The list of server ids that are changed **Sample:** ['UC1TEST-SVR01', 'UC1TEST-SVR02'] | | **servers** list / elements=string | success | The list of server objects that are changed **Sample:** [{'changeInfo': {'createdBy': 'service.wfad', 'createdDate': 1438196820, 'modifiedBy': 'service.wfad', 'modifiedDate': 1438196820}, 'description': 'test-server', 'details': {'alertPolicies': [], 'cpu': 1, 'customFields': [], 'diskCount': 3, 'disks': [{'id': '0:0', 'partitionPaths': [], 'sizeGB': 1}, {'id': '0:1', 'partitionPaths': [], 'sizeGB': 2}, {'id': '0:2', 'partitionPaths': [], 'sizeGB': 14}], 'hostName': '', 'inMaintenanceMode': False, 'ipAddresses': [{'internal': '10.1.1.1'}], 'memoryGB': 1, 'memoryMB': 1024, 'partitions': [], 'powerState': 'started', 'snapshots': [], 'storageGB': 17}, 'groupId': '086ac1dfe0b6411989e8d1b77c4065f0', 'id': 'test-server', 'ipaddress': '10.120.45.23', 'isTemplate': False, 'links': [{'href': '/v2/servers/wfad/test-server', 'id': 'test-server', 'rel': 'self', 'verbs': ['GET', 'PATCH', 'DELETE']}, {'href': '/v2/groups/wfad/086ac1dfe0b6411989e8d1b77c4065f0', 'id': '086ac1dfe0b6411989e8d1b77c4065f0', 'rel': 'group'}, {'href': '/v2/accounts/wfad', 'id': 'wfad', 'rel': 'account'}, {'href': '/v2/billing/wfad/serverPricing/test-server', 'rel': 'billing'}, {'href': '/v2/servers/wfad/test-server/publicIPAddresses', 'rel': 'publicIPAddresses', 'verbs': ['POST']}, {'href': '/v2/servers/wfad/test-server/credentials', 'rel': 'credentials'}, {'href': '/v2/servers/wfad/test-server/statistics', 'rel': 'statistics'}, {'href': '/v2/servers/wfad/510ec21ae82d4dc89d28479753bf736a/upcomingScheduledActivities', 'rel': 'upcomingScheduledActivities'}, {'href': '/v2/servers/wfad/510ec21ae82d4dc89d28479753bf736a/scheduledActivities', 'rel': 'scheduledActivities', 'verbs': ['GET', 'POST']}, {'href': '/v2/servers/wfad/test-server/capabilities', 'rel': 'capabilities'}, {'href': '/v2/servers/wfad/test-server/alertPolicies', 'rel': 'alertPolicyMappings', 'verbs': ['POST']}, {'href': '/v2/servers/wfad/test-server/antiAffinityPolicy', 'rel': 'antiAffinityPolicyMapping', 'verbs': ['PUT', 'DELETE']}, {'href': '/v2/servers/wfad/test-server/cpuAutoscalePolicy', 'rel': 'cpuAutoscalePolicyMapping', 'verbs': ['PUT', 'DELETE']}], 'locationId': 'UC1', 'name': 'test-server', 'os': 'ubuntu14\_64Bit', 'osType': 'Ubuntu 14 64-bit', 'status': 'active', 'storageType': 'standard', 'type': 'standard'}] | ### Authors * CLC Runner (@clc-runner) ansible community.general.dconf – Modify and read dconf database community.general.dconf – Modify and read dconf database ======================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.dconf`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module allows modifications and reading of `dconf` database. The module is implemented as a wrapper around `dconf` tool. Please see the dconf(1) man page for more details. * Since `dconf` requires a running D-Bus session to change values, the module will try to detect an existing session and reuse it, or run the tool via `dbus-run-session`. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **key** string / required | | A dconf key to modify or read from the dconf database. | | **state** string | **Choices:*** read * **present** ← * absent | The action to take upon the key/value. | | **value** string | | Value to set for the specified dconf key. Value should be specified in GVariant format. Due to complexity of this format, it is best to have a look at existing values in the dconf database. Required for *state=present*. | Notes ----- Note * This module depends on `psutil` Python library (version 4.0.0 and upwards), `dconf`, `dbus-send`, and `dbus-run-session` binaries. Depending on distribution you are using, you may need to install additional packages to have these available. * Detection of existing, running D-Bus session, required to change settings via `dconf`, is not 100% reliable due to implementation details of D-Bus daemon itself. This might lead to running applications not picking-up changes on the fly if options are changed via Ansible and `dbus-run-session`. * Keep in mind that the `dconf` CLI tool, which this module wraps around, utilises an unusual syntax for the values (GVariant). For example, if you wanted to provide a string value, the correct syntax would be `value="'myvalue'"` - with single quotes as part of the Ansible parameter value. * When using loops in combination with a value like `"[('xkb', 'us'), ('xkb', 'se')]"`, you need to be aware of possible type conversions. Applying a filter `"{{ item.value | string }}"` to the parameter variable can avoid potential conversion problems. * The easiest way to figure out exact syntax/value you need to provide for a key is by making the configuration change in application affected by the key, and then having a look at value set via commands `dconf dump /path/to/dir/` or `dconf read /path/to/key`. Examples -------- ``` - name: Configure available keyboard layouts in Gnome community.general.dconf: key: "/org/gnome/desktop/input-sources/sources" value: "[('xkb', 'us'), ('xkb', 'se')]" state: present - name: Read currently available keyboard layouts in Gnome community.general.dconf: key: "/org/gnome/desktop/input-sources/sources" state: read register: keyboard_layouts - name: Reset the available keyboard layouts in Gnome community.general.dconf: key: "/org/gnome/desktop/input-sources/sources" state: absent - name: Configure available keyboard layouts in Cinnamon community.general.dconf: key: "/org/gnome/libgnomekbd/keyboard/layouts" value: "['us', 'se']" state: present - name: Read currently available keyboard layouts in Cinnamon community.general.dconf: key: "/org/gnome/libgnomekbd/keyboard/layouts" state: read register: keyboard_layouts - name: Reset the available keyboard layouts in Cinnamon community.general.dconf: key: "/org/gnome/libgnomekbd/keyboard/layouts" state: absent - name: Disable desktop effects in Cinnamon community.general.dconf: key: "/org/cinnamon/desktop-effects" value: "false" state: present ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **value** string | success, state was "read" | value associated with the requested key **Sample:** 'Default' | ### Authors * Branko Majic (@azaghal)
programming_docs
ansible community.general.one_template – Manages OpenNebula templates community.general.one\_template – Manages OpenNebula templates ============================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.one_template`. New in version 2.4.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages OpenNebula templates. Requirements ------------ The below requirements are needed on the host that executes this module. * pyone Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_password** string | | The password or token for XMLRPC authentication. If not specified then the value of the ONE\_PASSWORD environment variable, if any, is used. aliases: api\_token | | **api\_url** string | | The ENDPOINT URL of the XMLRPC server. If not specified then the value of the ONE\_URL environment variable, if any, is used. aliases: api\_endpoint | | **api\_username** string | | The name of the user for XMLRPC authentication. If not specified then the value of the ONE\_USERNAME environment variable, if any, is used. | | **id** integer | | A *id* of the template you would like to manage. If not set then a new template will be created with the given *name*. | | **name** string | | A *name* of the template you would like to manage. If a template with the given name does not exist it will be created, otherwise it will be managed by this module. | | **state** string | **Choices:*** **present** ← * absent | `present` - state that is used to manage the template. `absent` - delete the template. | | **template** string | | A string containing the template contents. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether to validate the SSL certificates or not. This parameter is ignored if PYTHONHTTPSVERIFY environment variable is used. | | **wait\_timeout** integer | **Default:**300 | Time to wait for the desired state to be reached before timeout, in seconds. | Notes ----- Note * Supports `check_mode`. Note that check mode always returns `changed=true` for existing templates, even if the template would not actually change. Examples -------- ``` - name: Fetch the TEMPLATE by id community.general.one_template: id: 6459 register: result - name: Print the TEMPLATE properties ansible.builtin.debug: var: result - name: Fetch the TEMPLATE by name community.general.one_template: name: tf-prd-users-workerredis-p6379a register: result - name: Create a new or update an existing TEMPLATE community.general.one_template: name: generic-opensuse template: | CONTEXT = [ HOSTNAME = "generic-opensuse" ] CPU = "1" CUSTOM_ATTRIBUTE = "" DISK = [ CACHE = "writeback", DEV_PREFIX = "sd", DISCARD = "unmap", IMAGE = "opensuse-leap-15.2", IMAGE_UNAME = "oneadmin", IO = "threads", SIZE = "" ] MEMORY = "2048" NIC = [ MODEL = "virtio", NETWORK = "testnet", NETWORK_UNAME = "oneadmin" ] OS = [ ARCH = "x86_64", BOOT = "disk0" ] SCHED_REQUIREMENTS = "CLUSTER_ID=\"100\"" VCPU = "2" - name: Delete the TEMPLATE by id community.general.one_template: id: 6459 state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **group\_id** integer | when *state=present* | template's group id **Sample:** 1 | | **group\_name** string | when *state=present* | template's group name **Sample:** one-users | | **id** integer | when *state=present* | template id **Sample:** 153 | | **name** string | when *state=present* | template name **Sample:** app1 | | **owner\_id** integer | when *state=present* | template's owner id **Sample:** 143 | | **owner\_name** string | when *state=present* | template's owner name **Sample:** ansible-test | | **template** dictionary | when *state=present* | the parsed template | ### Authors * Georg Gadinger (@nilsding) ansible community.general.dense – minimal stdout output community.general.dense – minimal stdout output =============================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.dense`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) Synopsis -------- * When in verbose mode it will act the same as the default callback Requirements ------------ The below requirements are needed on the local controller node that executes this callback. * set as stdout in configuration Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **check\_mode\_markers** boolean added in 2.9 of ansible.builtin | **Choices:*** **no** ← * yes | ini entries: [defaults]check\_mode\_markers = no env:ANSIBLE\_CHECK\_MODE\_MARKERS | Toggle to control displaying markers when running in check mode. The markers are `DRY RUN` at the beggining and ending of playbook execution (when calling `ansible-playbook --check`) and `CHECK MODE` as a suffix at every play and task that is run in check mode. | | **display\_failed\_stderr** boolean added in 2.7 of ansible.builtin | **Choices:*** **no** ← * yes | ini entries: [defaults]display\_failed\_stderr = no env:ANSIBLE\_DISPLAY\_FAILED\_STDERR | Toggle to control whether failed and unreachable tasks are displayed to STDERR (vs. STDOUT) | | **display\_ok\_hosts** boolean added in 2.7 of ansible.builtin | **Choices:*** no * **yes** ← | ini entries: [defaults]display\_ok\_hosts = yes env:ANSIBLE\_DISPLAY\_OK\_HOSTS | Toggle to control displaying 'ok' task/host results in a task | | **display\_skipped\_hosts** boolean | **Choices:*** no * **yes** ← | ini entries: [defaults]display\_skipped\_hosts = yes env:DISPLAY\_SKIPPED\_HOSTS Removed in: version 2.12 of ansible.builtin Why: environment variables without "ANSIBLE\_" prefix are deprecated Alternative: the "ANSIBLE\_DISPLAY\_SKIPPED\_HOSTS" environment variable env:ANSIBLE\_DISPLAY\_SKIPPED\_HOSTS | Toggle to control displaying skipped task/host results in a task | | **show\_custom\_stats** boolean | **Choices:*** **no** ← * yes | ini entries: [defaults]show\_custom\_stats = no env:ANSIBLE\_SHOW\_CUSTOM\_STATS | This adds the custom stats set via the set\_stats plugin to the play recap | | **show\_per\_host\_start** boolean added in 2.9 of ansible.builtin | **Choices:*** **no** ← * yes | ini entries: [defaults]show\_per\_host\_start = no env:ANSIBLE\_SHOW\_PER\_HOST\_START | This adds output that shows when a task is started to execute for each host | | **show\_task\_path\_on\_failure** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** ← * yes | ini entries: [defaults]show\_task\_path\_on\_failure = no env:ANSIBLE\_SHOW\_TASK\_PATH\_ON\_FAILURE | When a task fails, display the path to the file containing the failed task and the line number. This information is displayed automatically for every task when running with `-vv` or greater verbosity. | ### Authors * Dag Wieers (@dagwieers) ansible community.general.keycloak_group – Allows administration of Keycloak groups via Keycloak API community.general.keycloak\_group – Allows administration of Keycloak groups via Keycloak API ============================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.keycloak_group`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module allows you to add, remove or modify Keycloak groups via the Keycloak REST API. It requires access to the REST API via OpenID Connect; the user connecting and the client being used must have the requisite access rights. In a default Keycloak installation, admin-cli and an admin user would work, as would a separate client definition with the scope tailored to your needs and a user having the expected roles. * The names of module options are snake\_cased versions of the camelCase ones found in the Keycloak API and its documentation at <https://www.keycloak.org/docs-api/8.0/rest-api/index.html>. * Attributes are multi-valued in the Keycloak API. All attributes are lists of individual values and will be returned that way by this module. You may pass single values for attributes when calling the module, and this will be translated into a list suitable for the API. * When updating a group, where possible provide the group ID to the module. This removes a lookup to the API to translate the name into the group ID. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **attributes** dictionary | | A dict of key/value pairs to set as custom attributes for the group. Values may be single values (e.g. a string) or a list of strings. | | **auth\_client\_id** string | **Default:**"admin-cli" | OpenID Connect *client\_id* to authenticate to the API with. | | **auth\_client\_secret** string | | Client Secret to use in conjunction with *auth\_client\_id* (if required). | | **auth\_keycloak\_url** string / required | | URL to the Keycloak instance. aliases: url | | **auth\_password** string | | Password to authenticate for API access with. aliases: password | | **auth\_realm** string | | Keycloak realm name to authenticate to for API access. | | **auth\_username** string | | Username to authenticate for API access with. aliases: username | | **id** string | | The unique identifier for this group. This parameter is not required for updating or deleting a group but providing it will reduce the number of API calls required. | | **name** string | | Name of the group. This parameter is required only when creating or updating the group. | | **realm** string | **Default:**"master" | They Keycloak realm under which this group resides. | | **state** string | **Choices:*** **present** ← * absent | State of the group. On `present`, the group will be created if it does not yet exist, or updated with the parameters you provide. On `absent`, the group will be removed if it exists. | | **token** string added in 3.0.0 of community.general | | Authentication token for Keycloak API. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Verify TLS certificates (do not disable this in production). | Notes ----- Note * Presently, the *realmRoles*, *clientRoles* and *access* attributes returned by the Keycloak API are read-only for groups. This limitation will be removed in a later version of this module. Examples -------- ``` - name: Create a Keycloak group, authentication with credentials community.general.keycloak_group: name: my-new-kc-group realm: MyCustomRealm state: present auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD delegate_to: localhost - name: Create a Keycloak group, authentication with token community.general.keycloak_group: name: my-new-kc-group realm: MyCustomRealm state: present auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth token: TOKEN delegate_to: localhost - name: Delete a keycloak group community.general.keycloak_group: id: '9d59aa76-2755-48c6-b1af-beb70a82c3cd' state: absent realm: MyCustomRealm auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD delegate_to: localhost - name: Delete a Keycloak group based on name community.general.keycloak_group: name: my-group-for-deletion state: absent auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD delegate_to: localhost - name: Update the name of a Keycloak group community.general.keycloak_group: id: '9d59aa76-2755-48c6-b1af-beb70a82c3cd' name: an-updated-kc-group-name state: present auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD delegate_to: localhost - name: Create a keycloak group with some custom attributes community.general.keycloak_group: auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD name: my-new_group attributes: attrib1: value1 attrib2: value2 attrib3: - with - numerous - individual - list - items delegate_to: localhost ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **group** complex | always | Group representation of the group after module execution (sample is truncated). | | | **access** dictionary | always | A dict describing the accesses you have to this group based on the credentials used. **Sample:** {'manage': True, 'manageMembership': True, 'view': True} | | | **attributes** dictionary | always | Attributes applied to this group **Sample:** {'attr1': ['val1', 'val2', 'val3']} | | | **clientRoles** list / elements=string | always | A list of client-level roles granted to this group | | | **id** string | always | GUID that identifies the group **Sample:** 23f38145-3195-462c-97e7-97041ccea73e | | | **name** string | always | Name of the group **Sample:** grp-test-123 | | | **path** string | always | URI path to the group **Sample:** /grp-test-123 | | | **realmRoles** list / elements=string | always | An array of the realm-level roles granted to this group | | | **subGroups** list / elements=string | always | A list of groups that are children of this group. These groups will have the same parameters as documented here. | ### Authors * Adam Goossens (@adamgoossens) ansible community.general.rax_mon_check – Create or delete a Rackspace Cloud Monitoring check for an existing entity. community.general.rax\_mon\_check – Create or delete a Rackspace Cloud Monitoring check for an existing entity. =============================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rax_mon_check`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Create or delete a Rackspace Cloud Monitoring check associated with an existing rax\_mon\_entity. A check is a specific test or measurement that is performed, possibly from different monitoring zones, on the systems you monitor. Rackspace monitoring module flow | rax\_mon\_entity -> *rax\_mon\_check* -> rax\_mon\_notification -> rax\_mon\_notification\_plan -> rax\_mon\_alarm Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * pyrax Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string | | Rackspace API key, overrides *credentials*. aliases: password | | **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/> | | **check\_type** string / required | | The type of check to create. `remote.` checks may be created on any rax\_mon\_entity. `agent.` checks may only be created on rax\_mon\_entities that have a non-null `agent_id`. Choices for this option are: - `remote.dns` - `remote.ftp-banner` - `remote.http` - `remote.imap-banner` - `remote.mssql-banner` - `remote.mysql-banner` - `remote.ping` - `remote.pop3-banner` - `remote.postgresql-banner` - `remote.smtp-banner` - `remote.smtp` - `remote.ssh` - `remote.tcp` - `remote.telnet-banner` - `agent.filesystem` - `agent.memory` - `agent.load_average` - `agent.cpu` - `agent.disk` - `agent.network` - `agent.plugin` | | **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided. aliases: creds\_file | | **details** dictionary | | Additional details specific to the check type. Must be a hash of strings between 1 and 255 characters long, or an array or object containing 0 to 256 items. | | **disabled** boolean | **Choices:*** **no** ← * yes | If "yes", ensure the check is created, but don't actually use it yet. | | **entity\_id** string / required | | ID of the rax\_mon\_entity to target with this check. | | **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. | | **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. | | **label** string / required | | Defines a label for this check, between 1 and 64 characters long. | | **metadata** dictionary | | Hash of arbitrary key-value pairs to accompany this check if it fires. Keys and values must be strings between 1 and 255 characters long. | | **monitoring\_zones\_poll** string | | Comma-separated list of the names of the monitoring zones the check should run from. Available monitoring zones include mzdfw, mzhkg, mziad, mzlon, mzord and mzsyd. Required for remote.\* checks; prohibited for agent.\* checks. | | **period** integer | | The number of seconds between each time the check is performed. Must be greater than the minimum period set on your account. | | **region** string | | Region to create an instance in. | | **state** string | **Choices:*** **present** ← * absent | Ensure that a check with this `label` exists or does not exist. | | **target\_alias** string | | One of `target\_alias` and `target\_hostname` is required for remote.\* checks, but prohibited for agent.\* checks. Use the corresponding key in the entity's `ip\_addresses` hash to resolve an IP address to target. | | **target\_hostname** string | | One of `target\_hostname` and `target\_alias` is required for remote.\* checks, but prohibited for agent.\* checks. The hostname this check should target. Must be a valid IPv4, IPv6, or FQDN. | | **tenant\_id** string | | The tenant ID used for authentication. | | **tenant\_name** string | | The tenant name used for authentication. | | **timeout** integer | | The number of seconds this check will wait when attempting to collect results. Must be less than the period. | | **username** string | | Rackspace username, overrides *credentials*. | | **validate\_certs** boolean | **Choices:*** no * yes | Whether or not to require SSL validation of API endpoints. aliases: verify\_ssl | Notes ----- Note * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) Examples -------- ``` - name: Create a monitoring check gather_facts: False hosts: local connection: local tasks: - name: Associate a check with an existing entity. community.general.rax_mon_check: credentials: ~/.rax_pub state: present entity_id: "{{ the_entity['entity']['id'] }}" label: the_check check_type: remote.ping monitoring_zones_poll: mziad,mzord,mzdfw details: count: 10 meta: hurf: durf register: the_check ``` ### Authors * Ash Wilson (@smashwilson)
programming_docs
ansible community.general.oneview_fc_network_info – Retrieve the information about one or more of the OneView Fibre Channel Networks community.general.oneview\_fc\_network\_info – Retrieve the information about one or more of the OneView Fibre Channel Networks =============================================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneview_fc_network_info`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Retrieve the information about one or more of the Fibre Channel Networks from OneView. * This module was called `oneview_fc_network_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [community.general.oneview\_fc\_network\_info](#ansible-collections-community-general-oneview-fc-network-info-module) module no longer returns `ansible_facts`! Requirements ------------ The below requirements are needed on the host that executes this module. * hpOneView >= 2.0.1 * python >= 2.7.9 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_version** integer | | OneView API Version. | | **config** path | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional and when used should be present in the host running the ansible commands. If the file path is not provided, the configuration will be loaded from environment variables. For links to example configuration files or how to use the environment variables verify the notes section. | | **hostname** string | | IP address or hostname for the appliance. | | **image\_streamer\_hostname** string | | IP address or hostname for the HPE Image Streamer REST API. | | **name** string | | Fibre Channel Network name. | | **params** dictionary | | List of params to delimit, filter and sort the list of resources. params allowed: - `start`: The first item to return, using 0-based indexing. - `count`: The number of resources to return. - `filter`: A general filter/query string to narrow the list of items returned. - `sort`: The sort order of the returned data set. | | **password** string | | Password for API authentication. | | **username** string | | Username for API authentication. | Notes ----- Note * A sample configuration file for the config parameter can be found at: <https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json> * Check how to use environment variables for configuration at: <https://github.com/HewlettPackard/oneview-ansible#environment-variables> * Additional Playbooks for the HPE OneView Ansible modules can be found at: <https://github.com/HewlettPackard/oneview-ansible/tree/master/examples> * The OneView API version used will directly affect returned and expected fields in resources. Information on setting the desired API version and can be found at: <https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version> Examples -------- ``` - name: Gather information about all Fibre Channel Networks community.general.oneview_fc_network_info: config: /etc/oneview/oneview_config.json delegate_to: localhost register: result - name: Print fetched information about Fibre Channel Networks ansible.builtin.debug: msg: "{{ result.fc_networks }}" - name: Gather paginated, filtered and sorted information about Fibre Channel Networks community.general.oneview_fc_network_info: config: /etc/oneview/oneview_config.json params: start: 1 count: 3 sort: 'name:descending' filter: 'fabricType=FabricAttach' delegate_to: localhost register: result - name: Print fetched information about paginated, filtered and sorted list of Fibre Channel Networks ansible.builtin.debug: msg: "{{ result.fc_networks }}" - name: Gather information about a Fibre Channel Network by name community.general.oneview_fc_network_info: config: /etc/oneview/oneview_config.json name: network name delegate_to: localhost register: result - name: Print fetched information about Fibre Channel Network found by name ansible.builtin.debug: msg: "{{ result.fc_networks }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **fc\_networks** dictionary | Always, but can be null. | Has all the OneView information about the Fibre Channel Networks. | ### Authors * Felipe Bulsoni (@fgbulsoni) * Thiago Miotto (@tmiotto) * Adriane Cardozo (@adriane-cardozo) ansible community.general.manifold – get credentials from Manifold.co community.general.manifold – get credentials from Manifold.co ============================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.manifold`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Retrieves resources’ credentials from Manifold.co Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **\_terms** list / elements=string | | | Optional list of resource labels to lookup on Manifold.co. If no resources are specified, all matched resources will be returned. | | **api\_token** string / required | | env:MANIFOLD\_API\_TOKEN | manifold API token | | **project** string | | | The project label you want to get the resource for. | | **team** string | | | The team label you want to get the resource for. | Examples -------- ``` - name: all available resources ansible.builtin.debug: msg: "{{ lookup('community.general.manifold', api_token='SecretToken') }}" - name: all available resources for a specific project in specific team ansible.builtin.debug: msg: "{{ lookup('community.general.manifold', api_token='SecretToken', project='poject-1', team='team-2') }}" - name: two specific resources ansible.builtin.debug: msg: "{{ lookup('community.general.manifold', 'resource-1', 'resource-2') }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **\_raw** dictionary | success | dictionary of credentials ready to be consumed as environment variables. If multiple resources define the same environment variable(s), the last one returned by the Manifold API will take precedence. | ### Authors * Kyrylo Galanov (!UNKNOWN) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#9ff8fef3fef1f0f9f9b9bcaca8a4b9bcaaada4b9bcaba7a4f8f2fef6f3b9bcaba9a4fcf0f2)> ansible community.general.keycloak_clientscope – Allows administration of Keycloak client_scopes via Keycloak API community.general.keycloak\_clientscope – Allows administration of Keycloak client\_scopes via Keycloak API =========================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.keycloak_clientscope`. New in version 3.4.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module allows you to add, remove or modify Keycloak client\_scopes via the Keycloak REST API. It requires access to the REST API via OpenID Connect; the user connecting and the client being used must have the requisite access rights. In a default Keycloak installation, admin-cli and an admin user would work, as would a separate client definition with the scope tailored to your needs and a user having the expected roles. * The names of module options are snake\_cased versions of the camelCase ones found in the Keycloak API and its documentation at <https://www.keycloak.org/docs-api/8.0/rest-api/index.html>. * Attributes are multi-valued in the Keycloak API. All attributes are lists of individual values and will be returned that way by this module. You may pass single values for attributes when calling the module, and this will be translated into a list suitable for the API. * When updating a client\_scope, where possible provide the client\_scope ID to the module. This removes a lookup to the API to translate the name into the client\_scope ID. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **attributes** dictionary | | A dict of key/value pairs to set as custom attributes for the client\_scope. Values may be single values (for example a string) or a list of strings. | | **auth\_client\_id** string | **Default:**"admin-cli" | OpenID Connect *client\_id* to authenticate to the API with. | | **auth\_client\_secret** string | | Client Secret to use in conjunction with *auth\_client\_id* (if required). | | **auth\_keycloak\_url** string / required | | URL to the Keycloak instance. aliases: url | | **auth\_password** string | | Password to authenticate for API access with. aliases: password | | **auth\_realm** string | | Keycloak realm name to authenticate to for API access. | | **auth\_username** string | | Username to authenticate for API access with. aliases: username | | **description** string | | Description for this client\_scope. This parameter is not required for updating or deleting a client\_scope. | | **id** string | | The unique identifier for this client\_scope. This parameter is not required for updating or deleting a client\_scope but providing it will reduce the number of API calls required. | | **name** string | | Name of the client\_scope. This parameter is required only when creating or updating the client\_scope. | | **protocol** string | **Choices:*** openid-connect * saml * wsfed | Type of client. | | **protocol\_mappers** list / elements=dictionary | | A list of dicts defining protocol mappers for this client. This is 'protocolMappers' in the Keycloak REST API. aliases: protocolMappers | | | **config** dictionary | | Dict specifying the configuration options for the protocol mapper; the contents differ depending on the value of *protocolMapper* and are not documented other than by the source of the mappers and its parent class(es). An example is given below. It is easiest to obtain valid config values by dumping an already-existing protocol mapper configuration through check-mode in the `existing` return value. | | | **id** string | | Usually a UUID specifying the internal ID of this protocol mapper instance. | | | **name** string | | The name of this protocol mapper. | | | **protocol** string | **Choices:*** openid-connect * saml * wsfed | This specifies for which protocol this protocol mapper is active. | | | **protocolMapper** string | | The Keycloak-internal name of the type of this protocol-mapper. While an exhaustive list is impossible to provide since this may be extended through SPIs by the user of Keycloak, by default Keycloak as of 3.4 ships with at least: `docker-v2-allow-all-mapper` `oidc-address-mapper` `oidc-full-name-mapper` `oidc-group-membership-mapper` `oidc-hardcoded-claim-mapper` `oidc-hardcoded-role-mapper` `oidc-role-name-mapper` `oidc-script-based-protocol-mapper` `oidc-sha256-pairwise-sub-mapper` `oidc-usermodel-attribute-mapper` `oidc-usermodel-client-role-mapper` `oidc-usermodel-property-mapper` `oidc-usermodel-realm-role-mapper` `oidc-usersessionmodel-note-mapper` `saml-group-membership-mapper` `saml-hardcode-attribute-mapper` `saml-hardcode-role-mapper` `saml-role-list-mapper` `saml-role-name-mapper` `saml-user-attribute-mapper` `saml-user-property-mapper` `saml-user-session-note-mapper` An exhaustive list of available mappers on your installation can be obtained on the admin console by going to Server Info -> Providers and looking under 'protocol-mapper'. | | **realm** string | **Default:**"master" | They Keycloak realm under which this client\_scope resides. | | **state** string | **Choices:*** **present** ← * absent | State of the client\_scope. On `present`, the client\_scope will be created if it does not yet exist, or updated with the parameters you provide. On `absent`, the client\_scope will be removed if it exists. | | **token** string added in 3.0.0 of community.general | | Authentication token for Keycloak API. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Verify TLS certificates (do not disable this in production). | Examples -------- ``` - name: Create a Keycloak client_scopes, authentication with credentials community.general.keycloak_clientscope: name: my-new-kc-clientscope realm: MyCustomRealm state: present auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD delegate_to: localhost - name: Create a Keycloak client_scopes, authentication with token community.general.keycloak_clientscope: name: my-new-kc-clientscope realm: MyCustomRealm state: present auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth token: TOKEN delegate_to: localhost - name: Delete a keycloak client_scopes community.general.keycloak_clientscope: id: '9d59aa76-2755-48c6-b1af-beb70a82c3cd' state: absent realm: MyCustomRealm auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD delegate_to: localhost - name: Delete a Keycloak client_scope based on name community.general.keycloak_clientscope: name: my-clientscope-for-deletion state: absent auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD delegate_to: localhost - name: Update the name of a Keycloak client_scope community.general.keycloak_clientscope: id: '9d59aa76-2755-48c6-b1af-beb70a82c3cd' name: an-updated-kc-clientscope-name state: present auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD delegate_to: localhost - name: Create a Keycloak client_scope with some custom attributes community.general.keycloak_clientscope: auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD name: my-new_clientscope description: description-of-clientscope protocol: openid-connect protocol_mappers: - config: access.token.claim: True claim.name: "family_name" id.token.claim: True jsonType.label: String user.attribute: lastName userinfo.token.claim: True name: family name protocol: openid-connect protocolMapper: oidc-usermodel-property-mapper - config: attribute.name: Role attribute.nameformat: Basic single: false name: role list protocol: saml protocolMapper: saml-role-list-mapper attributes: attrib1: value1 attrib2: value2 attrib3: - with - numerous - individual - list - items delegate_to: localhost ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **end\_state** dictionary | always | client\_scope representation of client\_scope after module execution (sample is truncated) **Sample:** {'adminUrl': 'http://www.example.com/admin\_url', 'attributes': {'request.object.signature.alg': 'RS256'}} | | **existing** dictionary | always | client\_scope representation of existing client\_scope (sample is truncated) **Sample:** {'adminUrl': 'http://www.example.com/admin\_url', 'attributes': {'request.object.signature.alg': 'RS256'}} | | **msg** string | always | Message as to what action was taken **Sample:** Client\_scope testclientscope has been updated | | **proposed** dictionary | always | client\_scope representation of proposed changes to client\_scope **Sample:** {'clientId': 'test'} | ### Authors * Gaëtan Daubresse (@Gaetan2907) ansible community.general.xenserver_guest_info – Gathers information for virtual machines running on Citrix Hypervisor/XenServer host or pool community.general.xenserver\_guest\_info – Gathers information for virtual machines running on Citrix Hypervisor/XenServer host or pool ======================================================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.xenserver_guest_info`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module can be used to gather essential VM facts. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * XenAPI Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **hostname** string | **Default:**"localhost" | The hostname or IP address of the XenServer host or XenServer pool master. If the value is not specified in the task, the value of environment variable `XENSERVER_HOST` will be used instead. aliases: host, pool | | **name** string | | Name of the VM to gather facts from. VMs running on XenServer do not necessarily have unique names. The module will fail if multiple VMs with same name are found. In case of multiple VMs with same name, use `uuid` to uniquely specify VM to manage. This parameter is case sensitive. aliases: name\_label | | **password** string | | The password to use for connecting to XenServer. If the value is not specified in the task, the value of environment variable `XENSERVER_PASSWORD` will be used instead. aliases: pass, pwd | | **username** string | **Default:**"root" | The username to use for connecting to XenServer. If the value is not specified in the task, the value of environment variable `XENSERVER_USER` will be used instead. aliases: admin, user | | **uuid** string | | UUID of the VM to gather fact of. This is XenServer's unique identifier. It is required if name is not unique. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Allows connection when SSL certificates are not valid. Set to `false` when certificates are not trusted. If the value is not specified in the task, the value of environment variable `XENSERVER_VALIDATE_CERTS` will be used instead. | Notes ----- Note * Minimal supported version of XenServer is 5.6. * Module was tested with XenServer 6.5, 7.1, 7.2, 7.6, Citrix Hypervisor 8.0, XCP-ng 7.6 and 8.0. * To acquire XenAPI Python library, just run `pip install XenAPI` on your Ansible Control Node. The library can also be found inside Citrix Hypervisor/XenServer SDK (downloadable from Citrix website). Copy the XenAPI.py file from the SDK to your Python site-packages on your Ansible Control Node to use it. Latest version of the library can also be acquired from GitHub: <https://raw.githubusercontent.com/xapi-project/xen-api/master/scripts/examples/python/XenAPI/XenAPI.py> * If no scheme is specified in `hostname`, module defaults to `http://` because `https://` is problematic in most setups. Make sure you are accessing XenServer host in trusted environment or use `https://` scheme explicitly. * To use `https://` scheme for `hostname` you have to either import host certificate to your OS certificate store or use `validate_certs: no` which requires XenAPI library from XenServer 7.2 SDK or newer and Python 2.7.9 or newer. * This module was called `xenserver_guest_facts` before Ansible 2.9. The usage did not change. Examples -------- ``` - name: Gather facts community.general.xenserver_guest_info: hostname: "{{ xenserver_hostname }}" username: "{{ xenserver_username }}" password: "{{ xenserver_password }}" name: testvm_11 delegate_to: localhost register: facts ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **instance** dictionary | always | Metadata about the VM **Sample:** {'cdrom': {'type': 'none'}, 'customization\_agent': 'native', 'disks': [{'name': 'testvm\_11-0', 'name\_desc': '', 'os\_device': 'xvda', 'size': 42949672960, 'sr': 'Local storage', 'sr\_uuid': '0af1245e-bdb0-ba33-1446-57a962ec4075', 'vbd\_userdevice': '0'}, {'name': 'testvm\_11-1', 'name\_desc': '', 'os\_device': 'xvdb', 'size': 42949672960, 'sr': 'Local storage', 'sr\_uuid': '0af1245e-bdb0-ba33-1446-57a962ec4075', 'vbd\_userdevice': '1'}], 'domid': '56', 'folder': '', 'hardware': {'memory\_mb': 8192, 'num\_cpu\_cores\_per\_socket': 2, 'num\_cpus': 4}, 'home\_server': '', 'is\_template': False, 'name': 'testvm\_11', 'name\_desc': '', 'networks': [{'gateway': '192.168.0.254', 'gateway6': 'fc00::fffe', 'ip': '192.168.0.200', 'ip6': ['fe80:0000:0000:0000:e9cb:625a:32c5:c291', 'fc00:0000:0000:0000:0000:0000:0000:0001'], 'mac': 'ba:91:3a:48:20:76', 'mtu': '1500', 'name': 'Pool-wide network associated with eth1', 'netmask': '255.255.255.128', 'prefix': '25', 'prefix6': '64', 'vif\_device': '0'}], 'other\_config': {'base\_template\_name': 'Windows Server 2016 (64-bit)', 'import\_task': 'OpaqueRef:e43eb71c-45d6-5351-09ff-96e4fb7d0fa5', 'install-methods': 'cdrom', 'instant': 'true', 'mac\_seed': 'f83e8d8a-cfdc-b105-b054-ef5cb416b77e'}, 'platform': {'acpi': '1', 'apic': 'true', 'cores-per-socket': '2', 'device\_id': '0002', 'hpet': 'true', 'nx': 'true', 'pae': 'true', 'timeoffset': '-25200', 'vga': 'std', 'videoram': '8', 'viridian': 'true', 'viridian\_reference\_tsc': 'true', 'viridian\_time\_ref\_count': 'true'}, 'state': 'poweredon', 'uuid': 'e3c0b2d5-5f05-424e-479c-d3df8b3e7cda', 'xenstore\_data': {'vm-data': ''}} | ### Authors * Bojan Vitnik (@bvitnik) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#d2b0a4bba6bcbbb9f4f1e1e5e9f4f1e7e0e9f4f1e6eae9bfb3bbbca1a6a0b7b3bff4f1e6e4e9a0a1)>
programming_docs
ansible community.general.aix_filesystem – Configure LVM and NFS file systems for AIX community.general.aix\_filesystem – Configure LVM and NFS file systems for AIX ============================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.aix_filesystem`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module creates, removes, mount and unmount LVM and NFS file system for AIX using `/etc/filesystems`. * For LVM file systems is possible to resize a file system. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **account\_subsystem** boolean | **Choices:*** **no** ← * yes | Specifies whether the file system is to be processed by the accounting subsystem. | | **attributes** list / elements=string | **Default:**"agblksize=\u00274096\u0027,isnapshot=\u0027no\u0027" | Specifies attributes for files system separated by comma. | | **auto\_mount** boolean | **Choices:*** no * **yes** ← | File system is automatically mounted at system restart. | | **device** string | | Logical volume (LV) device name or remote export device to create a NFS file system. It is used to create a file system on an already existing logical volume or the exported NFS file system. If not mentioned a new logical volume name will be created following AIX standards (LVM). | | **filesystem** string / required | | Specifies the mount point, which is the directory where the file system will be mounted. | | **fs\_type** string | **Default:**"jfs2" | Specifies the virtual file system type. | | **mount\_group** string | | Specifies the mount group. | | **nfs\_server** string | | Specifies a Network File System (NFS) server. | | **permissions** string | **Choices:*** ro * **rw** ← | Set file system permissions. `rw` (read-write) or `ro` (read-only). | | **rm\_mount\_point** boolean | **Choices:*** **no** ← * yes | Removes the mount point directory when used with state `absent`. | | **size** string | | Specifies the file system size. For already `present` it will be resized. 512-byte blocks, Megabytes or Gigabytes. If the value has M specified it will be in Megabytes. If the value has G specified it will be in Gigabytes. If no M or G the value will be 512-byte blocks. If "+" is specified in begin of value, the value will be added. If "-" is specified in begin of value, the value will be removed. If "+" or "-" is not specified, the total value will be the specified. Size will respects the LVM AIX standards. | | **state** string | **Choices:*** absent * mounted * **present** ← * unmounted | Controls the file system state. `present` check if file system exists, creates or resize. `absent` removes existing file system if already `unmounted`. `mounted` checks if the file system is mounted or mount the file system. `unmounted` check if the file system is unmounted or unmount the file system. | | **vg** string | | Specifies an existing volume group (VG). | Notes ----- Note * For more `attributes`, please check “crfs” AIX manual. Examples -------- ``` - name: Create filesystem in a previously defined logical volume. community.general.aix_filesystem: device: testlv community.general.filesystem: /testfs state: present - name: Creating NFS filesystem from nfshost. community.general.aix_filesystem: device: /home/ftp nfs_server: nfshost community.general.filesystem: /home/ftp state: present - name: Creating a new file system without a previously logical volume. community.general.aix_filesystem: community.general.filesystem: /newfs size: 1G state: present vg: datavg - name: Unmounting /testfs. community.general.aix_filesystem: community.general.filesystem: /testfs state: unmounted - name: Resizing /mksysb to +512M. community.general.aix_filesystem: community.general.filesystem: /mksysb size: +512M state: present - name: Resizing /mksysb to 11G. community.general.aix_filesystem: community.general.filesystem: /mksysb size: 11G state: present - name: Resizing /mksysb to -2G. community.general.aix_filesystem: community.general.filesystem: /mksysb size: -2G state: present - name: Remove NFS filesystem /home/ftp. community.general.aix_filesystem: community.general.filesystem: /home/ftp rm_mount_point: yes state: absent - name: Remove /newfs. community.general.aix_filesystem: community.general.filesystem: /newfs rm_mount_point: yes state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **changed** boolean | always | Return changed for aix\_filesystems actions as true or false. | | **msg** string | always | Return message regarding the action. | ### Authors * Kairo Araujo (@kairoaraujo) ansible community.general.pip_package_info – pip package information community.general.pip\_package\_info – pip package information ============================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pip_package_info`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Return information about installed pip packages Requirements ------------ The below requirements are needed on the host that executes this module. * The requested pip executables must be installed on the target. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **clients** list / elements=path | **Default:**["pip"] | A list of the pip executables that will be used to get the packages. They can be supplied with the full path or just the executable name, i.e `pip3.7`. | Examples -------- ``` - name: Just get the list from default pip community.general.pip_package_info: - name: Get the facts for default pip, pip2 and pip3.6 community.general.pip_package_info: clients: ['pip', 'pip2', 'pip3.6'] - name: Get from specific paths (virtualenvs?) community.general.pip_package_info: clients: '/home/me/projec42/python/pip3.5' ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **packages** dictionary | always | a dictionary of installed package data | | | **python** dictionary | always | A dictionary with each pip client which then contains a list of dicts with python package information **Sample:** {'packages': {'pip': {'Babel': [{'name': 'Babel', 'source': 'pip', 'version': '2.6.0'}], 'Flask': [{'name': 'Flask', 'source': 'pip', 'version': '1.0.2'}], 'Flask-SQLAlchemy': [{'name': 'Flask-SQLAlchemy', 'source': 'pip', 'version': '2.3.2'}], 'Jinja2': [{'name': 'Jinja2', 'source': 'pip', 'version': '2.10'}]}}} | ### Authors * Matthew Jones (@matburt) * Brian Coca (@bcoca) * Adam Miller (@maxamillion) ansible community.general.xbps – Manage packages with XBPS community.general.xbps – Manage packages with XBPS ================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.xbps`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage packages with the XBPS package manager. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **name** list / elements=string | | Name of the package to install, upgrade, or remove. aliases: pkg, package | | **recurse** boolean | **Choices:*** **no** ← * yes | When removing a package, also remove its dependencies, provided that they are not required by other packages and were not explicitly installed by a user. | | **state** string | **Choices:*** **present** ← * absent * latest * installed * removed | Desired state of the package. | | **update\_cache** boolean | **Choices:*** no * **yes** ← | Whether or not to refresh the master package lists. This can be run as part of a package installation or as a separate step. Alias `update-cache` has been deprecated and will be removed in community.general 5.0.0. aliases: update-cache | | **upgrade** boolean | **Choices:*** **no** ← * yes | Whether or not to upgrade whole system | | **upgrade\_xbps** boolean added in 0.2.0 of community.general | **Choices:*** no * **yes** ← | Whether or not to upgrade the xbps package when necessary. Before installing new packages, xbps requires the user to update the xbps package itself. Thus when this option is set to `no`, upgrades and installations will fail when xbps is not up to date. | Examples -------- ``` - name: Install package foo (automatically updating the xbps package if needed) community.general.xbps: name=foo state=present - name: Upgrade package foo community.general.xbps: name=foo state=latest update_cache=yes - name: Remove packages foo and bar community.general.xbps: name=foo,bar state=absent - name: Recursively remove package foo community.general.xbps: name=foo state=absent recurse=yes - name: Update package cache community.general.xbps: update_cache=yes - name: Upgrade packages community.general.xbps: upgrade=yes - name: Install a package, failing if the xbps package is out of date community.general.xbps: name: foo state: present upgrade_xbps: no ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **msg** string | success | Message about results **Sample:** System Upgraded | | **packages** list / elements=string | success | Packages that are affected/would be affected **Sample:** ['ansible'] | ### Authors * Dino Occhialini (@dinoocch) * Michael Aldridge (@the-maldridge) ansible community.general.sensu_silence – Manage Sensu silence entries community.general.sensu\_silence – Manage Sensu silence entries =============================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.sensu_silence`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Create and clear (delete) a silence entries via the Sensu API for subscriptions and checks. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **check** string | | Specifies the check which the silence entry applies to. | | **creator** string | | Specifies the entity responsible for this entry. | | **expire** integer | | If specified, the silence entry will be automatically cleared after this number of seconds. | | **expire\_on\_resolve** boolean | **Choices:*** no * yes | If specified as true, the silence entry will be automatically cleared once the condition it is silencing is resolved. | | **reason** string | | If specified, this free-form string is used to provide context or rationale for the reason this silence entry was created. | | **state** string | **Choices:*** **present** ← * absent | Specifies to create or clear (delete) a silence entry via the Sensu API | | **subscription** string / required | | Specifies the subscription which the silence entry applies to. To create a silence entry for a client prepend `client:` to client name. Example - `client:server1.example.dev` | | **url** string | **Default:**"http://127.0.01:4567" | Specifies the URL of the Sensu monitoring host server. | Examples -------- ``` # Silence ALL checks for a given client - name: Silence server1.example.dev community.general.sensu_silence: subscription: client:server1.example.dev creator: "{{ ansible_user_id }}" reason: Performing maintenance # Silence specific check for a client - name: Silence CPU_Usage check for server1.example.dev community.general.sensu_silence: subscription: client:server1.example.dev check: CPU_Usage creator: "{{ ansible_user_id }}" reason: Investigation alert issue # Silence multiple clients from a dict silence: server1.example.dev: reason: 'Deployment in progress' server2.example.dev: reason: 'Deployment in progress' - name: Silence several clients from a dict community.general.sensu_silence: subscription: "client:{{ item.key }}" reason: "{{ item.value.reason }}" creator: "{{ ansible_user_id }}" with_dict: "{{ silence }}" ``` ### Authors * Steven Bambling (@smbambling) ansible community.general.consul – Add, modify & delete services within a consul cluster. community.general.consul – Add, modify & delete services within a consul cluster. ================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.consul`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Registers services and checks for an agent with a consul cluster. A service is some process running on the agent node that should be advertised by consul’s discovery mechanism. It may optionally supply a check definition, a periodic service test to notify the consul cluster of service’s health. * Checks may also be registered per node e.g. disk usage, or cpu usage and notify the health of the entire node to the cluster. Service level checks do not require a check name or id as these are derived by Consul from the Service name and id respectively by appending ‘service:’ Node level checks require a *check\_name* and optionally a *check\_id*. * Currently, there is no complete way to retrieve the script, interval or ttl metadata for a registered check. Without this metadata it is not possible to tell if the data supplied with ansible represents a change to a check. As a result this does not attempt to determine changes and will always report a changed occurred. An API method is planned to supply this metadata so at that stage change management will be added. * See <http://consul.io> for more details. Requirements ------------ The below requirements are needed on the host that executes this module. * python-consul * requests Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **check\_id** string | | an ID for the service check. If *state=absent*, defaults to *check\_name*. Ignored if part of a service definition. | | **check\_name** string | | a name for the service check. Required if standalone, ignored if part of service definition. | | **host** string | **Default:**"localhost" | host of the consul agent defaults to localhost | | **http** string | | checks can be registered with an HTTP endpoint. This means that consul will check that the http endpoint returns a successful HTTP status. *interval* must also be provided with this option. | | **interval** string | | the interval at which the service check will be run. This is a number with a s or m suffix to signify the units of seconds or minutes e.g `15s` or `1m`. If no suffix is supplied, m will be used by default e.g. `1` will be `1m`. Required if the *script* parameter is specified. | | **notes** string | | Notes to attach to check when registering it. | | **port** integer | **Default:**8500 | the port on which the consul agent is running | | **scheme** string | **Default:**"http" | the protocol scheme on which the consul agent is running | | **script** string | | the script/command that will be run periodically to check the health of the service. Scripts require *interval* and vice versa. | | **service\_address** string | | the address to advertise that the service will be listening on. This value will be passed as the *address* parameter to Consul's [/v1/agent/service/register](https://docs.ansible.com/v1/agent/service/register) API method, so refer to the Consul API documentation for further details. | | **service\_id** string | | the ID for the service, must be unique per node. If *state=absent*, defaults to the service name if supplied. | | **service\_name** string | | Unique name for the service on a node, must be unique per node, required if registering a service. May be omitted if registering a node level check | | **service\_port** integer | | the port on which the service is listening. Can optionally be supplied for registration of a service, i.e. if *service\_name* or *service\_id* is set | | **state** string | **Choices:*** **present** ← * absent | register or deregister the consul service, defaults to present | | **tags** list / elements=string | | tags that will be attached to the service registration. | | **tcp** string added in 1.3.0 of community.general | | Checks can be registered with a TCP port. This means that consul will check if the connection attempt to that port is successful (that is, the port is currently accepting connections). The format is `host:port`, for example `localhost:80`. *interval* must also be provided with this option. | | **timeout** string | | A custom HTTP check timeout. The consul default is 10 seconds. Similar to the interval this is a number with a `s` or `m` suffix to signify the units of seconds or minutes, e.g. `15s` or `1m`. | | **token** string | | the token key identifying an ACL rule set. May be required to register services. | | **ttl** string | | checks can be registered with a ttl instead of a *script* and *interval* this means that the service will check in with the agent before the ttl expires. If it doesn't the check will be considered failed. Required if registering a check and the script an interval are missing Similar to the interval this is a number with a s or m suffix to signify the units of seconds or minutes e.g `15s` or `1m`. If no suffix is supplied, `m` will be used by default e.g. `1` will be `1m` | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | whether to verify the TLS certificate of the consul agent | Examples -------- ``` - name: Register nginx service with the local consul agent community.general.consul: service_name: nginx service_port: 80 - name: Register nginx service with curl check community.general.consul: service_name: nginx service_port: 80 script: curl http://localhost interval: 60s - name: register nginx with a tcp check community.general.consul: service_name: nginx service_port: 80 interval: 60s tcp: localhost:80 - name: Register nginx with an http check community.general.consul: service_name: nginx service_port: 80 interval: 60s http: http://localhost:80/status - name: Register external service nginx available at 10.1.5.23 community.general.consul: service_name: nginx service_port: 80 service_address: 10.1.5.23 - name: Register nginx with some service tags community.general.consul: service_name: nginx service_port: 80 tags: - prod - webservers - name: Remove nginx service community.general.consul: service_name: nginx state: absent - name: Register celery worker service community.general.consul: service_name: celery-worker tags: - prod - worker - name: Create a node level check to test disk usage community.general.consul: check_name: Disk usage check_id: disk_usage script: /opt/disk_usage.py interval: 5m - name: Register an http check against a service that's already registered community.general.consul: check_name: nginx-check2 check_id: nginx-check2 service_id: nginx interval: 60s http: http://localhost:80/morestatus ``` ### Authors * Steve Gargan (@sgargan)
programming_docs
ansible community.general.ibm_sa_host_ports – Add host ports on IBM Spectrum Accelerate Family storage systems. community.general.ibm\_sa\_host\_ports – Add host ports on IBM Spectrum Accelerate Family storage systems. ========================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ibm_sa_host_ports`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module adds ports to or removes them from the hosts on IBM Spectrum Accelerate Family storage systems. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * pyxcli Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **endpoints** string / required | | The hostname or management IP of Spectrum Accelerate storage system. | | **fcaddress** string | | Fiber channel address. | | **host** string / required | | Host name. | | **iscsi\_name** string | | iSCSI initiator name. | | **num\_of\_visible\_targets** string | | Number of visible targets. | | **password** string / required | | Password for username on the spectrum accelerate storage system. | | **state** string | **Choices:*** **present** ← * absent | Host ports state. | | **username** string / required | | Management user on the spectrum accelerate storage system. | Notes ----- Note * This module requires pyxcli python library. Use ‘pip install pyxcli’ in order to get pyxcli. Examples -------- ``` - name: Add ports for host. community.general.ibm_sa_host_ports: host: test_host iscsi_name: iqn.1994-05.com*** username: admin password: secret endpoints: hostdev-system state: present - name: Remove ports for host. community.general.ibm_sa_host_ports: host: test_host iscsi_name: iqn.1994-05.com*** username: admin password: secret endpoints: hostdev-system state: absent ``` ### Authors * Tzur Eliyahu (@tzure) ansible community.general.rax_identity – Load Rackspace Cloud Identity community.general.rax\_identity – Load Rackspace Cloud Identity =============================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rax_identity`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Verifies Rackspace Cloud credentials and returns identity information Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * pyrax Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string | | Rackspace API key, overrides *credentials*. aliases: password | | **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/> | | **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided. aliases: creds\_file | | **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. | | **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. | | **region** string | | Region to create an instance in. | | **state** string | **Choices:*** **present** ← | Indicate desired state of the resource | | **tenant\_id** string | | The tenant ID used for authentication. | | **tenant\_name** string | | The tenant name used for authentication. | | **username** string | | Rackspace username, overrides *credentials*. | | **validate\_certs** boolean | **Choices:*** no * yes | Whether or not to require SSL validation of API endpoints. aliases: verify\_ssl | Notes ----- Note * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) Examples -------- ``` - name: Load Rackspace Cloud Identity gather_facts: False hosts: local connection: local tasks: - name: Load Identity local_action: module: rax_identity credentials: ~/.raxpub region: DFW register: rackspace_identity ``` ### Authors * Christopher H. Laco (@claco) * Matt Martz (@sivel) ansible community.general.spectrum_device – Creates/deletes devices in CA Spectrum. community.general.spectrum\_device – Creates/deletes devices in CA Spectrum. ============================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.spectrum_device`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module allows you to create and delete devices in CA Spectrum <https://www.ca.com/us/products/ca-spectrum.html>. * Tested on CA Spectrum 9.4.2, 10.1.1 and 10.2.1 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **agentport** integer | **Default:**161 | UDP port used for SNMP discovery. | | **community** string / required | | SNMP community used for device discovery. Required when `state=present`. | | **device** string / required | | IP address of the device. If a hostname is given, it will be resolved to the IP address. aliases: host, name | | **landscape** string / required | | Landscape handle of the SpectroServer to which add or remove the device. | | **state** string | **Choices:*** **present** ← * absent | On `present` creates the device when it does not exist. On `absent` removes the device when it exists. | | **url** string / required | | HTTP, HTTPS URL of the Oneclick server in the form (http|https)://host.domain[:port] aliases: oneclick\_url | | **url\_password** string / required | | Oneclick user password. aliases: oneclick\_password | | **url\_username** string / required | | Oneclick user name. aliases: oneclick\_user | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | if `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | Notes ----- Note * The devices will be created inside the *Universe* container of the specified landscape. * All the operations will be performed only on the specified landscape. Examples -------- ``` - name: Add device to CA Spectrum local_action: module: spectrum_device device: '{{ ansible_host }}' community: secret landscape: '0x100000' oneclick_url: http://oneclick.example.com:8080 oneclick_user: username oneclick_password: password state: present - name: Remove device from CA Spectrum local_action: module: spectrum_device device: '{{ ansible_host }}' landscape: '{{ landscape_handle }}' oneclick_url: http://oneclick.example.com:8080 oneclick_user: username oneclick_password: password use_proxy: no state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **device** dictionary | success | device data when state = present **Sample:** {'address': '10.10.5.1', 'landscape': '0x100000', 'model\_handle': '0x1007ab'} | ### Authors * Renato Orgito (@orgito) ansible community.general.rax_mon_entity – Create or delete a Rackspace Cloud Monitoring entity community.general.rax\_mon\_entity – Create or delete a Rackspace Cloud Monitoring entity ========================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rax_mon_entity`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Create or delete a Rackspace Cloud Monitoring entity, which represents a device to monitor. Entities associate checks and alarms with a target system and provide a convenient, centralized place to store IP addresses. Rackspace monitoring module flow | *rax\_mon\_entity* -> rax\_mon\_check -> rax\_mon\_notification -> rax\_mon\_notification\_plan -> rax\_mon\_alarm Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * pyrax Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **agent\_id** string | | Rackspace monitoring agent on the target device to which this entity is bound. Necessary to collect `agent.` rax\_mon\_checks against this entity. | | **api\_key** string | | Rackspace API key, overrides *credentials*. aliases: password | | **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/> | | **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided. aliases: creds\_file | | **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. | | **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. | | **label** string / required | | Defines a name for this entity. Must be a non-empty string between 1 and 255 characters long. | | **metadata** dictionary | | Hash of arbitrary `name`, `value` pairs that are passed to associated rax\_mon\_alarms. Names and values must all be between 1 and 255 characters long. | | **named\_ip\_addresses** dictionary | | Hash of IP addresses that may be referenced by name by rax\_mon\_checks added to this entity. Must be a dictionary of with keys that are names between 1 and 64 characters long, and values that are valid IPv4 or IPv6 addresses. | | **region** string | | Region to create an instance in. | | **state** string | **Choices:*** **present** ← * absent | Ensure that an entity with this `name` exists or does not exist. | | **tenant\_id** string | | The tenant ID used for authentication. | | **tenant\_name** string | | The tenant name used for authentication. | | **username** string | | Rackspace username, overrides *credentials*. | | **validate\_certs** boolean | **Choices:*** no * yes | Whether or not to require SSL validation of API endpoints. aliases: verify\_ssl | Notes ----- Note * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) Examples -------- ``` - name: Entity example gather_facts: False hosts: local connection: local tasks: - name: Ensure an entity exists community.general.rax_mon_entity: credentials: ~/.rax_pub state: present label: my_entity named_ip_addresses: web_box: 192.0.2.4 db_box: 192.0.2.5 meta: hurf: durf register: the_entity ``` ### Authors * Ash Wilson (@smashwilson) ansible community.general.listen_ports_facts – Gather facts on processes listening on TCP and UDP ports. community.general.listen\_ports\_facts – Gather facts on processes listening on TCP and UDP ports. ================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.listen_ports_facts`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Examples](#examples) * [Returned Facts](#returned-facts) Synopsis -------- * Gather facts on processes listening on TCP and UDP ports using netstat command. * This module currently supports Linux only. Requirements ------------ The below requirements are needed on the host that executes this module. * netstat Examples -------- ``` - name: Gather facts on listening ports community.general.listen_ports_facts: - name: TCP whitelist violation ansible.builtin.debug: msg: TCP port {{ item.port }} by pid {{ item.pid }} violates the whitelist vars: tcp_listen_violations: "{{ ansible_facts.tcp_listen | selectattr('port', 'in', tcp_whitelist) | list }}" tcp_whitelist: - 22 - 25 loop: "{{ tcp_listen_violations }}" - name: List TCP ports ansible.builtin.debug: msg: "{{ ansible_facts.tcp_listen | map(attribute='port') | sort | list }}" - name: List UDP ports ansible.builtin.debug: msg: "{{ ansible_facts.udp_listen | map(attribute='port') | sort | list }}" - name: List all ports ansible.builtin.debug: msg: "{{ (ansible_facts.tcp_listen + ansible_facts.udp_listen) | map(attribute='port') | unique | sort | list }}" ``` Returned Facts -------------- Facts returned by this module are added/updated in the `hostvars` host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them. | Fact | Returned | Description | | --- | --- | --- | | **tcp\_listen** list / elements=string | if TCP servers were found | A list of processes that are listening on a TCP port. | | | **address** string / elements=string | always | The address the server is listening on. **Sample:** 0.0.0.0 | | | **name** string / elements=string | if user permissions allow | The name of the listening process. **Sample:** mysqld | | | **pid** integer / elements=string | always | The pid of the listening process. **Sample:** 1223 | | | **port** integer / elements=string | always | The port the server is listening on. **Sample:** 3306 | | | **protocol** string / elements=string | always | The network protocol of the server. **Sample:** tcp | | | **stime** string / elements=string | always | The start time of the listening process. **Sample:** Thu Feb 2 13:29:45 2017 | | | **user** string / elements=string | always | The user who is running the listening process. **Sample:** mysql | | **udp\_listen** list / elements=string | if UDP servers were found | A list of processes that are listening on a UDP port. | | | **address** string / elements=string | always | The address the server is listening on. **Sample:** 0.0.0.0 | | | **name** string / elements=string | if user permissions allow | The name of the listening process. **Sample:** rsyslogd | | | **pid** integer / elements=string | always | The pid of the listening process. **Sample:** 609 | | | **port** integer / elements=string | always | The port the server is listening on. **Sample:** 514 | | | **protocol** string / elements=string | always | The network protocol of the server. **Sample:** udp | | | **stime** string / elements=string | always | The start time of the listening process. **Sample:** Thu Feb 2 13:29:45 2017 | | | **user** string / elements=string | always | The user who is running the listening process. **Sample:** root | ### Authors * Nathan Davison (@ndavison) ansible community.general.launchd – Manage macOS services community.general.launchd – Manage macOS services ================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.launchd`. New in version 1.0.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage launchd services on target macOS hosts. Requirements ------------ The below requirements are needed on the host that executes this module. * A system managed by launchd * The plistlib python library Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **enabled** boolean | **Choices:*** no * yes | Whether the service should start on boot. **At least one of state and enabled are required.** | | **force\_stop** boolean | **Choices:*** **no** ← * yes | Whether the service should not be restarted automatically by launchd. Services might have the 'KeepAlive' attribute set to true in a launchd configuration. In case this is set to true, stopping a service will cause that launchd starts the service again. Set this option to `yes` to let this module change the 'KeepAlive' attribute to false. | | **name** string / required | | Name of the service. | | **state** string | **Choices:*** reloaded * restarted * started * stopped * unloaded | `started`/`stopped` are idempotent actions that will not run commands unless necessary. Launchd does not support `restarted` nor `reloaded` natively. These will trigger a stop/start (restarted) or an unload/load (reloaded). `restarted` unloads and loads the service before start to ensure that the latest job definition (plist) is used. `reloaded` unloads and loads the service to ensure that the latest job definition (plist) is used. Whether a service is started or stopped depends on the content of the definition file. | Notes ----- Note * A user must privileged to manage services using this module. Examples -------- ``` - name: Make sure spotify webhelper is started community.general.launchd: name: com.spotify.webhelper state: started - name: Deploy custom memcached job definition template: src: org.memcached.plist.j2 dest: /Library/LaunchDaemons/org.memcached.plist - name: Run memcached community.general.launchd: name: org.memcached state: started - name: Stop memcached community.general.launchd: name: org.memcached state: stopped - name: Stop memcached community.general.launchd: name: org.memcached state: stopped force_stop: yes - name: Restart memcached community.general.launchd: name: org.memcached state: restarted - name: Unload memcached community.general.launchd: name: org.memcached state: unloaded ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **status** dictionary | always | Metadata about service status **Sample:** {'current\_pid': '-', 'current\_state': 'stopped', 'previous\_pid': '82636', 'previous\_state': 'running'} | ### Authors * Martin Migasiewicz (@martinm82)
programming_docs
ansible community.general.manageiq_user – Management of users in ManageIQ. community.general.manageiq\_user – Management of users in ManageIQ. =================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.manageiq_user`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * The manageiq\_user module supports adding, updating and deleting users in ManageIQ. Requirements ------------ The below requirements are needed on the host that executes this module. * manageiq-client <https://github.com/ManageIQ/manageiq-api-client-python/> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **email** string | | The users' E-mail address. | | **group** string | | The name of the group to which the user belongs. | | **manageiq\_connection** dictionary | | ManageIQ connection configuration information. | | | **ca\_cert** string | | The path to a CA bundle file or directory with certificates. defaults to None. aliases: ca\_bundle\_path | | | **password** string | | ManageIQ password. `MIQ_PASSWORD` env var if set. otherwise, required if no token is passed in. | | | **token** string | | ManageIQ token. `MIQ_TOKEN` env var if set. otherwise, required if no username or password is passed in. | | | **url** string | | ManageIQ environment url. `MIQ_URL` env var if set. otherwise, it is required to pass it. | | | **username** string | | ManageIQ username. `MIQ_USERNAME` env var if set. otherwise, required if no token is passed in. | | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether SSL certificates should be verified for HTTPS requests. defaults to True. aliases: verify\_ssl | | **name** string | | The users' full name. | | **password** string | | The users' password. | | **state** string | **Choices:*** absent * **present** ← | absent - user should not exist, present - user should be. | | **update\_password** string | **Choices:*** **always** ← * on\_create | `always` will update passwords unconditionally. `on_create` will only set the password for a newly created user. | | **userid** string / required | | The unique userid in manageiq, often mentioned as username. | Examples -------- ``` - name: Create a new user in ManageIQ community.general.manageiq_user: userid: 'jdoe' name: 'Jane Doe' password: 'VerySecret' group: 'EvmGroup-user' email: '[email protected]' manageiq_connection: url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' validate_certs: False - name: Create a new user in ManageIQ using a token community.general.manageiq_user: userid: 'jdoe' name: 'Jane Doe' password: 'VerySecret' group: 'EvmGroup-user' email: '[email protected]' manageiq_connection: url: 'http://127.0.0.1:3000' token: 'sometoken' validate_certs: False - name: Delete a user in ManageIQ community.general.manageiq_user: state: 'absent' userid: 'jdoe' manageiq_connection: url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' validate_certs: False - name: Delete a user in ManageIQ using a token community.general.manageiq_user: state: 'absent' userid: 'jdoe' manageiq_connection: url: 'http://127.0.0.1:3000' token: 'sometoken' validate_certs: False - name: Update email of user in ManageIQ community.general.manageiq_user: userid: 'jdoe' email: '[email protected]' manageiq_connection: url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' validate_certs: False - name: Update email of user in ManageIQ using a token community.general.manageiq_user: userid: 'jdoe' email: '[email protected]' manageiq_connection: url: 'http://127.0.0.1:3000' token: 'sometoken' validate_certs: False ``` ### Authors * Daniel Korn (@dkorn) ansible community.general.jira – create and modify issues in a JIRA instance community.general.jira – create and modify issues in a JIRA instance ==================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.jira`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Create and modify issues in a JIRA instance. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **account\_id** string added in 2.5.0 of community.general | | Sets the account identifier for the assignee when *operation* is `create`, `transition` or `edit`. Note that JIRA may not allow changing field values on specific transitions or states. | | **assignee** string | | Sets the the assignee when *operation* is `create`, `transition` or `edit`. Recent versions of JIRA no longer accept a user name as a user identifier. In that case, use *account\_id* instead. Note that JIRA may not allow changing field values on specific transitions or states. | | **attachment** dictionary added in 2.5.0 of community.general | | Information about the attachment being uploaded. | | | **content** string | | The Base64 encoded contents of the file to attach. If not specified, the contents of *filename* will be used instead. | | | **filename** path / required | | The path to the file to upload (from the remote node) or, if *content* is specified, the filename to use for the attachment. | | | **mimetype** string | | The MIME type to supply for the upload. If not specified, best-effort detection will be done. | | **comment** string | | The comment text to add. Note that JIRA may not allow changing field values on specific transitions or states. | | **comment\_visibility** dictionary added in 3.2.0 of community.general | | Used to specify comment comment visibility. See <https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-comments/#api-rest-api-2-issue-issueidorkey-comment-post> for details. | | | **type** string / required | **Choices:*** group * role | Use type to specify which of the JIRA visibility restriction types will be used. | | | **value** string / required | | Use value to specify value corresponding to the type of visibility restriction. For example name of the group or role. | | **description** string | | The issue description, where appropriate. Note that JIRA may not allow changing field values on specific transitions or states. | | **fields** dictionary | | This is a free-form data structure that can contain arbitrary data. This is passed directly to the JIRA REST API (possibly after merging with other required data, as when passed to create). See examples for more information, and the JIRA REST API for the structure required for various fields. Note that JIRA may not allow changing field values on specific transitions or states. | | **inwardissue** string | | Set issue from which link will be created. | | **issue** string | | An existing issue key to operate on. aliases: ticket | | **issuetype** string | | The issue type, for issue creation. | | **jql** string added in 0.2.0 of community.general | | Query JIRA in JQL Syntax, e.g. 'CMDB Hostname'='test.example.com'. | | **linktype** string | | Set type of link, when action 'link' selected. | | **maxresults** integer added in 0.2.0 of community.general | | Limit the result of *operation=search*. If no value is specified, the default jira limit will be used. Used when *operation=search* only, ignored otherwise. | | **operation** string / required | **Choices:*** attach * comment * create * edit * fetch * link * search * transition * update | The operation to perform. aliases: command | | **outwardissue** string | | Set issue to which link will be created. | | **password** string / required | | The password to log-in with. | | **project** string | | The project for this operation. Required for issue creation. | | **status** string | | Only used when *operation* is `transition`, and a bit of a misnomer, it actually refers to the transition name. | | **summary** string | | The issue summary, where appropriate. Note that JIRA may not allow changing field values on specific transitions or states. | | **timeout** float | **Default:**10 | Set timeout, in seconds, on requests to JIRA API. | | **uri** string / required | | Base URI for the JIRA instance. | | **username** string / required | | The username to log-in with. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Require valid SSL certificates (set to `false` if you'd like to use self-signed certificates) | Notes ----- Note * Currently this only works with basic-auth. * To use with JIRA Cloud, pass the login e-mail as the *username* and the API token as *password*. Examples -------- ``` # Create a new issue and add a comment to it: - name: Create an issue community.general.jira: uri: '{{ server }}' username: '{{ user }}' password: '{{ pass }}' project: ANS operation: create summary: Example Issue description: Created using Ansible issuetype: Task args: fields: customfield_13225: "test" customfield_12931: {"value": "Test"} register: issue - name: Comment on issue community.general.jira: uri: '{{ server }}' username: '{{ user }}' password: '{{ pass }}' issue: '{{ issue.meta.key }}' operation: comment comment: A comment added by Ansible - name: Comment on issue with restricted visibility community.general.jira: uri: '{{ server }}' username: '{{ user }}' password: '{{ pass }}' issue: '{{ issue.meta.key }}' operation: comment comment: A comment added by Ansible comment_visibility: type: role value: Developers # Assign an existing issue using edit - name: Assign an issue using free-form fields community.general.jira: uri: '{{ server }}' username: '{{ user }}' password: '{{ pass }}' issue: '{{ issue.meta.key}}' operation: edit assignee: ssmith # Create an issue with an existing assignee - name: Create an assigned issue community.general.jira: uri: '{{ server }}' username: '{{ user }}' password: '{{ pass }}' project: ANS operation: create summary: Assigned issue description: Created and assigned using Ansible issuetype: Task assignee: ssmith # Edit an issue - name: Set the labels on an issue using free-form fields community.general.jira: uri: '{{ server }}' username: '{{ user }}' password: '{{ pass }}' issue: '{{ issue.meta.key }}' operation: edit args: fields: labels: - autocreated - ansible # Updating a field using operations: add, set & remove - name: Change the value of a Select dropdown community.general.jira: uri: '{{ server }}' username: '{{ user }}' password: '{{ pass }}' issue: '{{ issue.meta.key }}' operation: update args: fields: customfield_12931: [ {'set': {'value': 'Virtual'}} ] customfield_13820: [ {'set': {'value':'Manually'}} ] register: cmdb_issue delegate_to: localhost # Retrieve metadata for an issue and use it to create an account - name: Get an issue community.general.jira: uri: '{{ server }}' username: '{{ user }}' password: '{{ pass }}' project: ANS operation: fetch issue: ANS-63 register: issue # Search for an issue # You can limit the search for specific fields by adding optional args. Note! It must be a dict, hence, lastViewed: null - name: Search for an issue community.general.jira: uri: '{{ server }}' username: '{{ user }}' password: '{{ pass }}' project: ANS operation: search maxresults: 10 jql: project=cmdb AND cf[13225]="test" args: fields: lastViewed: null register: issue - name: Create a unix account for the reporter become: true user: name: '{{ issue.meta.fields.creator.name }}' comment: '{{ issue.meta.fields.creator.displayName }}' # You can get list of valid linktypes at /rest/api/2/issueLinkType # url of your jira installation. - name: Create link from HSP-1 to MKY-1 community.general.jira: uri: '{{ server }}' username: '{{ user }}' password: '{{ pass }}' operation: link linktype: Relates inwardissue: HSP-1 outwardissue: MKY-1 # Transition an issue - name: Resolve the issue community.general.jira: uri: '{{ server }}' username: '{{ user }}' password: '{{ pass }}' issue: '{{ issue.meta.key }}' operation: transition status: Resolve Issue account_id: 112233445566778899aabbcc fields: resolution: name: Done description: I am done! This is the last description I will ever give you. # Attach a file to an issue - name: Attach a file community.general.jira: uri: '{{ server }}' username: '{{ user }}' password: '{{ pass }}' issue: HSP-1 operation: attach attachment: filename: topsecretreport.xlsx ``` ### Authors * Steve Smith (@tarka) * Per Abildgaard Toft (@pertoft) * Brandon McNama (@DWSR) ansible community.general.vdo – Module to control VDO community.general.vdo – Module to control VDO ============================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.vdo`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module controls the VDO dedupe and compression device. * VDO, or Virtual Data Optimizer, is a device-mapper target that provides inline block-level deduplication, compression, and thin provisioning capabilities to primary storage. Requirements ------------ The below requirements are needed on the host that executes this module. * PyYAML * kmod-kvdo * vdo Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ackthreads** string | | Specifies the number of threads to use for acknowledging completion of requested VDO I/O operations. Valid values are integer values from 1 to 100 (lower numbers are preferable due to overhead). The default is 1. Existing volumes will maintain their previously configured setting unless a different value is specified in the playbook. | | **activated** boolean | **Choices:*** no * yes | The "activate" status for a VDO volume. If this is set to "no", the VDO volume cannot be started, and it will not start on system startup. However, on initial creation, a VDO volume with "activated" set to "off" will be running, until stopped. This is the default behavior of the "vdo create" command; it provides the user an opportunity to write a base amount of metadata (filesystem, LVM headers, etc.) to the VDO volume prior to stopping the volume, and leaving it deactivated until ready to use. | | **biothreads** string | | Specifies the number of threads to use for submitting I/O operations to the storage device. Valid values are integer values from 1 to 100 (lower numbers are preferable due to overhead). The default is 4. Existing volumes will maintain their previously configured setting unless a different value is specified in the playbook. | | **blockmapcachesize** string | | The amount of memory allocated for caching block map pages, in megabytes (or may be issued with an LVM-style suffix of K, M, G, or T). The default (and minimum) value is 128M. The value specifies the size of the cache; there is a 15% memory usage overhead. Each 1.25G of block map covers 1T of logical blocks, therefore a small amount of block map cache memory can cache a significantly large amount of block map data. Existing volumes will maintain their previously configured setting unless a different value is specified in the playbook. | | **compression** string | **Choices:*** disabled * enabled | Configures whether compression is enabled. The default for a created volume is 'enabled'. Existing volumes will maintain their previously configured setting unless a different value is specified in the playbook. | | **cputhreads** string | | Specifies the number of threads to use for CPU-intensive work such as hashing or compression. Valid values are integer values from 1 to 100 (lower numbers are preferable due to overhead). The default is 2. Existing volumes will maintain their previously configured setting unless a different value is specified in the playbook. | | **deduplication** string | **Choices:*** disabled * enabled | Configures whether deduplication is enabled. The default for a created volume is 'enabled'. Existing volumes will maintain their previously configured setting unless a different value is specified in the playbook. | | **device** string | | The full path of the device to use for VDO storage. This is required if "state" is "present". | | **emulate512** boolean | **Choices:*** **no** ← * yes | Enables 512-byte emulation mode, allowing drivers or filesystems to access the VDO volume at 512-byte granularity, instead of the default 4096-byte granularity. Default is 'disabled'; only recommended when a driver or filesystem requires 512-byte sector level access to a device. This option is only available when creating a new volume, and cannot be changed for an existing volume. | | **force** boolean added in 2.4.0 of community.general | **Choices:*** **no** ← * yes | When creating a volume, ignores any existing file system or VDO signature already present in the storage device. When stopping or removing a VDO volume, first unmounts the file system stored on the device if mounted. **Warning:** Since this parameter removes all safety checks it is important to make sure that all parameters provided are accurate and intentional. | | **growphysical** boolean | **Choices:*** **no** ← * yes | Specifies whether to attempt to execute a growphysical operation, if there is enough unused space on the device. A growphysical operation will be executed if there is at least 64 GB of free space, relative to the previous physical size of the affected VDO volume. | | **indexmem** string | | Specifies the amount of index memory in gigabytes. The default is 0.25. The special decimal values 0.25, 0.5, and 0.75 can be used, as can any positive integer. This option is only available when creating a new volume, and cannot be changed for an existing volume. | | **indexmode** string | **Choices:*** dense * sparse | Specifies the index mode of the Albireo index. The default is 'dense', which has a deduplication window of 1 GB of index memory per 1 TB of incoming data, requiring 10 GB of index data on persistent storage. The 'sparse' mode has a deduplication window of 1 GB of index memory per 10 TB of incoming data, but requires 100 GB of index data on persistent storage. This option is only available when creating a new volume, and cannot be changed for an existing volume. | | **logicalsize** string | | The logical size of the VDO volume (in megabytes, or LVM suffix format). If not specified for a new volume, this defaults to the same size as the underlying storage device, which is specified in the 'device' parameter. Existing volumes will maintain their size if the logicalsize parameter is not specified, or is smaller than or identical to the current size. If the specified size is larger than the current size, a growlogical operation will be performed. | | **logicalthreads** string | | Specifies the number of threads across which to subdivide parts of the VDO processing based on logical block addresses. Valid values are integer values from 1 to 100 (lower numbers are preferable due to overhead). The default is 1. Existing volumes will maintain their previously configured setting unless a different value is specified in the playbook. | | **name** string / required | | The name of the VDO volume. | | **physicalthreads** string | | Specifies the number of threads across which to subdivide parts of the VDO processing based on physical block addresses. Valid values are integer values from 1 to 16 (lower numbers are preferable due to overhead). The physical space used by the VDO volume must be larger than (slabsize \* physicalthreads). The default is 1. Existing volumes will maintain their previously configured setting unless a different value is specified in the playbook. | | **readcache** string | **Choices:*** disabled * enabled | Enables or disables the read cache. The default is 'disabled'. Choosing 'enabled' enables a read cache which may improve performance for workloads of high deduplication, read workloads with a high level of compression, or on hard disk storage. Existing volumes will maintain their previously configured setting unless a different value is specified in the playbook. The read cache feature is available in VDO 6.1 and older. | | **readcachesize** string | | Specifies the extra VDO device read cache size in megabytes. This is in addition to a system-defined minimum. Using a value with a suffix of K, M, G, or T is optional. The default value is 0. 1.125 MB of memory per bio thread will be used per 1 MB of read cache specified (for example, a VDO volume configured with 4 bio threads will have a read cache memory usage overhead of 4.5 MB per 1 MB of read cache specified). Existing volumes will maintain their previously configured setting unless a different value is specified in the playbook. The read cache feature is available in VDO 6.1 and older. | | **running** boolean | **Choices:*** no * yes | Whether this VDO volume is running. A VDO volume must be activated in order to be started. | | **slabsize** string | | The size of the increment by which the physical size of a VDO volume is grown, in megabytes (or may be issued with an LVM-style suffix of K, M, G, or T). Must be a power of two between 128M and 32G. The default is 2G, which supports volumes having a physical size up to 16T. The maximum, 32G, supports a physical size of up to 256T. This option is only available when creating a new volume, and cannot be changed for an existing volume. | | **state** string | **Choices:*** absent * **present** ← | Whether this VDO volume should be "present" or "absent". If a "present" VDO volume does not exist, it will be created. If a "present" VDO volume already exists, it will be modified, by updating the configuration, which will take effect when the VDO volume is restarted. Not all parameters of an existing VDO volume can be modified; the "statusparamkeys" list contains the parameters that can be modified after creation. If an "absent" VDO volume does not exist, it will not be removed. | | **writepolicy** string | **Choices:*** async * auto * sync | Specifies the write policy of the VDO volume. The 'sync' mode acknowledges writes only after data is on stable storage. The 'async' mode acknowledges writes when data has been cached for writing to stable storage. The default (and highly recommended) 'auto' mode checks the storage device to determine whether it supports flushes. Devices that support flushes will result in a VDO volume in 'async' mode, while devices that do not support flushes will run in sync mode. Existing volumes will maintain their previously configured setting unless a different value is specified in the playbook. | Notes ----- Note * In general, the default thread configuration should be used. Examples -------- ``` - name: Create 2 TB VDO volume vdo1 on device /dev/md0 community.general.vdo: name: vdo1 state: present device: /dev/md0 logicalsize: 2T - name: Remove VDO volume vdo1 community.general.vdo: name: vdo1 state: absent ``` ### Authors * Bryan Gurney (@bgurney-rh)
programming_docs
ansible community.general.idrac_redfish_command – Manages Out-Of-Band controllers using iDRAC OEM Redfish APIs community.general.idrac\_redfish\_command – Manages Out-Of-Band controllers using iDRAC OEM Redfish APIs ======================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.idrac_redfish_command`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Builds Redfish URIs locally and sends them to remote OOB controllers to perform an action. * For use with Dell iDRAC operations that require Redfish OEM extensions Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auth\_token** string added in 2.3.0 of community.general | | Security token for authentication with OOB controller | | **baseuri** string / required | | Base URI of OOB controller | | **category** string / required | | Category to execute on OOB controller | | **command** list / elements=string / required | | List of commands to execute on OOB controller | | **password** string | | Password for authentication with OOB controller | | **resource\_id** string added in 0.2.0 of community.general | | The ID of the System, Manager or Chassis to modify | | **timeout** integer | **Default:**10 | Timeout in seconds for URL requests to OOB controller | | **username** string | | User for authentication with OOB controller | Examples -------- ``` - name: Create BIOS configuration job (schedule BIOS setting update) community.general.idrac_redfish_command: category: Systems command: CreateBiosConfigJob resource_id: System.Embedded.1 baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **msg** string | always | Message with action result or error description **Sample:** Action was successful | ### Authors * Jose Delarosa (@jose-delarosa) ansible community.general.make – Run targets in a Makefile community.general.make – Run targets in a Makefile ================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.make`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Run targets in a Makefile. Requirements ------------ The below requirements are needed on the host that executes this module. * make Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **chdir** path / required | | Change to this directory before running make. | | **file** path | | Use a custom Makefile. | | **jobs** integer added in 2.0.0 of community.general | | Set the number of make jobs to run concurrently. Typically if set, this would be the number of processors and/or threads available to the machine. This is not supported by all make implementations. | | **make** path added in 0.2.0 of community.general | | Use a specific make binary. | | **params** dictionary | | Any extra parameters to pass to make. | | **target** string | | The target to run. Typically this would be something like `install`,`test` or `all`." | Examples -------- ``` - name: Build the default target community.general.make: chdir: /home/ubuntu/cool-project - name: Run 'install' target as root community.general.make: chdir: /home/ubuntu/cool-project target: install become: yes - name: Build 'all' target with extra arguments community.general.make: chdir: /home/ubuntu/cool-project target: all params: NUM_THREADS: 4 BACKEND: lapack - name: Build 'all' target with a custom Makefile community.general.make: chdir: /home/ubuntu/cool-project target: all file: /some-project/Makefile ``` ### Authors * Linus Unnebäck (@LinusU) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#0b6762657e782d28383c302d283e39302d283f33306d6467606f6a7f6479652d283f3d30786e)> ansible community.general.redhat_subscription – Manage registration and subscriptions to RHSM using the subscription-manager command community.general.redhat\_subscription – Manage registration and subscriptions to RHSM using the subscription-manager command ============================================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.redhat_subscription`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage registration and subscription to the Red Hat Subscription Management entitlement platform using the `subscription-manager` command Requirements ------------ The below requirements are needed on the host that executes this module. * subscription-manager Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **activationkey** string | | supply an activation key for use with registration | | **auto\_attach** boolean | **Choices:*** no * yes | Upon successful registration, auto-consume available subscriptions Added in favor of deprecated autosubscribe in 2.5. aliases: autosubscribe | | **consumer\_id** string | | References an existing consumer ID to resume using a previous registration for this system. If the system's identity certificate is lost or corrupted, this option allows it to resume using its previous identity and subscriptions. The default is to not specify a consumer ID so a new ID is created. | | **consumer\_name** string | | Name of the system to register, defaults to the hostname | | **consumer\_type** string | | The type of unit to register, defaults to system | | **environment** string | | Register with a specific environment in the destination org. Used with Red Hat Satellite 6.x or Katello | | **force\_register** boolean | **Choices:*** **no** ← * yes | Register the system even if it is already registered | | **org\_id** string | | Organization ID to use in conjunction with activationkey | | **password** string | | access.redhat.com or Sat6 password | | **pool** string | **Default:**"^$" | Specify a subscription pool name to consume. Regular expressions accepted. Use *pool\_ids* instead if possible, as it is much faster. Mutually exclusive with *pool\_ids*. | | **pool\_ids** list / elements=raw | **Default:**[] | Specify subscription pool IDs to consume. Prefer over *pool* when possible as it is much faster. A pool ID may be specified as a `string` - just the pool ID (ex. `0123456789abcdef0123456789abcdef`), or as a `dict` with the pool ID as the key, and a quantity as the value (ex. `0123456789abcdef0123456789abcdef: 2`. If the quantity is provided, it is used to consume multiple entitlements from a pool (the pool must support this). Mutually exclusive with *pool*. | | **release** string | | Set a release version | | **rhsm\_baseurl** string | | Specify CDN baseurl | | **rhsm\_repo\_ca\_cert** string | | Specify an alternative location for a CA certificate for CDN | | **server\_hostname** string | | Specify an alternative Red Hat Subscription Management or Sat6 server | | **server\_insecure** string | | Enable or disable https server certificate verification when connecting to `server_hostname` | | **server\_port** string added in 3.3.0 of community.general | | Specify the port when registering to the Red Hat Subscription Management or Sat6 server. | | **server\_prefix** string added in 3.3.0 of community.general | | Specify the prefix when registering to the Red Hat Subscription Management or Sat6 server. | | **server\_proxy\_hostname** string | | Specify an HTTP proxy hostname. | | **server\_proxy\_password** string | | Specify a password for HTTP proxy with basic authentication | | **server\_proxy\_port** string | | Specify an HTTP proxy port. | | **server\_proxy\_user** string | | Specify a user for HTTP proxy with basic authentication | | **state** string | **Choices:*** **present** ← * absent | whether to register and subscribe (`present`), or unregister (`absent`) a system | | **syspurpose** dictionary | **Default:**{} | Set syspurpose attributes in file `/etc/rhsm/syspurpose/syspurpose.json` and synchronize these attributes with RHSM server. Syspurpose attributes help attach the most appropriate subscriptions to the system automatically. When `syspurpose.json` file already contains some attributes, then new attributes overwrite existing attributes. When some attribute is not listed in the new list of attributes, the existing attribute will be removed from `syspurpose.json` file. Unknown attributes are ignored. | | | **addons** list / elements=string | | Syspurpose attribute addons | | | **role** string | | Syspurpose attribute role | | | **service\_level\_agreement** string | | Syspurpose attribute service\_level\_agreement | | | **sync** boolean | **Choices:*** **no** ← * yes | When this option is true, then syspurpose attributes are synchronized with RHSM server immediately. When this option is false, then syspurpose attributes will be synchronized with RHSM server by rhsmcertd daemon. | | | **usage** string | | Syspurpose attribute usage | | **username** string | | access.redhat.com or Sat6 username | Notes ----- Note * In order to register a system, subscription-manager requires either a username and password, or an activationkey and an Organization ID. * Since 2.5 values for *server\_hostname*, *server\_insecure*, *rhsm\_baseurl*, *server\_proxy\_hostname*, *server\_proxy\_port*, *server\_proxy\_user* and *server\_proxy\_password* are no longer taken from the `/etc/rhsm/rhsm.conf` config file and default to None. Examples -------- ``` - name: Register as user (joe_user) with password (somepass) and auto-subscribe to available content. community.general.redhat_subscription: state: present username: joe_user password: somepass auto_attach: true - name: Same as above but subscribe to a specific pool by ID. community.general.redhat_subscription: state: present username: joe_user password: somepass pool_ids: 0123456789abcdef0123456789abcdef - name: Register and subscribe to multiple pools. community.general.redhat_subscription: state: present username: joe_user password: somepass pool_ids: - 0123456789abcdef0123456789abcdef - 1123456789abcdef0123456789abcdef - name: Same as above but consume multiple entitlements. community.general.redhat_subscription: state: present username: joe_user password: somepass pool_ids: - 0123456789abcdef0123456789abcdef: 2 - 1123456789abcdef0123456789abcdef: 4 - name: Register and pull existing system data. community.general.redhat_subscription: state: present username: joe_user password: somepass consumer_id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - name: Register with activationkey and consume subscriptions matching Red Hat Enterprise Server or Red Hat Virtualization community.general.redhat_subscription: state: present activationkey: 1-222333444 org_id: 222333444 pool: '^(Red Hat Enterprise Server|Red Hat Virtualization)$' - name: Update the consumed subscriptions from the previous example (remove Red Hat Virtualization subscription) community.general.redhat_subscription: state: present activationkey: 1-222333444 org_id: 222333444 pool: '^Red Hat Enterprise Server$' - name: Register as user credentials into given environment (against Red Hat Satellite 6.x), and auto-subscribe. community.general.redhat_subscription: state: present username: joe_user password: somepass environment: Library auto_attach: true - name: Register as user (joe_user) with password (somepass) and a specific release community.general.redhat_subscription: state: present username: joe_user password: somepass release: 7.4 - name: Register as user (joe_user) with password (somepass), set syspurpose attributes and synchronize them with server community.general.redhat_subscription: state: present username: joe_user password: somepass auto_attach: true syspurpose: usage: "Production" role: "Red Hat Enterprise Server" service_level_agreement: "Premium" addons: - addon1 - addon2 sync: true ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **subscribed\_pool\_ids** complex | success | List of pool IDs to which system is now subscribed **Sample:** {'8a85f9815ab905d3015ab928c7005de4': '1'} | ### Authors * Barnaby Court (@barnabycourt) ansible community.general.mqtt – Publish a message on an MQTT topic for the IoT community.general.mqtt – Publish a message on an MQTT topic for the IoT ======================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.mqtt`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Publish a message on an MQTT topic. Requirements ------------ The below requirements are needed on the host that executes this module. * mosquitto Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ca\_cert** path | | The path to the Certificate Authority certificate files that are to be treated as trusted by this client. If this is the only option given then the client will operate in a similar manner to a web browser. That is to say it will require the broker to have a certificate signed by the Certificate Authorities in ca\_certs and will communicate using TLS v1, but will not attempt any form of authentication. This provides basic network encryption but may not be sufficient depending on how the broker is configured. aliases: ca\_certs | | **client\_cert** path | | The path pointing to the PEM encoded client certificate. If this is not None it will be used as client information for TLS based authentication. Support for this feature is broker dependent. aliases: certfile | | **client\_id** string | | MQTT client identifier If not specified, a value `hostname + pid` will be used. | | **client\_key** path | | The path pointing to the PEM encoded client private key. If this is not None it will be used as client information for TLS based authentication. Support for this feature is broker dependent. aliases: keyfile | | **password** string | | Password for `username` to authenticate against the broker. | | **payload** string / required | | Payload. The special string `"None"` may be used to send a NULL (i.e. empty) payload which is useful to simply notify with the *topic* or to clear previously retained messages. | | **port** integer | **Default:**1883 | MQTT broker port number | | **qos** string | **Choices:*** **0** ← * 1 * 2 | QoS (Quality of Service) | | **retain** boolean | **Choices:*** **no** ← * yes | Setting this flag causes the broker to retain (i.e. keep) the message so that applications that subsequently subscribe to the topic can received the last retained message immediately. | | **server** string | **Default:**"localhost" | MQTT broker address/name | | **tls\_version** string | **Choices:*** tlsv1.1 * tlsv1.2 | Specifies the version of the SSL/TLS protocol to be used. By default (if the python version supports it) the highest TLS version is detected. If unavailable, TLS v1 is used. | | **topic** string / required | | MQTT topic name | | **username** string | | Username to authenticate against the broker. | Notes ----- Note * This module requires a connection to an MQTT broker such as Mosquitto <http://mosquitto.org> and the *Paho* `mqtt` Python client (<https://pypi.org/project/paho-mqtt/>). Examples -------- ``` - name: Publish a message on an MQTT topic community.general.mqtt: topic: 'service/ansible/{{ ansible_hostname }}' payload: 'Hello at {{ ansible_date_time.iso8601 }}' qos: 0 retain: False client_id: ans001 delegate_to: localhost ``` ### Authors * Jan-Piet Mens (@jpmens) ansible community.general.heroku_collaborator – Add or delete app collaborators on Heroku community.general.heroku\_collaborator – Add or delete app collaborators on Heroku ================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.heroku_collaborator`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manages collaborators for Heroku apps. * If set to `present` and heroku user is already collaborator, then do nothing. * If set to `present` and heroku user is not collaborator, then add user to app. * If set to `absent` and heroku user is collaborator, then delete user from app. Requirements ------------ The below requirements are needed on the host that executes this module. * heroku3 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string | | Heroku API key | | **apps** list / elements=string / required | | List of Heroku App names | | **state** string | **Choices:*** **present** ← * absent | Create or remove the heroku collaborator | | **suppress\_invitation** boolean | **Choices:*** **no** ← * yes | Suppress email invitation when creating collaborator | | **user** string / required | | User ID or e-mail | Notes ----- Note * `HEROKU_API_KEY` and `TF_VAR_HEROKU_API_KEY` env variable can be used instead setting `api_key`. * If you use *–check*, you can also pass the *-v* flag to see affected apps in `msg`, e.g. [“heroku-example-app”]. Examples -------- ``` - name: Create a heroku collaborator community.general.heroku_collaborator: api_key: YOUR_API_KEY user: [email protected] apps: heroku-example-app state: present - name: An example of using the module in loop community.general.heroku_collaborator: api_key: YOUR_API_KEY user: '{{ item.user }}' apps: '{{ item.apps | default(apps) }}' suppress_invitation: '{{ item.suppress_invitation | default(suppress_invitation) }}' state: '{{ item.state | default("present") }}' with_items: - { user: '[email protected]' } - { state: 'absent', user: '[email protected]', suppress_invitation: false } - { user: '[email protected]', apps: ["heroku-example-app"] } ``` ### Authors * Marcel Arns (@marns93)
programming_docs
ansible community.general.udm_group – Manage of the posix group community.general.udm\_group – Manage of the posix group ======================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.udm_group`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This module allows to manage user groups on a univention corporate server (UCS). It uses the python API of the UCS to create a new object or edit it. Requirements ------------ The below requirements are needed on the host that executes this module. * Python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **description** string | | Group description. | | **name** string / required | | Name of the posix group. | | **ou** string | | LDAP OU, e.g. school for LDAP OU `ou=school,dc=example,dc=com`. | | **position** string | | define the whole ldap position of the group, e.g. `cn=g123m-1A,cn=classes,cn=schueler,cn=groups,ou=schule,dc=example,dc=com`. | | **state** string | **Choices:*** **present** ← * absent | Whether the group is present or not. | | **subpath** string | **Default:**"cn=groups" | Subpath inside the OU, e.g. `cn=classes,cn=students,cn=groups`. | Examples -------- ``` - name: Create a POSIX group community.general.udm_group: name: g123m-1A # Create a POSIX group with the exact DN # C(cn=g123m-1A,cn=classes,cn=students,cn=groups,ou=school,dc=school,dc=example,dc=com) - name: Create a POSIX group with a DN community.general.udm_group: name: g123m-1A subpath: 'cn=classes,cn=students,cn=groups' ou: school # or - name: Create a POSIX group with a DN community.general.udm_group: name: g123m-1A position: 'cn=classes,cn=students,cn=groups,ou=school,dc=school,dc=example,dc=com' ``` ### Authors * Tobias Rüetschi (@keachi) ansible community.general.one_service – Deploy and manage OpenNebula services community.general.one\_service – Deploy and manage OpenNebula services ====================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.one_service`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage OpenNebula services Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_password** string | | Password of the user to login into OpenNebula OneFlow API server. If not set then the value of the `ONEFLOW_PASSWORD` environment variable is used. | | **api\_url** string | | URL of the OpenNebula OneFlow API server. It is recommended to use HTTPS so that the username/password are not transferred over the network unencrypted. If not set then the value of the ONEFLOW\_URL environment variable is used. | | **api\_username** string | | Name of the user to login into the OpenNebula OneFlow API server. If not set then the value of the `ONEFLOW_USERNAME` environment variable is used. | | **cardinality** integer | | Number of VMs for the specified role | | **custom\_attrs** dictionary | **Default:**{} | Dictionary of key/value custom attributes which will be used when instantiating a new service. | | **force** boolean | **Choices:*** **no** ← * yes | Force the new cardinality even if it is outside the limits | | **group\_id** integer | | ID of the group which will be set as the group of the service | | **mode** string | | Set permission mode of a service instance in octet format, e.g. `600` to give owner `use` and `manage` and nothing to group and others. | | **owner\_id** integer | | ID of the user which will be set as the owner of the service | | **role** string | | Name of the role whose cardinality should be changed | | **service\_id** integer | | ID of a service instance that you would like to manage | | **service\_name** string | | Name of a service instance that you would like to manage | | **state** string | **Choices:*** **present** ← * absent | `present` - instantiate a service from a template specified with `template_id`/`template_name`. `absent` - terminate an instance of a service specified with `service_id`/`service_name`. | | **template\_id** integer | | ID of a service template to use to create a new instance of a service | | **template\_name** string | | Name of service template to use to create a new instance of a service | | **unique** boolean | **Choices:*** **no** ← * yes | Setting `unique=yes` will make sure that there is only one service instance running with a name set with `service_name` when instantiating a service from a template specified with `template_id`/`template_name`. Check examples below. | | **wait** boolean | **Choices:*** **no** ← * yes | Wait for the instance to reach RUNNING state after DEPLOYING or COOLDOWN state after SCALING | | **wait\_timeout** integer | **Default:**300 | How long before wait gives up, in seconds | Examples -------- ``` - name: Instantiate a new service community.general.one_service: template_id: 90 register: result - name: Print service properties ansible.builtin.debug: msg: result - name: Instantiate a new service with specified service_name, service group and mode community.general.one_service: template_name: 'app1_template' service_name: 'app1' group_id: 1 mode: '660' - name: Instantiate a new service with template_id and pass custom_attrs dict community.general.one_service: template_id: 90 custom_attrs: public_network_id: 21 private_network_id: 26 - name: Instantiate a new service 'foo' if the service doesn't already exist, otherwise do nothing community.general.one_service: template_id: 53 service_name: 'foo' unique: yes - name: Delete a service by ID community.general.one_service: service_id: 153 state: absent - name: Get service info community.general.one_service: service_id: 153 register: service_info - name: Change service owner, group and mode community.general.one_service: service_name: 'app2' owner_id: 34 group_id: 113 mode: '600' - name: Instantiate service and wait for it to become RUNNING community.general.one_service: template_id: 43 service_name: 'foo1' - name: Wait service to become RUNNING community.general.one_service: service_id: 112 wait: yes - name: Change role cardinality community.general.one_service: service_id: 153 role: bar cardinality: 5 - name: Change role cardinality and wait for it to be applied community.general.one_service: service_id: 112 role: foo cardinality: 7 wait: yes ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **group\_id** integer | success | service's group id **Sample:** 1 | | **group\_name** string | success | service's group name **Sample:** one-users | | **mode** integer | success | service's mode **Sample:** 660 | | **owner\_id** integer | success | service's owner id **Sample:** 143 | | **owner\_name** string | success | service's owner name **Sample:** ansible-test | | **roles** list / elements=string | success | list of dictionaries of roles, each role is described by name, cardinality, state and nodes ids **Sample:** [{"cardinality": 1,"name": "foo","state": "RUNNING","ids": [ 123, 456 ]}, {"cardinality": 2,"name": "bar","state": "RUNNING", "ids": [ 452, 567, 746 ]}] | | **service\_id** integer | success | service id **Sample:** 153 | | **service\_name** string | success | service name **Sample:** app1 | | **state** string | success | state of service instance **Sample:** RUNNING | ### Authors * Milan Ilic (@ilicmilan) ansible community.general.zypper_repository – Add and remove Zypper repositories community.general.zypper\_repository – Add and remove Zypper repositories ========================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.zypper_repository`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Add or remove Zypper repositories on SUSE and openSUSE Requirements ------------ The below requirements are needed on the host that executes this module. * zypper >= 1.0 # included in openSUSE >= 11.1 or SUSE Linux Enterprise Server/Desktop >= 11.0 * python-xml Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auto\_import\_keys** boolean | **Choices:*** **no** ← * yes | Automatically import the gpg signing key of the new or changed repository. Has an effect only if state is *present*. Has no effect on existing (unchanged) repositories or in combination with *absent*. Implies runrefresh. Only works with `.repo` files if `name` is given explicitly. | | **autorefresh** boolean | **Choices:*** no * **yes** ← | Enable autorefresh of the repository. aliases: refresh | | **description** string | | A description of the repository | | **disable\_gpg\_check** boolean | **Choices:*** **no** ← * yes | Whether to disable GPG signature checking of all packages. Has an effect only if state is *present*. Needs zypper version >= 1.6.2. | | **enabled** boolean | **Choices:*** no * **yes** ← | Set repository to enabled (or disabled). | | **name** string | | A name for the repository. Not required when adding repofiles. | | **overwrite\_multiple** boolean | **Choices:*** **no** ← * yes | Overwrite multiple repository entries, if repositories with both name and URL already exist. | | **priority** integer | | Set priority of repository. Packages will always be installed from the repository with the smallest priority number. Needs zypper version >= 1.12.25. | | **repo** string | | URI of the repository or .repo file. Required when state=present. | | **runrefresh** boolean | **Choices:*** **no** ← * yes | Refresh the package list of the given repository. Can be used with repo=\* to refresh all repositories. | | **state** string | **Choices:*** absent * **present** ← | A source string state. | Examples -------- ``` - name: Add NVIDIA repository for graphics drivers community.general.zypper_repository: name: nvidia-repo repo: 'ftp://download.nvidia.com/opensuse/12.2' state: present - name: Remove NVIDIA repository community.general.zypper_repository: name: nvidia-repo repo: 'ftp://download.nvidia.com/opensuse/12.2' state: absent - name: Add python development repository community.general.zypper_repository: repo: 'http://download.opensuse.org/repositories/devel:/languages:/python/SLE_11_SP3/devel:languages:python.repo' - name: Refresh all repos community.general.zypper_repository: repo: '*' runrefresh: yes - name: Add a repo and add its gpg key community.general.zypper_repository: repo: 'http://download.opensuse.org/repositories/systemsmanagement/openSUSE_Leap_42.1/' auto_import_keys: yes - name: Force refresh of a repository community.general.zypper_repository: repo: 'http://my_internal_ci_repo/repo' name: my_ci_repo state: present runrefresh: yes ``` ### Authors * Matthias Vogelgesang (@matze) ansible community.general.bzr – Deploy software (or files) from bzr branches community.general.bzr – Deploy software (or files) from bzr branches ==================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.bzr`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manage *bzr* branches to deploy files or software. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **dest** path / required | | Absolute path of where the branch should be cloned to. | | **executable** string | | Path to bzr executable to use. If not supplied, the normal mechanism for resolving binary paths will be used. | | **force** boolean | **Choices:*** **no** ← * yes | If `yes`, any modified files in the working tree will be discarded. Before 1.9 the default value was `yes`. | | **name** string / required | | SSH or HTTP protocol address of the parent branch. aliases: parent | | **version** string | **Default:**"head" | What version of the branch to clone. This can be the bzr revno or revid. | Examples -------- ``` - name: Checkout community.general.bzr: name: bzr+ssh://foosball.example.org/path/to/branch dest: /srv/checkout version: 22 ``` ### Authors * André Paramés (@andreparames) ansible community.general.random_string – Generates random string community.general.random\_string – Generates random string ========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.random_string`. New in version 3.2.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Generates random string based upon the given constraints. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **base64** boolean | **Choices:*** **no** ← * yes | | Returns base64 encoded string. | | **length** integer | **Default:**8 | | The length of the string. | | **lower** boolean | **Choices:*** no * **yes** ← | | Include lowercase letters in the string. | | **min\_lower** integer | **Default:**0 | | Minimum number of lowercase alphabets in the string. If set, overrides *lower=false*. | | **min\_numeric** integer | **Default:**0 | | Minimum number of numeric characters in the string. If set, overrides *numbers=false*. | | **min\_special** integer | **Default:**0 | | Minimum number of special character in the string. | | **min\_upper** integer | **Default:**0 | | Minimum number of uppercase alphabets in the string. If set, overrides *upper=false*. | | **numbers** boolean | **Choices:*** no * **yes** ← | | Include numbers in the string. | | **override\_all** string | | | Override all values of *numbers*, *upper*, *lower*, and *special* with the given list of characters. | | **override\_special** string | | | Overide a list of special characters to use in the string. If set *min\_special* should be set to a non-default value. | | **special** boolean | **Choices:*** no * **yes** ← | | Include special characters in the string. Special characters are taken from Python standard library `string`. See [the documentation of string.punctuation](https://docs.python.org/3/library/string.html#string.punctuation) for which characters will be used. The choice of special characters can be changed to setting *override\_special*. | | **upper** boolean | **Choices:*** no * **yes** ← | | Include uppercase letters in the string. | Examples -------- ``` - name: Generate random string ansible.builtin.debug: var: lookup('community.general.random_string') # Example result: ['DeadBeeF'] - name: Generate random string with length 12 ansible.builtin.debug: var: lookup('community.general.random_string', length=12) # Example result: ['Uan0hUiX5kVG'] - name: Generate base64 encoded random string ansible.builtin.debug: var: lookup('community.general.random_string', base64=True) # Example result: ['NHZ6eWN5Qk0='] - name: Generate a random string with 1 lower, 1 upper, 1 number and 1 special char (atleast) ansible.builtin.debug: var: lookup('community.general.random_string', min_lower=1, min_upper=1, min_special=1, min_numeric=1) # Example result: ['&Qw2|E[-'] - name: Generate a random string with all lower case characters debug: var: query('community.general.random_string', upper=false, numbers=false, special=false) # Example result: ['exolxzyz'] - name: Generate random hexadecimal string debug: var: query('community.general.random_string', upper=false, lower=false, override_special=hex_chars, numbers=false) vars: hex_chars: '0123456789ABCDEF' # Example result: ['D2A40737'] - name: Generate random hexadecimal string with override_all debug: var: query('community.general.random_string', override_all=hex_chars) vars: hex_chars: '0123456789ABCDEF' # Example result: ['D2A40737'] ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **\_raw** list / elements=string | success | A one-element list containing a random string | ### Authors * Abhijeet Kasurde (@Akasurde) ansible community.general.nios_srv_record – Configure Infoblox NIOS SRV records community.general.nios\_srv\_record – Configure Infoblox NIOS SRV records ========================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nios_srv_record`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Status](#status) DEPRECATED ---------- Removed in version 5.0.0 Why Please install the infoblox.nios\_modules collection and use the corresponding module from it. Alternative infoblox.nios\_modules.nios\_srv\_record Synopsis -------- * Adds and/or removes instances of SRV record objects from Infoblox NIOS servers. This module manages NIOS `record:srv` objects using the Infoblox WAPI interface over REST. Requirements ------------ The below requirements are needed on the host that executes this module. * infoblox-client Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **comment** string | | Configures a text string comment to be associated with the instance of this object. The provided text string will be configured on the object instance. | | **extattrs** dictionary | | Allows for the configuration of Extensible Attributes on the instance of the object. This argument accepts a set of key / value pairs for configuration. | | **name** string / required | | Specifies the fully qualified hostname to add or remove from the system | | **port** integer | | Configures the port (0-65535) of this SRV record. | | **priority** integer | | Configures the priority (0-65535) for this SRV record. | | **provider** dictionary | | A dict object containing connection details. | | | **host** string | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. | | | **http\_pool\_connections** integer | **Default:**10 | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_pool\_maxsize** integer | **Default:**10 | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_request\_timeout** integer | **Default:**10 | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. | | | **max\_results** integer | **Default:**1000 | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. | | | **max\_retries** integer | **Default:**3 | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. | | | **password** string | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. | | | **silent\_ssl\_warnings** boolean | **Choices:*** no * **yes** ← | Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **username** string | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. | | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable. aliases: ssl\_verify | | | **wapi\_version** string | **Default:**"2.1" | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 | | **state** string | **Choices:*** **present** ← * absent | Configures the intended state of the instance of the object on the NIOS server. When this value is set to `present`, the object is configured on the device and when this value is set to `absent` the value is removed (if necessary) from the device. | | **target** string | | Configures the target FQDN for this SRV record. | | **ttl** integer | | Configures the TTL to be associated with this host record | | **view** string | **Default:**"default" | Sets the DNS view to associate this a record with. The DNS view must already be configured on the system aliases: dns\_view | | **weight** integer | | Configures the weight (0-65535) for this SRV record. | Notes ----- Note * This module must be run locally, which can be achieved by specifying `connection: local`. * Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible. Examples -------- ``` - name: Configure an SRV record community.general.nios_srv_record: name: _sip._tcp.service.ansible.com port: 5080 priority: 10 target: service1.ansible.com weight: 10 state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Add a comment to an existing SRV record community.general.nios_srv_record: name: _sip._tcp.service.ansible.com port: 5080 priority: 10 target: service1.ansible.com weight: 10 comment: this is a test comment state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Remove an SRV record from the system community.general.nios_srv_record: name: _sip._tcp.service.ansible.com port: 5080 priority: 10 target: service1.ansible.com weight: 10 state: absent provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local ``` Status ------ * This module will be removed in version 5.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Blair Rampling (@brampling)
programming_docs
ansible community.general.stackdriver – Send code deploy and annotation events to stackdriver community.general.stackdriver – Send code deploy and annotation events to stackdriver ===================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.stackdriver`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Send code deploy and annotation events to Stackdriver Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **annotated\_by** string | **Default:**"Ansible" | The person or robot who the annotation should be attributed to. | | **deployed\_by** string | **Default:**"Ansible" | The person or robot responsible for deploying the code | | **deployed\_to** string | | The environment code was deployed to. (ie: development, staging, production) | | **event** string / required | **Choices:*** annotation * deploy | The type of event to send, either annotation or deploy | | **event\_epoch** string | | Unix timestamp of where the event should appear in the timeline, defaults to now. Be careful with this. | | **instance\_id** string | | id of an EC2 instance that this event should be attached to, which will limit the contexts where this event is shown | | **key** string / required | | API key. | | **level** string | **Choices:*** **INFO** ← * WARN * ERROR | one of INFO/WARN/ERROR, defaults to INFO if not supplied. May affect display. | | **msg** string | | The contents of the annotation message, in plain text. Limited to 256 characters. Required for annotation. | | **repository** string | | The repository (or project) deployed | | **revision\_id** string | | The revision of the code that was deployed. Required for deploy events | Examples -------- ``` - name: Send a code deploy event to stackdriver community.general.stackdriver: key: AAAAAA event: deploy deployed_to: production deployed_by: leeroyjenkins repository: MyWebApp revision_id: abcd123 - name: Send an annotation event to stackdriver community.general.stackdriver: key: AAAAAA event: annotation msg: Greetings from Ansible annotated_by: leeroyjenkins level: WARN instance_id: i-abcd1234 ``` ### Authors * Ben Whaley (@bwhaley) ansible community.general.ini_file – Tweak settings in INI files community.general.ini\_file – Tweak settings in INI files ========================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ini_file`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage (add, remove, change) individual settings in an INI-style file without having to manage the file as a whole with, say, [ansible.builtin.template](../../ansible/builtin/template_module#ansible-collections-ansible-builtin-template-module) or [ansible.builtin.assemble](../../ansible/builtin/assemble_module#ansible-collections-ansible-builtin-assemble-module). * Adds missing sections if they don’t exist. * Before Ansible 2.0, comments are discarded when the source file is read, and therefore will not show up in the destination file. * Since Ansible 2.3, this module adds missing ending newlines to files to keep in line with the POSIX standard, even when no other modifications need to be applied. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **allow\_no\_value** boolean | **Choices:*** **no** ← * yes | Allow option without value and without '=' symbol. | | **attributes** string added in 2.3 of ansible.builtin | | The attributes the resulting file or directory should have. To get supported flags look at the man page for *chattr* on the target system. This string should contain the attributes in the same order as the one displayed by *lsattr*. The `=` operator is assumed as default, otherwise `+` or `-` operators need to be included in the string. aliases: attr | | **backup** boolean | **Choices:*** **no** ← * yes | Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. | | **create** boolean | **Choices:*** no * **yes** ← | If set to `no`, the module will fail if the file does not already exist. By default it will create the file if it is missing. | | **exclusive** boolean added in 3.6.0 of community.general | **Choices:*** no * **yes** ← | If set to `yes` (default), all matching *option* lines are removed when *state=absent*, or replaced when *state=present*. If set to `no`, only the specified *value(s*) are added when *state=present*, or removed when *state=absent*, and existing ones are not modified. | | **group** string | | Name of the group that should own the file/directory, as would be fed to *chown*. | | **mode** raw | | The permissions the resulting file or directory should have. For those used to */usr/bin/chmod* remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like `0644` or `01777`) or quote it (like `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination file **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created file. If `mode` is not specified and the destination file **does** exist, the mode of the existing file will be used. Specifying `mode` is the best way to ensure files are created with the correct permissions. See CVE-2020-1736 for further details. | | **no\_extra\_spaces** boolean | **Choices:*** **no** ← * yes | Do not insert spaces before and after '=' symbol. | | **option** string | | If set (required for changing a *value*), this is the name of the option. May be omitted if adding/removing a whole *section*. | | **owner** string | | Name of the user that should own the file/directory, as would be fed to *chown*. | | **path** path / required | | Path to the INI-style file; this file is created if required. Before Ansible 2.3 this option was only usable as *dest*. aliases: dest | | **section** string / required | | Section name in INI file. This is added if `state=present` automatically when a single value is being set. If left empty or set to `null`, the *option* will be placed before the first *section*. Using `null` is also required if the config format does not support sections. | | **selevel** string | | The level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the `range`. When set to `_default`, it will use the `level` portion of the policy if available. | | **serole** string | | The role part of the SELinux file context. When set to `_default`, it will use the `role` portion of the policy if available. | | **setype** string | | The type part of the SELinux file context. When set to `_default`, it will use the `type` portion of the policy if available. | | **seuser** string | | The user part of the SELinux file context. By default it uses the `system` policy, where applicable. When set to `_default`, it will use the `user` portion of the policy if available. | | **state** string | **Choices:*** absent * **present** ← | If set to `absent` and *exclusive* set to `yes` all matching *option* lines are removed. If set to `absent` and *exclusive* set to `no` the specified `option=value` lines are removed, but the other *option*s with the same name are not touched. If set to `present` and *exclusive* set to `no` the specified `option=values` lines are added, but the other *option*s with the same name are not touched. If set to `present` and *exclusive* set to `yes` all given `option=values` lines will be added and the other *option*s with the same name are removed. | | **unsafe\_writes** boolean added in 2.2 of ansible.builtin | **Choices:*** **no** ← * yes | Influence when to use atomic operation to prevent data corruption or inconsistent reads from the target file. By default this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, which cannot be updated atomically from inside the container and can only be written in an unsafe manner. This option allows Ansible to fall back to unsafe methods of updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes). IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption. | | **value** string | | The string value to be associated with an *option*. May be omitted when removing an *option*. Mutually exclusive with *values*. *value=v* is equivalent to *values=[v]*. | | **values** list / elements=string added in 3.6.0 of community.general | | The string value to be associated with an *option*. May be omitted when removing an *option*. Mutually exclusive with *value*. *value=v* is equivalent to *values=[v]*. | Notes ----- Note * While it is possible to add an *option* without specifying a *value*, this makes no sense. * As of Ansible 2.3, the *dest* option has been changed to *path* as default, but *dest* still works as well. * As of community.general 3.2.0, UTF-8 BOM markers are discarded when reading files. Examples -------- ``` # Before Ansible 2.3, option 'dest' was used instead of 'path' - name: Ensure "fav=lemonade is in section "[drinks]" in specified file community.general.ini_file: path: /etc/conf section: drinks option: fav value: lemonade mode: '0600' backup: yes - name: Ensure "temperature=cold is in section "[drinks]" in specified file community.general.ini_file: path: /etc/anotherconf section: drinks option: temperature value: cold backup: yes - name: Add "beverage=lemon juice" is in section "[drinks]" in specified file community.general.ini_file: path: /etc/conf section: drinks option: beverage value: lemon juice mode: '0600' state: present exclusive: no - name: Ensure multiple values "beverage=coke" and "beverage=pepsi" are in section "[drinks]" in specified file community.general.ini_file: path: /etc/conf section: drinks option: beverage values: - coke - pepsi mode: '0600' state: present ``` ### Authors * Jan-Piet Mens (@jpmens) * Ales Nosek (@noseka1) ansible community.general.ipa_config – Manage Global FreeIPA Configuration Settings community.general.ipa\_config – Manage Global FreeIPA Configuration Settings ============================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ipa_config`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Modify global configuration settings of a FreeIPA Server. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_prot** string | **Choices:*** http * **https** ← | Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. | | **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipaconfigstring** list / elements=string added in 2.5.0 of community.general | **Choices:*** AllowNThash * KDC:Disable Last Success * KDC:Disable Lockout * KDC:Disable Default Preauth for SPNs | Extra hashes to generate in password plug-in. aliases: configstring | | **ipadefaultemaildomain** string | | Default e-mail domain for new users. aliases: emaildomain | | **ipadefaultloginshell** string | | Default shell for new users. aliases: loginshell | | **ipadefaultprimarygroup** string added in 2.5.0 of community.general | | Default group for new users. aliases: primarygroup | | **ipagroupsearchfields** list / elements=string added in 2.5.0 of community.general | | A list of fields to search in when searching for groups. aliases: groupsearchfields | | **ipahomesrootdir** string added in 2.5.0 of community.general | | Default location of home directories. aliases: homesrootdir | | **ipakrbauthzdata** list / elements=string added in 2.5.0 of community.general | **Choices:*** MS-PAC * PAD * nfs:NONE | Default types of PAC supported for services. aliases: krbauthzdata | | **ipamaxusernamelength** integer added in 2.5.0 of community.general | | Maximum length of usernames. aliases: maxusernamelength | | **ipapwdexpadvnotify** integer added in 2.5.0 of community.general | | Notice of impending password expiration, in days. aliases: pwdexpadvnotify | | **ipasearchrecordslimit** integer added in 2.5.0 of community.general | | Maximum number of records to search (-1 or 0 is unlimited). aliases: searchrecordslimit | | **ipasearchtimelimit** integer added in 2.5.0 of community.general | | Maximum amount of time (seconds) for a search (-1 or 0 is unlimited). aliases: searchtimelimit | | **ipaselinuxusermaporder** list / elements=string added in 3.7.0 of community.general | | The SELinux user map order (order in increasing priority of SELinux users). aliases: selinuxusermaporder | | **ipauserauthtype** list / elements=string added in 2.5.0 of community.general | **Choices:*** password * radius * otp * pkinit * hardened * disabled | The authentication type to use by default. aliases: userauthtype | | **ipausersearchfields** list / elements=string added in 2.5.0 of community.general | | A list of fields to search in when searching for users. aliases: usersearchfields | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | This only applies if `ipa_prot` is *https*. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Ensure password plugin features DC:Disable Last Success and KDC:Disable Lockout are enabled community.general.ipa_config: ipaconfigstring: ["KDC:Disable Last Success", "KDC:Disable Lockout"] ipa_host: localhost ipa_user: admin ipa_pass: supersecret - name: Ensure the default login shell is bash community.general.ipa_config: ipadefaultloginshell: /bin/bash ipa_host: localhost ipa_user: admin ipa_pass: supersecret - name: Ensure the default e-mail domain is ansible.com community.general.ipa_config: ipadefaultemaildomain: ansible.com ipa_host: localhost ipa_user: admin ipa_pass: supersecret - name: Ensure the default primary group is set to ipausers community.general.ipa_config: ipadefaultprimarygroup: ipausers ipa_host: localhost ipa_user: admin ipa_pass: supersecret - name: Ensure the group search fields are set to 'cn,description' community.general.ipa_config: ipagroupsearchfields: ['cn', 'description'] ipa_host: localhost ipa_user: admin ipa_pass: supersecret - name: Ensure the home directory location is set to /home community.general.ipa_config: ipahomesrootdir: /home ipa_host: localhost ipa_user: admin ipa_pass: supersecret - name: Ensure the default types of PAC supported for services is set to MS-PAC and PAD community.general.ipa_config: ipakrbauthzdata: ["MS-PAC", "PAD"] ipa_host: localhost ipa_user: admin ipa_pass: supersecret - name: Ensure the maximum user name length is set to 32 community.general.ipa_config: ipamaxusernamelength: 32 ipa_host: localhost ipa_user: admin ipa_pass: supersecret - name: Ensure the password expiration notice is set to 4 days community.general.ipa_config: ipapwdexpadvnotify: 4 ipa_host: localhost ipa_user: admin ipa_pass: supersecret - name: Ensure the search record limit is set to 100 community.general.ipa_config: ipasearchrecordslimit: 100 ipa_host: localhost ipa_user: admin ipa_pass: supersecret - name: Ensure the search time limit is set to 2 seconds community.general.ipa_config: ipasearchtimelimit: 2 ipa_host: localhost ipa_user: admin ipa_pass: supersecret - name: Ensure the default user auth type is password community.general.ipa_config: ipauserauthtype: ['password'] ipa_host: localhost ipa_user: admin ipa_pass: supersecret - name: Ensure the user search fields is set to 'uid,givenname,sn,ou,title' community.general.ipa_config: ipausersearchfields: ['uid', 'givenname', 'sn', 'ou', 'title'] ipa_host: localhost ipa_user: admin ipa_pass: supersecret - name: Ensure the SELinux user map order is set community.general.ipa_config: ipaselinuxusermaporder: - "guest_u:s0" - "xguest_u:s0" - "user_u:s0" - "staff_u:s0-s0:c0.c1023" - "unconfined_u:s0-s0:c0.c1023" ipa_host: localhost ipa_user: admin ipa_pass: supersecret ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **config** dictionary | always | Configuration as returned by IPA API. | ### Authors * Fran Fitzpatrick (@fxfitz)
programming_docs
ansible community.general.lxc_container – Manage LXC Containers community.general.lxc\_container – Manage LXC Containers ======================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.lxc_container`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Management of LXC containers. Requirements ------------ The below requirements are needed on the host that executes this module. * lxc >= 1.0 # OS package * python >= 2.6 # OS Package * lxc-python2 >= 0.1 # PIP Package from <https://github.com/lxc/python2-lxc> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **archive** boolean | **Choices:*** **no** ← * yes | Create an archive of a container. This will create a tarball of the running container. | | **archive\_compression** string | **Choices:*** **gzip** ← * bzip2 * none | Type of compression to use when creating an archive of a running container. | | **archive\_path** path | | Path the save the archived container. If the path does not exist the archive method will attempt to create it. | | **backing\_store** string | **Choices:*** **dir** ← * lvm * loop * btrfs * overlayfs * zfs | Backend storage type for the container. | | **clone\_name** string | | Name of the new cloned server. This is only used when state is clone. | | **clone\_snapshot** boolean | **Choices:*** **no** ← * yes | Create a snapshot a container when cloning. This is not supported by all container storage backends. Enabling this may fail if the backing store does not support snapshots. | | **config** path | | Path to the LXC configuration file. | | **container\_command** string | | Run a command within a container. | | **container\_config** list / elements=string | | A list of `key=value` options to use when configuring a container. | | **container\_log** boolean | **Choices:*** **no** ← * yes | Enable a container log for host actions to the container. | | **container\_log\_level** string | **Choices:*** Info * info * **INFO** ← * Error * error * ERROR * Debug * debug * DEBUG | Set the log level for a container where \*container\_log\* was set. | | **directory** path | | Place rootfs directory under DIR. | | **fs\_size** string | **Default:**"5G" | File system Size. | | **fs\_type** string | **Default:**"ext4" | Create fstype TYPE. | | **lv\_name** string | | Name of the logical volume, defaults to the container name. If not specified, it defaults to `$CONTAINER_NAME`. | | **lxc\_path** path | | Place container under PATH. | | **name** string / required | | Name of a container. | | **state** string | **Choices:*** **started** ← * stopped * restarted * absent * frozen * clone | Define the state of a container. If you clone a container using *clone\_name* the newly cloned container created in a stopped state. The running container will be stopped while the clone operation is happening and upon completion of the clone the original container state will be restored. | | **template** string | **Default:**"ubuntu" | Name of the template to use within an LXC create. | | **template\_options** string | | Template options when building the container. | | **thinpool** string | | Use LVM thin pool called TP. | | **vg\_name** string | **Default:**"lxc" | If backend store is lvm, specify the name of the volume group. | | **zfs\_root** string | | Create zfs under given zfsroot. | Notes ----- Note * Containers must have a unique name. If you attempt to create a container with a name that already exists in the users namespace the module will simply return as “unchanged”. * The “container\_command” can be used with any state except “absent”. If used with state “stopped” the container will be “started”, the command executed, and then the container “stopped” again. Likewise if the state is “stopped” and the container does not exist it will be first created, “started”, the command executed, and then “stopped”. If you use a “|” in the variable you can use common script formatting within the variable itself The “container\_command” option will always execute as BASH. When using “container\_command” a log file is created in the /tmp/ directory which contains both stdout and stderr of any command executed. * If “archive” is **true** the system will attempt to create a compressed tarball of the running container. The “archive” option supports LVM backed containers and will create a snapshot of the running container when creating the archive. * If your distro does not have a package for “python2-lxc”, which is a requirement for this module, it can be installed from source at “<https://github.com/lxc/python2-lxc>” or installed via pip using the package name lxc-python2. Examples -------- ``` - name: Create a started container community.general.lxc_container: name: test-container-started container_log: true template: ubuntu state: started template_options: --release trusty - name: Create a stopped container community.general.lxc_container: name: test-container-stopped container_log: true template: ubuntu state: stopped template_options: --release trusty - name: Create a frozen container community.general.lxc_container: name: test-container-frozen container_log: true template: ubuntu state: frozen template_options: --release trusty container_command: | echo 'hello world.' | tee /opt/started-frozen # Create filesystem container, configure it, and archive it, and start it. - name: Create filesystem container community.general.lxc_container: name: test-container-config backing_store: dir container_log: true template: ubuntu state: started archive: true archive_compression: none container_config: - "lxc.aa_profile=unconfined" - "lxc.cgroup.devices.allow=a *:* rmw" template_options: --release trusty # Create an lvm container, run a complex command in it, add additional # configuration to it, create an archive of it, and finally leave the container # in a frozen state. The container archive will be compressed using bzip2 - name: Create a frozen lvm container community.general.lxc_container: name: test-container-lvm container_log: true template: ubuntu state: frozen backing_store: lvm template_options: --release trusty container_command: | apt-get update apt-get install -y vim lxc-dev echo 'hello world.' | tee /opt/started if [[ -f "/opt/started" ]]; then echo 'hello world.' | tee /opt/found-started fi container_config: - "lxc.aa_profile=unconfined" - "lxc.cgroup.devices.allow=a *:* rmw" archive: true archive_compression: bzip2 register: lvm_container_info - name: Debug info on container "test-container-lvm" ansible.builtin.debug: var: lvm_container_info - name: Run a command in a container and ensure its in a "stopped" state. community.general.lxc_container: name: test-container-started state: stopped container_command: | echo 'hello world.' | tee /opt/stopped - name: Run a command in a container and ensure its it in a "frozen" state. community.general.lxc_container: name: test-container-stopped state: frozen container_command: | echo 'hello world.' | tee /opt/frozen - name: Start a container community.general.lxc_container: name: test-container-stopped state: started - name: Run a command in a container and then restart it community.general.lxc_container: name: test-container-started state: restarted container_command: | echo 'hello world.' | tee /opt/restarted - name: Run a complex command within a "running" container community.general.lxc_container: name: test-container-started container_command: | apt-get update apt-get install -y curl wget vim apache2 echo 'hello world.' | tee /opt/started if [[ -f "/opt/started" ]]; then echo 'hello world.' | tee /opt/found-started fi # Create an archive of an existing container, save the archive to a defined # path and then destroy it. - name: Archive container community.general.lxc_container: name: test-container-started state: absent archive: true archive_path: /opt/archives # Create a container using overlayfs, create an archive of it, create a # snapshot clone of the container and and finally leave the container # in a frozen state. The container archive will be compressed using gzip. - name: Create an overlayfs container archive and clone it community.general.lxc_container: name: test-container-overlayfs container_log: true template: ubuntu state: started backing_store: overlayfs template_options: --release trusty clone_snapshot: true clone_name: test-container-overlayfs-clone-snapshot archive: true archive_compression: gzip register: clone_container_info - name: Debug info on container "test-container" ansible.builtin.debug: var: clone_container_info - name: Clone a container using snapshot community.general.lxc_container: name: test-container-overlayfs-clone-snapshot backing_store: overlayfs clone_name: test-container-overlayfs-clone-snapshot2 clone_snapshot: true - name: Create a new container and clone it community.general.lxc_container: name: test-container-new-archive backing_store: dir clone_name: test-container-new-archive-clone - name: Archive and clone a container then destroy it community.general.lxc_container: name: test-container-new-archive state: absent clone_name: test-container-new-archive-destroyed-clone archive: true archive_compression: gzip - name: Start a cloned container. community.general.lxc_container: name: test-container-new-archive-destroyed-clone state: started - name: Destroy a container community.general.lxc_container: name: '{{ item }}' state: absent with_items: - test-container-stopped - test-container-started - test-container-frozen - test-container-lvm - test-container-config - test-container-overlayfs - test-container-overlayfs-clone - test-container-overlayfs-clone-snapshot - test-container-overlayfs-clone-snapshot2 - test-container-new-archive - test-container-new-archive-clone - test-container-new-archive-destroyed-clone ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **lxc\_container** complex | success | container information | | | **archive** string | success, when archive is true | resulting state of the container **Sample:** /tmp/test-container-config.tar | | | **clone** boolean | success, when clone\_name is specified | if the container was cloned **Sample:** True | | | **init\_pid** integer | success | pid of the lxc init process **Sample:** 19786 | | | **interfaces** list / elements=string | success | list of the container's network interfaces **Sample:** ['eth0', 'lo'] | | | **ips** list / elements=string | success | list of ips **Sample:** ['10.0.3.3'] | | | **name** string | success | name of the lxc container **Sample:** test\_host | | | **state** string | success | resulting state of the container **Sample:** running | ### Authors * Kevin Carter (@cloudnull) ansible community.general.easy_install – Installs Python libraries community.general.easy\_install – Installs Python libraries =========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.easy_install`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Installs Python libraries, optionally in a *virtualenv* Requirements ------------ The below requirements are needed on the host that executes this module. * virtualenv Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **executable** string | **Default:**"easy\_install" | The explicit executable or a pathname to the executable to be used to run easy\_install for a specific version of Python installed in the system. For example `easy_install-3.3`, if there are both Python 2.7 and 3.3 installations in the system and you want to run easy\_install for the Python 3.3 installation. | | **name** string / required | | A Python library name | | **state** string | **Choices:*** **present** ← * latest | The desired state of the library. `latest` ensures that the latest version is installed. | | **virtualenv** string | | an optional *virtualenv* directory path to install into. If the *virtualenv* does not exist, it is created automatically | | **virtualenv\_command** string | **Default:**"virtualenv" | The command to create the virtual environment with. For example `pyvenv`, `virtualenv`, `virtualenv2`. | | **virtualenv\_site\_packages** boolean | **Choices:*** **no** ← * yes | Whether the virtual environment will inherit packages from the global site-packages directory. Note that if this setting is changed on an already existing virtual environment it will not have any effect, the environment must be deleted and newly created. | Notes ----- Note * Please note that the `easy_install` module can only install Python libraries. Thus this module is not able to remove libraries. It is generally recommended to use the [ansible.builtin.pip](../../ansible/builtin/pip_module#ansible-collections-ansible-builtin-pip-module) module which you can first install using [community.general.easy\_install](#ansible-collections-community-general-easy-install-module). * Also note that *virtualenv* must be installed on the remote host if the `virtualenv` parameter is specified. Examples -------- ``` - name: Install or update pip community.general.easy_install: name: pip state: latest - name: Install Bottle into the specified virtualenv community.general.easy_install: name: bottle virtualenv: /webapps/myapp/venv ``` ### Authors * Matt Wright (@mattupstate) ansible community.general.gconftool2 – Edit GNOME Configurations community.general.gconftool2 – Edit GNOME Configurations ======================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.gconftool2`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module allows for the manipulation of GNOME 2 Configuration via gconftool-2. Please see the gconftool-2(1) man pages for more details. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config\_source** string | | Specify a configuration source to use rather than the default path. See man gconftool-2(1) | | **direct** boolean | **Choices:*** **no** ← * yes | Access the config database directly, bypassing server. If direct is specified then the config\_source must be specified as well. See man gconftool-2(1) | | **key** string / required | | A GConf preference key is an element in the GConf repository that corresponds to an application preference. See man gconftool-2(1) | | **state** string / required | **Choices:*** absent * get * present | The action to take upon the key/value. | | **value** string | | Preference keys typically have simple values such as strings, integers, or lists of strings and integers. This is ignored if the state is "get". See man gconftool-2(1) | | **value\_type** string | **Choices:*** bool * float * int * string | The type of value being set. This is ignored if the state is "get". | Examples -------- ``` - name: Change the widget font to "Serif 12" community.general.gconftool2: key: "/desktop/gnome/interface/font_name" value_type: "string" value: "Serif 12" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **key** string | success | The key specified in the module parameters **Sample:** /desktop/gnome/interface/font\_name | | **value** string | success | The value of the preference key after executing the module **Sample:** Serif 12 | | **value\_type** string | success | The type of the value that was changed **Sample:** string | ### Authors * Kenneth D. Evensen (@kevensen) ansible community.general.oneandone_private_network – Configure 1&1 private networking. community.general.oneandone\_private\_network – Configure 1&1 private networking. ================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneandone_private_network`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Create, remove, reconfigure, update a private network. This module has a dependency on 1and1 >= 1.0 Requirements ------------ The below requirements are needed on the host that executes this module. * 1and1 * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **add\_members** list / elements=string | | List of server identifiers (name or id) to be added to the private network. | | **api\_url** string | | Custom API URL. Overrides the ONEANDONE\_API\_URL environment variable. | | **auth\_token** string | | Authenticating API token provided by 1&1. | | **datacenter** string | **Choices:*** US * ES * DE * GB | The identifier of the datacenter where the private network will be created | | **description** string | | Set a description for the network. | | **name** string | | Private network name used with present state. Used as identifier (id or name) when used with absent state. | | **network\_address** string | | Set a private network space, i.e. 192.168.1.0 | | **private\_network** string | | The identifier (id or name) of the network used with update state. | | **remove\_members** list / elements=string | | List of server identifiers (name or id) to be removed from the private network. | | **state** string | **Choices:*** **present** ← * absent * update | Define a network's state to create, remove, or update. | | **subnet\_mask** string | | Set the netmask for the private network, i.e. 255.255.255.0 | | **wait** boolean | **Choices:*** no * **yes** ← | wait for the instance to be in state 'running' before returning | | **wait\_interval** integer | **Default:**5 | Defines the number of seconds to wait when using the \_wait\_for methods | | **wait\_timeout** integer | **Default:**600 | how long before wait gives up, in seconds | Examples -------- ``` - name: Create a private network community.general.oneandone_private_network: auth_token: oneandone_private_api_key name: backup_network description: Testing creation of a private network with ansible network_address: 70.35.193.100 subnet_mask: 255.0.0.0 datacenter: US - name: Destroy a private network community.general.oneandone_private_network: auth_token: oneandone_private_api_key state: absent name: backup_network - name: Modify the private network community.general.oneandone_private_network: auth_token: oneandone_private_api_key state: update private_network: backup_network network_address: 192.168.2.0 subnet_mask: 255.255.255.0 - name: Add members to the private network community.general.oneandone_private_network: auth_token: oneandone_private_api_key state: update private_network: backup_network add_members: - server identifier (id or name) - name: Remove members from the private network community.general.oneandone_private_network: auth_token: oneandone_private_api_key state: update private_network: backup_network remove_members: - server identifier (id or name) ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **private\_network** dictionary | always | Information about the private network. **Sample:** {"name": "backup\_network", "id": "55726DEDA20C99CF6F2AF8F18CAC9963"} | ### Authors * Amel Ajdinovic (@aajdinov) * Ethan Devenport (@edevenport)
programming_docs
ansible community.general.udm_dns_zone – Manage dns zones on a univention corporate server community.general.udm\_dns\_zone – Manage dns zones on a univention corporate server ==================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.udm_dns_zone`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This module allows to manage dns zones on a univention corporate server (UCS). It uses the python API of the UCS to create a new object or edit it. Requirements ------------ The below requirements are needed on the host that executes this module. * Python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **contact** string | **Default:**"" | Contact person in the SOA record. | | **expire** integer | **Default:**604800 | Specifies the upper limit on the time interval that can elapse before the zone is no longer authoritative. | | **interfaces** list / elements=string | | List of interface IP addresses, on which the server should response this zone. Required if `state=present`. | | **mx** list / elements=string | **Default:**[] | List of MX servers. (Must declared as A or AAAA records). | | **nameserver** list / elements=string | | List of appropriate name servers. Required if `state=present`. | | **refresh** integer | **Default:**3600 | Interval before the zone should be refreshed. | | **retry** integer | **Default:**1800 | Interval that should elapse before a failed refresh should be retried. | | **state** string | **Choices:*** **present** ← * absent | Whether the dns zone is present or not. | | **ttl** integer | **Default:**600 | Minimum TTL field that should be exported with any RR from this zone. | | **type** string / required | | Define if the zone is a forward or reverse DNS zone. The available choices are: `forward_zone`, `reverse_zone`. | | **zone** string / required | | DNS zone name, e.g. `example.com`. aliases: name | Examples -------- ``` - name: Create a DNS zone on a UCS community.general.udm_dns_zone: zone: example.com type: forward_zone nameserver: - ucs.example.com interfaces: - 192.0.2.1 ``` ### Authors * Tobias Rüetschi (@keachi) ansible community.general.utm_ca_host_key_cert – create, update or destroy ca host_key_cert entry in Sophos UTM community.general.utm\_ca\_host\_key\_cert – create, update or destroy ca host\_key\_cert entry in Sophos UTM ============================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.utm_ca_host_key_cert`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Create, update or destroy a ca host\_key\_cert entry in SOPHOS UTM. * This module needs to have the REST Ability of the UTM to be activated. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ca** string / required | | A reference to an existing utm\_ca\_signing\_ca or utm\_ca\_verification\_ca object. | | **certificate** string / required | | The certificate in PEM format. | | **comment** string | | Optional comment string. | | **encrypted** boolean | **Choices:*** **no** ← * yes | Optionally enable encryption. | | **headers** dictionary | | A dictionary of additional headers to be sent to POST and PUT requests. Is needed for some modules | | **key** string | | Optional private key in PEM format. | | **meta** string / required | | A reference to an existing utm\_ca\_meta\_x509 object. | | **name** string / required | | The name of the object. Will be used to identify the entry. | | **state** string | **Choices:*** absent * **present** ← | The desired state of the object. `present` will create or update an object `absent` will delete an object if it was present | | **utm\_host** string / required | | The REST Endpoint of the Sophos UTM. | | **utm\_port** integer | **Default:**4444 | The port of the REST interface. | | **utm\_protocol** string | **Choices:*** http * **https** ← | The protocol of the REST Endpoint. | | **utm\_token** string / required | | The token used to identify at the REST-API. See <https://www.sophos.com/en-us/medialibrary/PDFs/documentation/UTMonAWS/Sophos-UTM-RESTful-API.pdf?la=en>, Chapter 2.4.2. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether the REST interface's ssl certificate should be verified or not. | Examples -------- ``` - name: Create a ca_host_key_cert entry community.general.utm_ca_host_key_cert: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestHostKeyCertEntry ca: REF_ca/signing_ca_OBJECT_STRING meta: REF_ca/meta_x509_OBJECT_STRING certificate: | --- BEGIN CERTIFICATE --- . . . . . . . . . --- END CERTIFICATE --- state: present - name: Remove a ca_host_key_cert entry community.general.utm_ca_host_key_cert: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestHostKeyCertEntry state: absent - name: Read a ca_host_key_cert entry community.general.utm_ca_host_key_cert: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestHostKeyCertEntry state: info ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **result** complex | success | The utm object that was created | | | **\_locked** boolean | success | Whether or not the object is currently locked | | | **\_ref** string | success | The reference name of the object | | | **\_type** string | success | The type of the object | | | **ca** string | success | A reference to an existing utm\_ca\_signing\_ca or utm\_ca\_verification\_ca object. | | | **certificate** string | success | The certificate in PEM format | | | **comment** string | success | Comment string (may be empty string) | | | **encrypted** boolean | success | If encryption is enabled | | | **key** string | success | Private key in PEM format (may be empty string) | | | **meta** string | success | A reference to an existing utm\_ca\_meta\_x509 object. | | | **name** string | success | The name of the object | ### Authors * Stephan Schwarz (@stearz) ansible community.general.apk – Manages apk packages community.general.apk – Manages apk packages ============================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.apk`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages *apk* packages for Alpine Linux. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **available** boolean | **Choices:*** **no** ← * yes | During upgrade, reset versioned world dependencies and change logic to prefer replacing or downgrading packages (instead of holding them) if the currently installed package is no longer available from any repository. | | **name** list / elements=string | | A package name, like `foo`, or multiple packages, like `foo, bar`. | | **no\_cache** boolean added in 1.0.0 of community.general | **Choices:*** **no** ← * yes | Do not use any local cache path. | | **repository** list / elements=string | | A package repository or multiple repositories. Unlike with the underlying apk command, this list will override the system repositories rather than supplement them. | | **state** string | **Choices:*** **present** ← * absent * latest * installed * removed | Indicates the desired package(s) state. `present` ensures the package(s) is/are present. `installed` can be used as an alias. `absent` ensures the package(s) is/are absent. `removed` can be used as an alias. `latest` ensures the package(s) is/are present and the latest version(s). | | **update\_cache** boolean | **Choices:*** **no** ← * yes | Update repository indexes. Can be run with other steps or on it's own. | | **upgrade** boolean | **Choices:*** **no** ← * yes | Upgrade all installed packages to their latest version. | Notes ----- Note * “name” and “upgrade” are mutually exclusive. * When used with a `loop:` each package will be processed individually, it is much more efficient to pass the list directly to the `name` option. Examples -------- ``` - name: Update repositories and install foo package community.general.apk: name: foo update_cache: yes - name: Update repositories and install foo and bar packages community.general.apk: name: foo,bar update_cache: yes - name: Remove foo package community.general.apk: name: foo state: absent - name: Remove foo and bar packages community.general.apk: name: foo,bar state: absent - name: Install the package foo community.general.apk: name: foo state: present - name: Install the packages foo and bar community.general.apk: name: foo,bar state: present - name: Update repositories and update package foo to latest version community.general.apk: name: foo state: latest update_cache: yes - name: Update repositories and update packages foo and bar to latest versions community.general.apk: name: foo,bar state: latest update_cache: yes - name: Update all installed packages to the latest versions community.general.apk: upgrade: yes - name: Upgrade / replace / downgrade / uninstall all installed packages to the latest versions available community.general.apk: available: yes upgrade: yes - name: Update repositories as a separate step community.general.apk: update_cache: yes - name: Install package from a specific repository community.general.apk: name: foo state: latest update_cache: yes repository: http://dl-3.alpinelinux.org/alpine/edge/main - name: Install package without using cache community.general.apk: name: foo state: latest no_cache: yes ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **packages** list / elements=string | when packages have changed | a list of packages that have been changed **Sample:** ['package', 'other-package'] | ### Authors * Kevin Brebanov (@kbrebanov) ansible community.general.keycloak_realm – Allows administration of Keycloak realm via Keycloak API community.general.keycloak\_realm – Allows administration of Keycloak realm via Keycloak API ============================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.keycloak_realm`. New in version 3.0.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module allows the administration of Keycloak realm via the Keycloak REST API. It requires access to the REST API via OpenID Connect; the user connecting and the realm being used must have the requisite access rights. In a default Keycloak installation, admin-cli and an admin user would work, as would a separate realm definition with the scope tailored to your needs and a user having the expected roles. * The names of module options are snake\_cased versions of the camelCase ones found in the Keycloak API and its documentation at <https://www.keycloak.org/docs-api/8.0/rest-api/index.html>. Aliases are provided so camelCased versions can be used as well. * The Keycloak API does not always sanity check inputs e.g. you can set SAML-specific settings on an OpenID Connect client for instance and vice versa. Be careful. If you do not specify a setting, usually a sensible default is chosen. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **access\_code\_lifespan** integer | | The realm access code lifespan. aliases: accessCodeLifespan | | **access\_code\_lifespan\_login** integer | | The realm access code lifespan login. aliases: accessCodeLifespanLogin | | **access\_code\_lifespan\_user\_action** integer | | The realm access code lifespan user action. aliases: accessCodeLifespanUserAction | | **access\_token\_lifespan** integer | | The realm access token lifespan. aliases: accessTokenLifespan | | **access\_token\_lifespan\_for\_implicit\_flow** integer | | The realm access token lifespan for implicit flow. aliases: accessTokenLifespanForImplicitFlow | | **account\_theme** string | | The realm account theme. aliases: accountTheme | | **action\_token\_generated\_by\_admin\_lifespan** integer | | The realm action token generated by admin lifespan. aliases: actionTokenGeneratedByAdminLifespan | | **action\_token\_generated\_by\_user\_lifespan** integer | | The realm action token generated by user lifespan. aliases: actionTokenGeneratedByUserLifespan | | **admin\_events\_details\_enabled** boolean | **Choices:*** no * yes | The realm admin events details enabled. aliases: adminEventsDetailsEnabled | | **admin\_events\_enabled** boolean | **Choices:*** no * yes | The realm admin events enabled. aliases: adminEventsEnabled | | **admin\_theme** string | | The realm admin theme. aliases: adminTheme | | **attributes** dictionary | | The realm attributes. | | **auth\_client\_id** string | **Default:**"admin-cli" | OpenID Connect *client\_id* to authenticate to the API with. | | **auth\_client\_secret** string | | Client Secret to use in conjunction with *auth\_client\_id* (if required). | | **auth\_keycloak\_url** string / required | | URL to the Keycloak instance. aliases: url | | **auth\_password** string | | Password to authenticate for API access with. aliases: password | | **auth\_realm** string | | Keycloak realm name to authenticate to for API access. | | **auth\_username** string | | Username to authenticate for API access with. aliases: username | | **browser\_flow** string | | The realm browser flow. aliases: browserFlow | | **browser\_security\_headers** dictionary | | The realm browser security headers. aliases: browserSecurityHeaders | | **brute\_force\_protected** boolean | **Choices:*** no * yes | The realm brute force protected. aliases: bruteForceProtected | | **client\_authentication\_flow** string | | The realm client authentication flow. aliases: clientAuthenticationFlow | | **client\_scope\_mappings** dictionary | | The realm client scope mappings. aliases: clientScopeMappings | | **default\_default\_client\_scopes** list / elements=dictionary | | The realm default default client scopes. aliases: defaultDefaultClientScopes | | **default\_groups** list / elements=dictionary | | The realm default groups. aliases: defaultGroups | | **default\_locale** string | | The realm default locale. aliases: defaultLocale | | **default\_optional\_client\_scopes** list / elements=dictionary | | The realm default optional client scopes. aliases: defaultOptionalClientScopes | | **default\_roles** list / elements=dictionary | | The realm default roles. aliases: defaultRoles | | **default\_signature\_algorithm** string | | The realm default signature algorithm. aliases: defaultSignatureAlgorithm | | **direct\_grant\_flow** string | | The realm direct grant flow. aliases: directGrantFlow | | **display\_name** string | | The realm display name. aliases: displayName | | **display\_name\_html** string | | The realm display name HTML. aliases: displayNameHtml | | **docker\_authentication\_flow** string | | The realm docker authentication flow. aliases: dockerAuthenticationFlow | | **duplicate\_emails\_allowed** boolean | **Choices:*** no * yes | The realm duplicate emails allowed option. aliases: duplicateEmailsAllowed | | **edit\_username\_allowed** boolean | **Choices:*** no * yes | The realm edit username allowed option. aliases: editUsernameAllowed | | **email\_theme** string | | The realm email theme. aliases: emailTheme | | **enabled** boolean | **Choices:*** no * yes | The realm enabled option. | | **enabled\_event\_types** list / elements=string | | The realm enabled event types. aliases: enabledEventTypes | | **events\_enabled** boolean added in 3.6.0 of community.general | **Choices:*** no * yes | Enables or disables login events for this realm. aliases: eventsEnabled | | **events\_expiration** integer | | The realm events expiration. aliases: eventsExpiration | | **events\_listeners** list / elements=string | | The realm events listeners. aliases: eventsListeners | | **failure\_factor** integer | | The realm failure factor. aliases: failureFactor | | **id** string | | The realm to create. | | **internationalization\_enabled** boolean | **Choices:*** no * yes | The realm internationalization enabled option. aliases: internationalizationEnabled | | **login\_theme** string | | The realm login theme. aliases: loginTheme | | **login\_with\_email\_allowed** boolean | **Choices:*** no * yes | The realm login with email allowed option. aliases: loginWithEmailAllowed | | **max\_delta\_time\_seconds** integer | | The realm max delta time in seconds. aliases: maxDeltaTimeSeconds | | **max\_failure\_wait\_seconds** integer | | The realm max failure wait in seconds. aliases: maxFailureWaitSeconds | | **minimum\_quick\_login\_wait\_seconds** integer | | The realm minimum quick login wait in seconds. aliases: minimumQuickLoginWaitSeconds | | **not\_before** integer | | The realm not before. aliases: notBefore | | **offline\_session\_idle\_timeout** integer | | The realm offline session idle timeout. aliases: offlineSessionIdleTimeout | | **offline\_session\_max\_lifespan** integer | | The realm offline session max lifespan. aliases: offlineSessionMaxLifespan | | **offline\_session\_max\_lifespan\_enabled** boolean | **Choices:*** no * yes | The realm offline session max lifespan enabled option. aliases: offlineSessionMaxLifespanEnabled | | **otp\_policy\_algorithm** string | | The realm otp policy algorithm. aliases: otpPolicyAlgorithm | | **otp\_policy\_digits** integer | | The realm otp policy digits. aliases: otpPolicyDigits | | **otp\_policy\_initial\_counter** integer | | The realm otp policy initial counter. aliases: otpPolicyInitialCounter | | **otp\_policy\_look\_ahead\_window** integer | | The realm otp policy look ahead window. aliases: otpPolicyLookAheadWindow | | **otp\_policy\_period** integer | | The realm otp policy period. aliases: otpPolicyPeriod | | **otp\_policy\_type** string | | The realm otp policy type. aliases: otpPolicyType | | **otp\_supported\_applications** list / elements=string | | The realm otp supported applications. aliases: otpSupportedApplications | | **password\_policy** string | | The realm password policy. aliases: passwordPolicy | | **permanent\_lockout** boolean | **Choices:*** no * yes | The realm permanent lockout. aliases: permanentLockout | | **quick\_login\_check\_milli\_seconds** integer | | The realm quick login check in milliseconds. aliases: quickLoginCheckMilliSeconds | | **realm** string | | The realm name. | | **refresh\_token\_max\_reuse** integer | | The realm refresh token max reuse. aliases: refreshTokenMaxReuse | | **registration\_allowed** boolean | **Choices:*** no * yes | The realm registration allowed option. aliases: registrationAllowed | | **registration\_email\_as\_username** boolean | **Choices:*** no * yes | The realm registration email as username option. aliases: registrationEmailAsUsername | | **registration\_flow** string | | The realm registration flow. aliases: registrationFlow | | **remember\_me** boolean | **Choices:*** no * yes | The realm remember me option. aliases: rememberMe | | **reset\_credentials\_flow** string | | The realm reset credentials flow. aliases: resetCredentialsFlow | | **reset\_password\_allowed** boolean | **Choices:*** no * yes | The realm reset password allowed option. aliases: resetPasswordAllowed | | **revoke\_refresh\_token** boolean | **Choices:*** no * yes | The realm revoke refresh token option. aliases: revokeRefreshToken | | **smtp\_server** dictionary | | The realm smtp server. aliases: smtpServer | | **ssl\_required** string | **Choices:*** all * external * none | The realm ssl required option. aliases: sslRequired | | **sso\_session\_idle\_timeout** integer | | The realm sso session idle timeout. aliases: ssoSessionIdleTimeout | | **sso\_session\_idle\_timeout\_remember\_me** integer | | The realm sso session idle timeout remember me. aliases: ssoSessionIdleTimeoutRememberMe | | **sso\_session\_max\_lifespan** integer | | The realm sso session max lifespan. aliases: ssoSessionMaxLifespan | | **sso\_session\_max\_lifespan\_remember\_me** integer | | The realm sso session max lifespan remember me. aliases: ssoSessionMaxLifespanRememberMe | | **state** string | **Choices:*** **present** ← * absent | State of the realm. On `present`, the realm will be created (or updated if it exists already). On `absent`, the realm will be removed if it exists. | | **supported\_locales** list / elements=string | | The realm supported locales. aliases: supportedLocales | | **token** string added in 3.0.0 of community.general | | Authentication token for Keycloak API. | | **user\_managed\_access\_allowed** boolean | **Choices:*** no * yes | The realm user managed access allowed option. aliases: userManagedAccessAllowed | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Verify TLS certificates (do not disable this in production). | | **verify\_email** boolean | **Choices:*** no * yes | The realm verify email option. aliases: verifyEmail | | **wait\_increment\_seconds** integer | | The realm wait increment in seconds. aliases: waitIncrementSeconds | Examples -------- ``` - name: Create or update Keycloak realm (minimal example) community.general.keycloak_realm: auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD id: realm state: present - name: Delete a Keycloak realm community.general.keycloak_realm: auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD id: test state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **end\_state** dictionary | always | realm representation of realm after module execution (sample is truncated) **Sample:** {'adminUrl': 'http://www.example.com/admin\_url', 'attributes': {'request.object.signature.alg': 'RS256'}} | | **existing** dictionary | always | realm representation of existing realm (sample is truncated) **Sample:** {'adminUrl': 'http://www.example.com/admin\_url', 'attributes': {'request.object.signature.alg': 'RS256'}} | | **msg** string | always | Message as to what action was taken **Sample:** Realm testrealm has been updated | | **proposed** dictionary | always | realm representation of proposed changes to realm **Sample:** {'id': 'test'} | ### Authors * Christophe Gilles (@kris2kris)
programming_docs
ansible community.general.keycloak_client – Allows administration of Keycloak clients via Keycloak API community.general.keycloak\_client – Allows administration of Keycloak clients via Keycloak API =============================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.keycloak_client`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module allows the administration of Keycloak clients via the Keycloak REST API. It requires access to the REST API via OpenID Connect; the user connecting and the client being used must have the requisite access rights. In a default Keycloak installation, admin-cli and an admin user would work, as would a separate client definition with the scope tailored to your needs and a user having the expected roles. * The names of module options are snake\_cased versions of the camelCase ones found in the Keycloak API and its documentation at <https://www.keycloak.org/docs-api/8.0/rest-api/index.html>. Aliases are provided so camelCased versions can be used as well. * The Keycloak API does not always sanity check inputs e.g. you can set SAML-specific settings on an OpenID Connect client for instance and vice versa. Be careful. If you do not specify a setting, usually a sensible default is chosen. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **admin\_url** string | | URL to the admin interface of the client This is 'adminUrl' in the Keycloak REST API. aliases: adminUrl | | **attributes** dictionary | | A dict of further attributes for this client. This can contain various configuration settings; an example is given in the examples section. While an exhaustive list of permissible options is not available; possible options as of Keycloak 3.4 are listed below. The Keycloak API does not validate whether a given option is appropriate for the protocol used; if specified anyway, Keycloak will simply not use it. | | | **jwks.url** string | | For OpenID-Connect clients, URL where client keys in JWK are stored. | | | **jwt.credential.certificate** string | | For OpenID-Connect clients, client certificate for validating JWT issued by client and signed by its key, base64-encoded. | | | **request.object.signature.alg** string | | For OpenID-Connect clients, JWA algorithm which the client needs to use when sending OIDC request object. One of `any`, `none`, `RS256`. | | | **saml.authnstatement** string | | For SAML clients, boolean specifying whether or not a statement containing method and timestamp should be included in the login response. | | | **saml.client.signature** string | | For SAML clients, boolean specifying whether a client signature is required and validated. | | | **saml.encrypt** string | | Boolean specifying whether SAML assertions should be encrypted with the client's public key. | | | **saml.force.post.binding** string | | For SAML clients, boolean specifying whether always to use POST binding for responses. | | | **saml.onetimeuse.condition** string | | For SAML clients, boolean specifying whether a OneTimeUse condition should be included in login responses. | | | **saml.server.signature** string | | Boolean specifying whether SAML documents should be signed by the realm. | | | **saml.server.signature.keyinfo.ext** string | | For SAML clients, boolean specifying whether REDIRECT signing key lookup should be optimized through inclusion of the signing key id in the SAML Extensions element. | | | **saml.signature.algorithm** string | | Signature algorithm used to sign SAML documents. One of `RSA_SHA256`, `RSA_SHA1`, `RSA_SHA512`, or `DSA_SHA1`. | | | **saml.signing.certificate** string | | SAML signing key certificate, base64-encoded. | | | **saml.signing.private.key** string | | SAML signing key private key, base64-encoded. | | | **saml\_assertion\_consumer\_url\_post** string | | SAML POST Binding URL for the client's assertion consumer service (login responses). | | | **saml\_assertion\_consumer\_url\_redirect** string | | SAML Redirect Binding URL for the client's assertion consumer service (login responses). | | | **saml\_force\_name\_id\_format** string | | For SAML clients, Boolean specifying whether to ignore requested NameID subject format and using the configured one instead. | | | **saml\_name\_id\_format** string | | For SAML clients, the NameID format to use (one of `username`, `email`, `transient`, or `persistent`) | | | **saml\_signature\_canonicalization\_method** string | | SAML signature canonicalization method. This is one of four values, namely `http://www.w3.org/2001/10/xml-exc-c14n#` for EXCLUSIVE, `http://www.w3.org/2001/10/xml-exc-c14n#WithComments` for EXCLUSIVE\_WITH\_COMMENTS, `http://www.w3.org/TR/2001/REC-xml-c14n-20010315` for INCLUSIVE, and `http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments` for INCLUSIVE\_WITH\_COMMENTS. | | | **saml\_single\_logout\_service\_url\_post** string | | SAML POST binding url for the client's single logout service. | | | **saml\_single\_logout\_service\_url\_redirect** string | | SAML redirect binding url for the client's single logout service. | | | **use.jwks.url** string | | For OpenID-Connect clients, boolean specifying whether to use a JWKS URL to obtain client public keys. | | | **user.info.response.signature.alg** string | | For OpenID-Connect clients, JWA algorithm for signed UserInfo-endpoint responses. One of `RS256` or `unsigned`. | | **auth\_client\_id** string | **Default:**"admin-cli" | OpenID Connect *client\_id* to authenticate to the API with. | | **auth\_client\_secret** string | | Client Secret to use in conjunction with *auth\_client\_id* (if required). | | **auth\_keycloak\_url** string / required | | URL to the Keycloak instance. aliases: url | | **auth\_password** string | | Password to authenticate for API access with. aliases: password | | **auth\_realm** string | | Keycloak realm name to authenticate to for API access. | | **auth\_username** string | | Username to authenticate for API access with. aliases: username | | **authentication\_flow\_binding\_overrides** dictionary added in 3.4.0 of community.general | | Override realm authentication flow bindings. aliases: authenticationFlowBindingOverrides | | **authorization\_services\_enabled** boolean | **Choices:*** no * yes | Are authorization services enabled for this client or not (OpenID connect). This is 'authorizationServicesEnabled' in the Keycloak REST API. aliases: authorizationServicesEnabled | | **authorization\_settings** dictionary | | a data structure defining the authorization settings for this client. For reference, please see the Keycloak API docs at <https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_resourceserverrepresentation>. This is 'authorizationSettings' in the Keycloak REST API. aliases: authorizationSettings | | **base\_url** string | | Default URL to use when the auth server needs to redirect or link back to the client This is 'baseUrl' in the Keycloak REST API. aliases: baseUrl | | **bearer\_only** boolean | **Choices:*** no * yes | The access type of this client is bearer-only. This is 'bearerOnly' in the Keycloak REST API. aliases: bearerOnly | | **client\_authenticator\_type** string | **Choices:*** client-secret * client-jwt | How do clients authenticate with the auth server? Either `client-secret` or `client-jwt` can be chosen. When using `client-secret`, the module parameter *secret* can set it, while for `client-jwt`, you can use the keys `use.jwks.url`, `jwks.url`, and `jwt.credential.certificate` in the *attributes* module parameter to configure its behavior. This is 'clientAuthenticatorType' in the Keycloak REST API. aliases: clientAuthenticatorType | | **client\_id** string | | Client id of client to be worked on. This is usually an alphanumeric name chosen by you. Either this or *id* is required. If you specify both, *id* takes precedence. This is 'clientId' in the Keycloak REST API. aliases: clientId | | **client\_template** string | | Client template to use for this client. If it does not exist this field will silently be dropped. This is 'clientTemplate' in the Keycloak REST API. aliases: clientTemplate | | **consent\_required** boolean | **Choices:*** no * yes | If enabled, users have to consent to client access. This is 'consentRequired' in the Keycloak REST API. aliases: consentRequired | | **default\_roles** list / elements=string | | list of default roles for this client. If the client roles referenced do not exist yet, they will be created. This is 'defaultRoles' in the Keycloak REST API. aliases: defaultRoles | | **description** string | | Description of the client in Keycloak | | **direct\_access\_grants\_enabled** boolean | **Choices:*** no * yes | Are direct access grants enabled for this client or not (OpenID connect). This is 'directAccessGrantsEnabled' in the Keycloak REST API. aliases: directAccessGrantsEnabled | | **enabled** boolean | **Choices:*** no * yes | Is this client enabled or not? | | **frontchannel\_logout** boolean | **Choices:*** no * yes | Is frontchannel logout enabled for this client or not. This is 'frontchannelLogout' in the Keycloak REST API. aliases: frontchannelLogout | | **full\_scope\_allowed** boolean | **Choices:*** no * yes | Is the "Full Scope Allowed" feature set for this client or not. This is 'fullScopeAllowed' in the Keycloak REST API. aliases: fullScopeAllowed | | **id** string | | Id of client to be worked on. This is usually an UUID. Either this or *client\_id* is required. If you specify both, this takes precedence. | | **implicit\_flow\_enabled** boolean | **Choices:*** no * yes | Enable implicit flow for this client or not (OpenID connect). This is 'implicitFlowEnabled' in the Keycloak REST API. aliases: implicitFlowEnabled | | **name** string | | Name of the client (this is not the same as *client\_id*) | | **node\_re\_registration\_timeout** integer | | Cluster node re-registration timeout for this client. This is 'nodeReRegistrationTimeout' in the Keycloak REST API. aliases: nodeReRegistrationTimeout | | **not\_before** integer | | Revoke any tokens issued before this date for this client (this is a UNIX timestamp). This is 'notBefore' in the Keycloak REST API. aliases: notBefore | | **protocol** string | **Choices:*** openid-connect * saml | Type of client (either `openid-connect` or `saml`. | | **protocol\_mappers** list / elements=dictionary | | a list of dicts defining protocol mappers for this client. This is 'protocolMappers' in the Keycloak REST API. aliases: protocolMappers | | | **config** dictionary | | Dict specifying the configuration options for the protocol mapper; the contents differ depending on the value of *protocolMapper* and are not documented other than by the source of the mappers and its parent class(es). An example is given below. It is easiest to obtain valid config values by dumping an already-existing protocol mapper configuration through check-mode in the *existing* field. | | | **consentRequired** boolean | **Choices:*** no * yes | Specifies whether a user needs to provide consent to a client for this mapper to be active. | | | **consentText** string | | The human-readable name of the consent the user is presented to accept. | | | **id** string | | Usually a UUID specifying the internal ID of this protocol mapper instance. | | | **name** string | | The name of this protocol mapper. | | | **protocol** string | **Choices:*** openid-connect * saml | This is either `openid-connect` or `saml`, this specifies for which protocol this protocol mapper is active. | | | **protocolMapper** string | | The Keycloak-internal name of the type of this protocol-mapper. While an exhaustive list is impossible to provide since this may be extended through SPIs by the user of Keycloak, by default Keycloak as of 3.4 ships with at least `docker-v2-allow-all-mapper` `oidc-address-mapper` `oidc-full-name-mapper` `oidc-group-membership-mapper` `oidc-hardcoded-claim-mapper` `oidc-hardcoded-role-mapper` `oidc-role-name-mapper` `oidc-script-based-protocol-mapper` `oidc-sha256-pairwise-sub-mapper` `oidc-usermodel-attribute-mapper` `oidc-usermodel-client-role-mapper` `oidc-usermodel-property-mapper` `oidc-usermodel-realm-role-mapper` `oidc-usersessionmodel-note-mapper` `saml-group-membership-mapper` `saml-hardcode-attribute-mapper` `saml-hardcode-role-mapper` `saml-role-list-mapper` `saml-role-name-mapper` `saml-user-attribute-mapper` `saml-user-property-mapper` `saml-user-session-note-mapper` An exhaustive list of available mappers on your installation can be obtained on the admin console by going to Server Info -> Providers and looking under 'protocol-mapper'. | | **public\_client** boolean | **Choices:*** no * yes | Is the access type for this client public or not. This is 'publicClient' in the Keycloak REST API. aliases: publicClient | | **realm** string | **Default:**"master" | The realm to create the client in. | | **redirect\_uris** list / elements=string | | Acceptable redirect URIs for this client. This is 'redirectUris' in the Keycloak REST API. aliases: redirectUris | | **registered\_nodes** dictionary | | dict of registered cluster nodes (with `nodename` as the key and last registration time as the value). This is 'registeredNodes' in the Keycloak REST API. aliases: registeredNodes | | **registration\_access\_token** string | | The registration access token provides access for clients to the client registration service. This is 'registrationAccessToken' in the Keycloak REST API. aliases: registrationAccessToken | | **root\_url** string | | Root URL appended to relative URLs for this client This is 'rootUrl' in the Keycloak REST API. aliases: rootUrl | | **secret** string | | When using *client\_authenticator\_type* `client-secret` (the default), you can specify a secret here (otherwise one will be generated if it does not exit). If changing this secret, the module will not register a change currently (but the changed secret will be saved). | | **service\_accounts\_enabled** boolean | **Choices:*** no * yes | Are service accounts enabled for this client or not (OpenID connect). This is 'serviceAccountsEnabled' in the Keycloak REST API. aliases: serviceAccountsEnabled | | **standard\_flow\_enabled** boolean | **Choices:*** no * yes | Enable standard flow for this client or not (OpenID connect). This is 'standardFlowEnabled' in the Keycloak REST API. aliases: standardFlowEnabled | | **state** string | **Choices:*** **present** ← * absent | State of the client On `present`, the client will be created (or updated if it exists already). On `absent`, the client will be removed if it exists | | **surrogate\_auth\_required** boolean | **Choices:*** no * yes | Whether or not surrogate auth is required. This is 'surrogateAuthRequired' in the Keycloak REST API. aliases: surrogateAuthRequired | | **token** string added in 3.0.0 of community.general | | Authentication token for Keycloak API. | | **use\_template\_config** boolean | **Choices:*** no * yes | Whether or not to use configuration from the *client\_template*. This is 'useTemplateConfig' in the Keycloak REST API. aliases: useTemplateConfig | | **use\_template\_mappers** boolean | **Choices:*** no * yes | Whether or not to use mapper configuration from the *client\_template*. This is 'useTemplateMappers' in the Keycloak REST API. aliases: useTemplateMappers | | **use\_template\_scope** boolean | **Choices:*** no * yes | Whether or not to use scope configuration from the *client\_template*. This is 'useTemplateScope' in the Keycloak REST API. aliases: useTemplateScope | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Verify TLS certificates (do not disable this in production). | | **web\_origins** list / elements=string | | List of allowed CORS origins. This is 'webOrigins' in the Keycloak REST API. aliases: webOrigins | Examples -------- ``` - name: Create or update Keycloak client (minimal example), authentication with credentials community.general.keycloak_client: auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD client_id: test state: present delegate_to: localhost - name: Create or update Keycloak client (minimal example), authentication with token community.general.keycloak_client: auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master token: TOKEN client_id: test state: present delegate_to: localhost - name: Delete a Keycloak client community.general.keycloak_client: auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD client_id: test state: absent delegate_to: localhost - name: Create or update a Keycloak client (with all the bells and whistles) community.general.keycloak_client: auth_client_id: admin-cli auth_keycloak_url: https://auth.example.com/auth auth_realm: master auth_username: USERNAME auth_password: PASSWORD state: present realm: master client_id: test id: d8b127a3-31f6-44c8-a7e4-4ab9a3e78d95 name: this_is_a_test description: Description of this wonderful client root_url: https://www.example.com/ admin_url: https://www.example.com/admin_url base_url: basepath enabled: True client_authenticator_type: client-secret secret: REALLYWELLKEPTSECRET redirect_uris: - https://www.example.com/* - http://localhost:8888/ web_origins: - https://www.example.com/* not_before: 1507825725 bearer_only: False consent_required: False standard_flow_enabled: True implicit_flow_enabled: False direct_access_grants_enabled: False service_accounts_enabled: False authorization_services_enabled: False public_client: False frontchannel_logout: False protocol: openid-connect full_scope_allowed: false node_re_registration_timeout: -1 client_template: test use_template_config: False use_template_scope: false use_template_mappers: no registered_nodes: node01.example.com: 1507828202 registration_access_token: eyJWT_TOKEN surrogate_auth_required: false default_roles: - test01 - test02 authentication_flow_binding_overrides: browser: 4c90336b-bf1d-4b87-916d-3677ba4e5fbb protocol_mappers: - config: access.token.claim: True claim.name: "family_name" id.token.claim: True jsonType.label: String user.attribute: lastName userinfo.token.claim: True consentRequired: True consentText: "${familyName}" name: family name protocol: openid-connect protocolMapper: oidc-usermodel-property-mapper - config: attribute.name: Role attribute.nameformat: Basic single: false consentRequired: false name: role list protocol: saml protocolMapper: saml-role-list-mapper attributes: saml.authnstatement: True saml.client.signature: True saml.force.post.binding: True saml.server.signature: True saml.signature.algorithm: RSA_SHA256 saml.signing.certificate: CERTIFICATEHERE saml.signing.private.key: PRIVATEKEYHERE saml_force_name_id_format: False saml_name_id_format: username saml_signature_canonicalization_method: "http://www.w3.org/2001/10/xml-exc-c14n#" user.info.response.signature.alg: RS256 request.object.signature.alg: RS256 use.jwks.url: true jwks.url: JWKS_URL_FOR_CLIENT_AUTH_JWT jwt.credential.certificate: JWT_CREDENTIAL_CERTIFICATE_FOR_CLIENT_AUTH delegate_to: localhost ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **end\_state** dictionary | always | client representation of client after module execution (sample is truncated) **Sample:** {'adminUrl': 'http://www.example.com/admin\_url', 'attributes': {'request.object.signature.alg': 'RS256'}} | | **existing** dictionary | always | client representation of existing client (sample is truncated) **Sample:** {'adminUrl': 'http://www.example.com/admin\_url', 'attributes': {'request.object.signature.alg': 'RS256'}} | | **msg** string | always | Message as to what action was taken **Sample:** Client testclient has been updated | | **proposed** dictionary | always | client representation of proposed changes to client **Sample:** {'clientId': 'test'} | ### Authors * Eike Frost (@eikef)
programming_docs
ansible community.general.online – Scaleway (previously Online SAS or Online.net) inventory source community.general.online – Scaleway (previously Online SAS or Online.net) inventory source ========================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.online`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Get inventory hosts from Scaleway (previously Online SAS or Online.net). Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **groups** list / elements=string | **Choices:*** location * offer * rpn | | List of groups. | | **hostnames** list / elements=string | **Choices:*** **public\_ipv4** ← * private\_ipv4 * hostname **Default:**["public\_ipv4"] | | List of preference about what to use as an hostname. | | **oauth\_token** string / required | | env:ONLINE\_TOKEN env:ONLINE\_API\_KEY env:ONLINE\_OAUTH\_TOKEN | Online OAuth token. | | **plugin** string / required | **Choices:*** online * community.general.online | | token that ensures this is a source file for the 'online' plugin. | Examples -------- ``` # online_inventory.yml file in YAML format # Example command line: ansible-inventory --list -i online_inventory.yml plugin: community.general.online hostnames: - public_ipv4 groups: - location - offer - rpn ``` ### Authors * Remy Leone (@sieben) ansible community.general.proxmox_domain_info – Retrieve information about one or more Proxmox VE domains community.general.proxmox\_domain\_info – Retrieve information about one or more Proxmox VE domains =================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.proxmox_domain_info`. New in version 1.3.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Retrieve information about one or more Proxmox VE domains. Requirements ------------ The below requirements are needed on the host that executes this module. * proxmoxer * requests Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_host** string / required | | Specify the target host of the Proxmox VE cluster. | | **api\_password** string | | Specify the password to authenticate with. You can use `PROXMOX_PASSWORD` environment variable. | | **api\_token\_id** string added in 1.3.0 of community.general | | Specify the token ID. | | **api\_token\_secret** string added in 1.3.0 of community.general | | Specify the token secret. | | **api\_user** string / required | | Specify the user to authenticate with. | | **domain** string | | Restrict results to a specific authentication realm. aliases: realm, name | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: List existing domains community.general.proxmox_domain_info: api_host: helldorado api_user: root@pam api_password: "{{ password | default(omit) }}" api_token_id: "{{ token_id | default(omit) }}" api_token_secret: "{{ token_secret | default(omit) }}" register: proxmox_domains - name: Retrieve information about the pve domain community.general.proxmox_domain_info: api_host: helldorado api_user: root@pam api_password: "{{ password | default(omit) }}" api_token_id: "{{ token_id | default(omit) }}" api_token_secret: "{{ token_secret | default(omit) }}" domain: pve register: proxmox_domain_pve ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **proxmox\_domains** list / elements=dictionary | always, but can be empty | List of authentication domains. | | | **comment** string | on success | Short description of the realm. | | | **digest** string | on success, can be absent | Realm hash. | | | **realm** string | on success | Realm name. | | | **type** string | on success | Realm type. | ### Authors * Tristan Le Guern (@tleguern) ansible community.general.rax_cdb – create/delete or resize a Rackspace Cloud Databases instance community.general.rax\_cdb – create/delete or resize a Rackspace Cloud Databases instance ========================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rax_cdb`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * creates / deletes or resize a Rackspace Cloud Databases instance and optionally waits for it to be ‘running’. The name option needs to be unique since it’s used to identify the instance. Requirements ------------ The below requirements are needed on the host that executes this module. * pyrax * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string | | Rackspace API key, overrides *credentials*. aliases: password | | **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/> | | **cdb\_type** string | **Default:**"MySQL" | type of instance (i.e. MySQL, MariaDB, Percona) aliases: type | | **cdb\_version** string | **Default:**5.6 | version of database (MySQL supports 5.1 and 5.6, MariaDB supports 10, Percona supports 5.6) The available choices are: `5.1`, `5.6` and `10`. aliases: version | | **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided. aliases: creds\_file | | **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. | | **flavor** integer | **Default:**1 | flavor to use for the instance 1 to 6 (i.e. 512MB to 16GB) | | **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. | | **name** string / required | | Name of the databases server instance | | **region** string | | Region to create an instance in. | | **state** string | **Choices:*** **present** ← * absent | Indicate desired state of the resource | | **tenant\_id** string | | The tenant ID used for authentication. | | **tenant\_name** string | | The tenant name used for authentication. | | **username** string | | Rackspace username, overrides *credentials*. | | **validate\_certs** boolean | **Choices:*** no * yes | Whether or not to require SSL validation of API endpoints. aliases: verify\_ssl | | **volume** integer | **Default:**2 | Volume size of the database 1-150GB | | **wait** boolean | **Choices:*** **no** ← * yes | wait for the instance to be in state 'running' before returning | | **wait\_timeout** integer | **Default:**300 | how long before wait gives up, in seconds | Notes ----- Note * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) Examples -------- ``` - name: Build a Cloud Databases gather_facts: False tasks: - name: Server build request local_action: module: rax_cdb credentials: ~/.raxpub region: IAD name: db-server1 flavor: 1 volume: 2 cdb_type: MySQL cdb_version: 5.6 wait: yes state: present register: rax_db_server ``` ### Authors * Simon JAILLET (@jails) ansible community.general.sensu_subscription – Manage Sensu subscriptions community.general.sensu\_subscription – Manage Sensu subscriptions ================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.sensu_subscription`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage which *sensu channels* a machine should subscribe to Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **backup** boolean | **Choices:*** **no** ← * yes | Create a backup file (if yes), including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. | | **name** string / required | | The name of the channel | | **path** string | **Default:**"/etc/sensu/conf.d/subscriptions.json" | Path to the subscriptions json file | | **state** string | **Choices:*** **present** ← * absent | Whether the machine should subscribe or unsubscribe from the channel | Examples -------- ``` # Subscribe to the nginx channel - name: Subscribe to nginx checks community.general.sensu_subscription: name=nginx # Unsubscribe from the common checks channel - name: Unsubscribe from common checks community.general.sensu_subscription: name=common state=absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **reasons** list / elements=string | success | the reasons why the module changed or did not change something **Sample:** ["channel subscription was absent and state is `present'"] | ### Authors * Anders Ingemann (@andsens) ansible community.general.apt_rpm – apt_rpm package manager community.general.apt\_rpm – apt\_rpm package manager ===================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.apt_rpm`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manages packages with *apt-rpm*. Both low-level (*rpm*) and high-level (*apt-get*) package manager binaries required. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **package** list / elements=string / required | | list of packages to install, upgrade or remove. aliases: name, pkg | | **state** string | **Choices:*** absent * **present** ← * installed * removed | Indicates the desired package state. | | **update\_cache** boolean | **Choices:*** **no** ← * yes | update the package database first `apt-get update`. Alias `update-cache` has been deprecated and will be removed in community.general 5.0.0. aliases: update-cache | Examples -------- ``` - name: Install package foo community.general.apt_rpm: pkg: foo state: present - name: Install packages foo and bar community.general.apt_rpm: pkg: - foo - bar state: present - name: Remove package foo community.general.apt_rpm: pkg: foo state: absent - name: Remove packages foo and bar community.general.apt_rpm: pkg: foo,bar state: absent # bar will be the updated if a newer version exists - name: Update the package database and install bar community.general.apt_rpm: name: bar state: present update_cache: yes ``` ### Authors * Evgenii Terechkov (@evgkrsk) ansible community.general.snap – Manages snaps community.general.snap – Manages snaps ====================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.snap`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages snaps packages. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **channel** string | **Default:**"stable" | Define which release of a snap is installed and tracked for updates. This option can only be specified if there is a single snap in the task. | | **classic** boolean | **Choices:*** **no** ← * yes | Confinement policy. The classic confinement allows a snap to have the same level of access to the system as "classic" packages, like those managed by APT. This option corresponds to the --classic argument. This option can only be specified if there is a single snap in the task. | | **name** list / elements=string / required | | Name of the snaps. | | **state** string | **Choices:*** absent * **present** ← * enabled * disabled | Desired state of the package. | Examples -------- ``` # Install "foo" and "bar" snap - name: Install foo community.general.snap: name: - foo - bar # Remove "foo" snap - name: Remove foo community.general.snap: name: foo state: absent # Install a snap with classic confinement - name: Install "foo" with option --classic community.general.snap: name: foo classic: yes # Install a snap with from a specific channel - name: Install "foo" with option --channel=latest/edge community.general.snap: name: foo channel: latest/edge ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **channel** string | When snaps are installed | The channel the snaps were installed from | | **classic** boolean | When snaps are installed | Whether or not the snaps were installed with the classic confinement | | **cmd** string | When changed is true | The command that was executed on the host | | **snaps\_installed** list / elements=string | When any snaps have been installed | The list of actually installed snaps | | **snaps\_removed** list / elements=string | When any snaps have been removed | The list of actually removed snaps | ### Authors * Victor Carceler (@vcarceler) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#ea9c898b98898f868f98ccc9d9ddd1ccc9dfd8d1ccc9ded2d1838f999a9f838d898b999e8f86868b98ccc9dedcd1928f838686ccc9dedcd1848f9e)> * Stanislas Lange (@angristan) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#8eefe0e9fce7fdfaefe0a8adbdb9b5a8adbbbcb5a8adbab6b5fee3a8adbab8b5e3eb)> ansible community.general.pear – Manage pear/pecl packages community.general.pear – Manage pear/pecl packages ================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pear`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manage PHP packages with the pear package manager. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **executable** path | | Path to the pear executable. | | **name** string / required | | Name of the package to install, upgrade, or remove. aliases: pkg | | **prompts** list / elements=raw added in 0.2.0 of community.general | | List of regular expressions that can be used to detect prompts during pear package installation to answer the expected question. Prompts will be processed in the same order as the packages list. You can optionnally specify an answer to any question in the list. If no answer is provided, the list item will only contain the regular expression. To specify an answer, the item will be a dict with the regular expression as key and the answer as value `my_regular_expression: 'an_answer'`. You can provide a list containing items with or without answer. A prompt list can be shorter or longer than the packages list but will issue a warning. If you want to specify that a package will not need prompts in the middle of a list, `null`. | | **state** string | **Choices:*** **present** ← * installed * latest * absent * removed | Desired state of the package. | Examples -------- ``` - name: Install pear package community.general.pear: name: Net_URL2 state: present - name: Install pecl package community.general.pear: name: pecl/json_post state: present - name: Install pecl package with expected prompt community.general.pear: name: pecl/apcu state: present prompts: - (.*)Enable internal debugging in APCu \[no\] - name: Install pecl package with expected prompt and an answer community.general.pear: name: pecl/apcu state: present prompts: - (.*)Enable internal debugging in APCu \[no\]: "yes" - name: Install multiple pear/pecl packages at once with prompts. Prompts will be processed on the same order as the packages order. If there is more prompts than packages, packages without prompts will be installed without any prompt expected. If there is more packages than prompts, additionnal prompts will be ignored. community.general.pear: name: pecl/gnupg, pecl/apcu state: present prompts: - I am a test prompt because gnupg doesnt asks anything - (.*)Enable internal debugging in APCu \[no\]: "yes" - name: Install multiple pear/pecl packages at once skipping the first prompt. Prompts will be processed on the same order as the packages order. If there is more prompts than packages, packages without prompts will be installed without any prompt expected. If there is more packages than prompts, additionnal prompts will be ignored. community.general.pear: name: pecl/gnupg, pecl/apcu state: present prompts: - null - (.*)Enable internal debugging in APCu \[no\]: "yes" - name: Upgrade package community.general.pear: name: Net_URL2 state: latest - name: Remove packages community.general.pear: name: Net_URL2,pecl/json_post state: absent ``` ### Authors * Jonathan Lestrelin (@jle64) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#90fafffef1e4f8f1feb6b3a4a6abfcf5e3e4e2f5fcf9feb6b3a3a7abb6b3a5a2abb6b3a4a8abf7fdf1f9fcb6b3a4a6abf3fffd)>
programming_docs
ansible community.general.idrac_redfish_config – Manages servers through iDRAC using Dell Redfish APIs community.general.idrac\_redfish\_config – Manages servers through iDRAC using Dell Redfish APIs ================================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.idrac_redfish_config`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * For use with Dell iDRAC operations that require Redfish OEM extensions * Builds Redfish URIs locally and sends them to remote iDRAC controllers to set or update a configuration attribute. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auth\_token** string added in 2.3.0 of community.general | | Security token for authentication with OOB controller | | **baseuri** string / required | | Base URI of iDRAC | | **category** string / required | | Category to execute on iDRAC | | **command** list / elements=string / required | | List of commands to execute on iDRAC *SetManagerAttributes*, *SetLifecycleControllerAttributes* and *SetSystemAttributes* are mutually exclusive commands when `category` is *Manager* | | **manager\_attributes** dictionary added in 0.2.0 of community.general | **Default:**{} | dictionary of iDRAC attribute name and value pairs to update | | **password** string | | Password for authentication with iDRAC | | **resource\_id** string added in 0.2.0 of community.general | | The ID of the System, Manager or Chassis to modify | | **timeout** integer | **Default:**10 | Timeout in seconds for URL requests to iDRAC controller | | **username** string | | User for authentication with iDRAC | Examples -------- ``` - name: Enable NTP and set NTP server and Time zone attributes in iDRAC community.general.idrac_redfish_config: category: Manager command: SetManagerAttributes resource_id: iDRAC.Embedded.1 manager_attributes: NTPConfigGroup.1.NTPEnable: "Enabled" NTPConfigGroup.1.NTP1: "{{ ntpserver1 }}" Time.1.Timezone: "{{ timezone }}" baseuri: "{{ baseuri }}" username: "{{ username}}" password: "{{ password }}" - name: Enable Syslog and set Syslog servers in iDRAC community.general.idrac_redfish_config: category: Manager command: SetManagerAttributes resource_id: iDRAC.Embedded.1 manager_attributes: SysLog.1.SysLogEnable: "Enabled" SysLog.1.Server1: "{{ syslog_server1 }}" SysLog.1.Server2: "{{ syslog_server2 }}" baseuri: "{{ baseuri }}" username: "{{ username}}" password: "{{ password }}" - name: Configure SNMP community string, port, protocol and trap format community.general.idrac_redfish_config: category: Manager command: SetManagerAttributes resource_id: iDRAC.Embedded.1 manager_attributes: SNMP.1.AgentEnable: "Enabled" SNMP.1.AgentCommunity: "public_community_string" SNMP.1.TrapFormat: "SNMPv1" SNMP.1.SNMPProtocol: "All" SNMP.1.DiscoveryPort: 161 SNMP.1.AlertPort: 162 baseuri: "{{ baseuri }}" username: "{{ username}}" password: "{{ password }}" - name: Enable CSIOR community.general.idrac_redfish_config: category: Manager command: SetLifecycleControllerAttributes resource_id: iDRAC.Embedded.1 manager_attributes: LCAttributes.1.CollectSystemInventoryOnRestart: "Enabled" baseuri: "{{ baseuri }}" username: "{{ username}}" password: "{{ password }}" - name: Set Power Supply Redundancy Policy to A/B Grid Redundant community.general.idrac_redfish_config: category: Manager command: SetSystemAttributes resource_id: iDRAC.Embedded.1 manager_attributes: ServerPwr.1.PSRedPolicy: "A/B Grid Redundant" baseuri: "{{ baseuri }}" username: "{{ username}}" password: "{{ password }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **msg** string | always | Message with action result or error description **Sample:** Action was successful | ### Authors * Jose Delarosa (@jose-delarosa) ansible community.general.hipchat – post task events to hipchat community.general.hipchat – post task events to hipchat ======================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.hipchat`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) Synopsis -------- * This callback plugin sends status updates to a HipChat channel during playbook execution. * Before 2.4 only environment variables were available for configuring this plugin. Requirements ------------ The below requirements are needed on the local controller node that executes this callback. * whitelist in configuration. * prettytable (python lib) Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **api\_version** string | **Default:**"v1" | ini entries: [callback\_hipchat]api\_version = v1 env:HIPCHAT\_API\_VERSION | HipChat API version, v1 or v2. | | **from** string | **Default:**"ansible" | ini entries: [callback\_hipchat]from = ansible env:HIPCHAT\_FROM | Name to post as | | **notify** boolean | **Choices:*** no * **yes** ← | ini entries: [callback\_hipchat]notify = yes env:HIPCHAT\_NOTIFY | Add notify flag to important messages | | **room** string | **Default:**"ansible" | ini entries: [callback\_hipchat]room = ansible env:HIPCHAT\_ROOM | HipChat room to post in. | | **token** string / required | | ini entries: [callback\_hipchat]token = None env:HIPCHAT\_TOKEN | HipChat API token for v1 or v2 API. | ### Authors * Unknown (!UNKNOWN) ansible community.general.scaleway – Scaleway inventory source community.general.scaleway – Scaleway inventory source ====================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.scaleway`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Get inventory hosts from Scaleway. Requirements ------------ The below requirements are needed on the local controller node that executes this inventory. * PyYAML Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **hostnames** list / elements=string | **Choices:*** **public\_ipv4** ← * private\_ipv4 * public\_ipv6 * hostname * id **Default:**["public\_ipv4"] | | List of preference about what to use as an hostname. | | **oauth\_token** string | | env:SCW\_TOKEN env:SCW\_API\_KEY env:SCW\_OAUTH\_TOKEN | Scaleway OAuth token. If not explicitly defined or in environment variables, it will try to lookup in the scaleway-cli configuration file (`$SCW_CONFIG_PATH`, `$XDG_CONFIG_HOME/scw/config.yaml`, or `~/.config/scw/config.yaml`). More details on [how to generate token](https://www.scaleway.com/en/docs/generate-api-keys/). | | **plugin** string / required | **Choices:*** scaleway * community.general.scaleway | | Token that ensures this is a source file for the 'scaleway' plugin. | | **regions** list / elements=string | **Default:**["ams1", "par1", "par2", "waw1"] | | Filter results on a specific Scaleway region. | | **tags** list / elements=string | | | Filter results on a specific tag. | | **variables** dictionary | | | Set individual variables: keys are variable names and values are templates. Any value returned by the [Scaleway API](https://developer.scaleway.com/#servers-server-get) can be used. | Examples -------- ``` # scaleway_inventory.yml file in YAML format # Example command line: ansible-inventory --list -i scaleway_inventory.yml # use hostname as inventory_hostname # use the private IP address to connect to the host plugin: community.general.scaleway regions: - ams1 - par1 tags: - foobar hostnames: - hostname variables: ansible_host: private_ip state: state # use hostname as inventory_hostname and public IP address to connect to the host plugin: community.general.scaleway hostnames: - hostname regions: - par1 variables: ansible_host: public_ip.address # Using static strings as variables plugin: community.general.scaleway hostnames: - hostname variables: ansible_host: public_ip.address ansible_connection: "'ssh'" ansible_user: "'admin'" ``` ### Authors * Remy Leone (@sieben) ansible community.general.rhn_channel – Adds or removes Red Hat software channels community.general.rhn\_channel – Adds or removes Red Hat software channels ========================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rhn_channel`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Adds or removes Red Hat software channels. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **name** string / required | | Name of the software channel. | | **password** string / required | | RHN/Satellite password. aliases: pwd | | **state** string | **Choices:*** **present** ← * absent | Whether the channel should be present or not, taking action if the state is different from what is stated. | | **sysname** string / required | | Name of the system as it is known in RHN/Satellite. | | **url** string / required | | The full URL to the RHN/Satellite API. | | **user** string / required | | RHN/Satellite login. | | **validate\_certs** boolean added in 0.2.0 of community.general | **Choices:*** no * **yes** ← | If `False`, SSL certificates will not be validated. This should only set to `False` when used on self controlled sites using self-signed certificates, and you are absolutely sure that nobody can modify traffic between the module and the site. | Notes ----- Note * This module fetches the system id from RHN. * This module doesn’t support *check\_mode*. Examples -------- ``` - name: Add a Red Hat software channel community.general.rhn_channel: name: rhel-x86_64-server-v2vwin-6 sysname: server01 url: https://rhn.redhat.com/rpc/api user: rhnuser password: guessme delegate_to: localhost ``` ### Authors * Vincent Van der Kussen (@vincentvdk) ansible community.general.gitlab_group_members – Manage group members on GitLab Server community.general.gitlab\_group\_members – Manage group members on GitLab Server ================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.gitlab_group_members`. New in version 1.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module allows to add and remove members to/from a group, or change a member’s access level in a group on GitLab. Requirements ------------ The below requirements are needed on the host that executes this module. * python-gitlab python module <= 1.15.0 * administrator rights on the GitLab server Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **access\_level** string | **Choices:*** guest * reporter * developer * maintainer * owner | The access level for the user. Required if *state=present*, user state is set to present. Mutually exclusive with *gitlab\_users\_access*. | | **api\_password** string | | The password to use for authentication against the API | | **api\_token** string / required | | A personal access token to authenticate with the GitLab API. | | **api\_url** string | | The resolvable endpoint for the API | | **api\_username** string | | The username to use for authentication against the API | | **gitlab\_group** string / required | | The name of the GitLab group the member is added to/removed from. | | **gitlab\_user** list / elements=string | | A username or a list of usernames to add to/remove from the GitLab group. Mutually exclusive with *gitlab\_users\_access*. | | **gitlab\_users\_access** list / elements=dictionary added in 3.6.0 of community.general | | Provide a list of user to access level mappings. Every dictionary in this list specifies a user (by username) and the access level the user should have. Mutually exclusive with *gitlab\_user* and *access\_level*. Use together with *purge\_users* to remove all users not specified here from the group. | | | **access\_level** string / required | **Choices:*** guest * reporter * developer * maintainer * owner | The access level for the user. Required if *state=present*, user state is set to present. | | | **name** string / required | | A username or a list of usernames to add to/remove from the GitLab group. | | **purge\_users** list / elements=string added in 3.6.0 of community.general | **Choices:*** guest * reporter * developer * maintainer * owner | Adds/remove users of the given access\_level to match the given *gitlab\_user*/*gitlab\_users\_access* list. If omitted do not purge orphaned members. Is only used when *state=present*. | | **state** string | **Choices:*** **present** ← * absent | State of the member in the group. On `present`, it adds a user to a GitLab group. On `absent`, it removes a user from a GitLab group. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether or not to validate SSL certs when supplying a https endpoint. | Notes ----- Note * Supports `check_mode`. Examples -------- ``` - name: Add a user to a GitLab Group community.general.gitlab_group_members: api_url: 'https://gitlab.example.com' api_token: 'Your-Private-Token' gitlab_group: groupname gitlab_user: username access_level: developer state: present - name: Remove a user from a GitLab Group community.general.gitlab_group_members: api_url: 'https://gitlab.example.com' api_token: 'Your-Private-Token' gitlab_group: groupname gitlab_user: username state: absent - name: Add a list of Users to A GitLab Group community.general.gitlab_group_members: api_url: 'https://gitlab.example.com' api_token: 'Your-Private-Token' gitlab_group: groupname gitlab_user: - user1 - user2 access_level: developer state: present - name: Add a list of Users with Dedicated Access Levels to A GitLab Group community.general.gitlab_group_members: api_url: 'https://gitlab.example.com' api_token: 'Your-Private-Token' gitlab_group: groupname gitlab_users_access: - name: user1 access_level: developer - name: user2 access_level: maintainer state: present - name: Add a user, remove all others which might be on this access level community.general.gitlab_group_members: api_url: 'https://gitlab.example.com' api_token: 'Your-Private-Token' gitlab_group: groupname gitlab_user: username access_level: developer pruge_users: developer state: present - name: Remove a list of Users with Dedicated Access Levels to A GitLab Group community.general.gitlab_group_members: api_url: 'https://gitlab.example.com' api_token: 'Your-Private-Token' gitlab_group: groupname gitlab_users_access: - name: user1 access_level: developer - name: user2 access_level: maintainer state: absent ``` ### Authors * Zainab Alsaffar (@zanssa) ansible community.general.selective – only print certain tasks community.general.selective – only print certain tasks ====================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.selective`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This callback only prints tasks that have been tagged with `print_action` or that have failed. This allows operators to focus on the tasks that provide value only. * Tasks that are not printed are placed with a ‘.’. * If you increase verbosity all tasks are printed. Requirements ------------ The below requirements are needed on the local controller node that executes this callback. * set as main display callback Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **nocolor** boolean | **Choices:*** **no** ← * yes | ini entries: [defaults]nocolor = no env:ANSIBLE\_NOCOLOR env:ANSIBLE\_SELECTIVE\_DONT\_COLORIZE | This setting allows suppressing colorizing output | Examples -------- ``` - ansible.builtin.debug: msg="This will not be printed" - ansible.builtin.debug: msg="But this will" tags: [print_action] ``` ### Authors * Unknown (!UNKNOWN) ansible community.general.chroot – Interact with local chroot community.general.chroot – Interact with local chroot ===================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.chroot`. * [Synopsis](#synopsis) * [Parameters](#parameters) Synopsis -------- * Run commands or put/fetch files to an existing chroot on the Ansible controller. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **chroot\_exe** string | **Default:**"chroot" | ini entries: [chroot\_connection]exe = chroot env:ANSIBLE\_CHROOT\_EXE var: ansible\_chroot\_exe | User specified chroot binary | | **executable** string | **Default:**"/bin/sh" | ini entries: [defaults]executable = /bin/sh env:ANSIBLE\_EXECUTABLE var: ansible\_executable | User specified executable shell | | **remote\_addr** string | **Default:**"inventory\_hostname" | var: ansible\_host | The path of the chroot you want to access. | ### Authors * Maykel Moya (!UNKNOWN) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#503d3d3f2931767363676b767365626b767364686b2320353534292231393c23767364666b333f3d)>
programming_docs
ansible community.general.manageiq_tenant – Management of tenants in ManageIQ. community.general.manageiq\_tenant – Management of tenants in ManageIQ. ======================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.manageiq_tenant`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * The manageiq\_tenant module supports adding, updating and deleting tenants in ManageIQ. Requirements ------------ The below requirements are needed on the host that executes this module. * manageiq-client * manageiq-client <https://github.com/ManageIQ/manageiq-api-client-python/> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **description** string / required | | The tenant description. | | **manageiq\_connection** dictionary | | ManageIQ connection configuration information. | | | **ca\_cert** string | | The path to a CA bundle file or directory with certificates. defaults to None. aliases: ca\_bundle\_path | | | **password** string | | ManageIQ password. `MIQ_PASSWORD` env var if set. otherwise, required if no token is passed in. | | | **token** string | | ManageIQ token. `MIQ_TOKEN` env var if set. otherwise, required if no username or password is passed in. | | | **url** string | | ManageIQ environment url. `MIQ_URL` env var if set. otherwise, it is required to pass it. | | | **username** string | | ManageIQ username. `MIQ_USERNAME` env var if set. otherwise, required if no token is passed in. | | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether SSL certificates should be verified for HTTPS requests. defaults to True. aliases: verify\_ssl | | **name** string / required | | The tenant name. | | **parent** string | | The name of the parent tenant. If not supplied and no `parent_id` is supplied the root tenant is used. | | **parent\_id** integer | | The id of the parent tenant. If not supplied the root tenant is used. The `parent_id` takes president over `parent` when supplied | | **quotas** dictionary | | The tenant quotas. All parameters case sensitive. Valid attributes are: - `cpu_allocated` (int): use null to remove the quota. - `mem_allocated` (GB): use null to remove the quota. - `storage_allocated` (GB): use null to remove the quota. - `vms_allocated` (int): use null to remove the quota. - `templates_allocated` (int): use null to remove the quota. | | **state** string | **Choices:*** absent * **present** ← | absent - tenant should not exist, present - tenant should be. | Examples -------- ``` - name: Update the root tenant in ManageIQ community.general.manageiq_tenant: name: 'My Company' description: 'My company name' manageiq_connection: url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' validate_certs: False - name: Create a tenant in ManageIQ community.general.manageiq_tenant: name: 'Dep1' description: 'Manufacturing department' parent_id: 1 manageiq_connection: url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' validate_certs: False - name: Delete a tenant in ManageIQ community.general.manageiq_tenant: state: 'absent' name: 'Dep1' parent_id: 1 manageiq_connection: url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' validate_certs: False - name: Set tenant quota for cpu_allocated, mem_allocated, remove quota for vms_allocated community.general.manageiq_tenant: name: 'Dep1' parent_id: 1 quotas: - cpu_allocated: 100 - mem_allocated: 50 - vms_allocated: null manageiq_connection: url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' validate_certs: False - name: Delete a tenant in ManageIQ using a token community.general.manageiq_tenant: state: 'absent' name: 'Dep1' parent_id: 1 manageiq_connection: url: 'http://127.0.0.1:3000' token: 'sometoken' validate_certs: False ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **tenant** complex | success | The tenant. | | | **description** string | success | The tenant description | | | **id** integer | success | The tenant id | | | **name** string | success | The tenant name | | | **parent\_id** integer | success | The id of the parent tenant | | | **quotas** list / elements=string | success | List of tenant quotas **Sample:** {'cpu\_allocated': 100, 'mem\_allocated': 50} | ### Authors * Evert Mulder (@evertmulder) ansible community.general.elastic – Create distributed traces for each Ansible task in Elastic APM community.general.elastic – Create distributed traces for each Ansible task in Elastic APM ========================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.elastic`. New in version 3.8.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This callback creates distributed traces for each Ansible task in Elastic APM. * You can configure the plugin with environment variables. * See <https://www.elastic.co/guide/en/apm/agent/python/current/configuration.html>. Requirements ------------ The below requirements are needed on the local controller node that executes this callback. * elastic-apm (Python library) Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **apm\_api\_key** string | | env:ELASTIC\_APM\_API\_KEY | Use the APM API key | | **apm\_secret\_token** string | | env:ELASTIC\_APM\_SECRET\_TOKEN | Use the APM server token | | **apm\_server\_url** string | | env:ELASTIC\_APM\_SERVER\_URL | Use the APM server and its environment variables. | | **apm\_service\_name** string | **Default:**"ansible" | env:ELASTIC\_APM\_SERVICE\_NAME | The service name resource attribute. | | **apm\_verify\_server\_cert** boolean | **Choices:*** no * **yes** ← | env:ELASTIC\_APM\_VERIFY\_SERVER\_CERT | Verifies the SSL certificate if an HTTPS connection. | | **hide\_task\_arguments** boolean | **Choices:*** **no** ← * yes | env:ANSIBLE\_OPENTELEMETRY\_HIDE\_TASK\_ARGUMENTS | Hide the arguments for a task. | | **traceparent** string | | env:TRACEPARENT | The [W3C Trace Context header traceparent](https://www.w3.org/TR/trace-context-1/#traceparent-header). | Examples -------- ``` examples: | Enable the plugin in ansible.cfg: [defaults] callbacks_enabled = community.general.elastic Set the environment variable: export ELASTIC_APM_SERVER_URL=<your APM server URL)> export ELASTIC_APM_SERVICE_NAME=your_service_name export ELASTIC_APM_API_KEY=your_APM_API_KEY ``` ### Authors * Victor Martinez (@v1v) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#74221d17001b06391506001d1a110e2601161d1b525747434f525741464f5257404c4f1319151d18525740424f171b19)> ansible community.general.rax_cdb_database – create / delete a database in the Cloud Databases community.general.rax\_cdb\_database – create / delete a database in the Cloud Databases ======================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rax_cdb_database`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * create / delete a database in the Cloud Databases. Requirements ------------ The below requirements are needed on the host that executes this module. * pyrax * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string | | Rackspace API key, overrides *credentials*. aliases: password | | **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/> | | **cdb\_id** string / required | | The databases server UUID | | **character\_set** string | **Default:**"utf8" | Set of symbols and encodings | | **collate** string | **Default:**"utf8\_general\_ci" | Set of rules for comparing characters in a character set | | **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided. aliases: creds\_file | | **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. | | **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. | | **name** string / required | | Name to give to the database | | **region** string | | Region to create an instance in. | | **state** string | **Choices:*** **present** ← * absent | Indicate desired state of the resource | | **tenant\_id** string | | The tenant ID used for authentication. | | **tenant\_name** string | | The tenant name used for authentication. | | **username** string | | Rackspace username, overrides *credentials*. | | **validate\_certs** boolean | **Choices:*** no * yes | Whether or not to require SSL validation of API endpoints. aliases: verify\_ssl | Notes ----- Note * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) Examples -------- ``` - name: Build a database in Cloud Databases tasks: - name: Database build request local_action: module: rax_cdb_database credentials: ~/.raxpub region: IAD cdb_id: 323e7ce0-9cb0-11e3-a5e2-0800200c9a66 name: db1 state: present register: rax_db_database ``` ### Authors * Simon JAILLET (@jails) ansible community.general.rundeck_acl_policy – Manage Rundeck ACL policies. community.general.rundeck\_acl\_policy – Manage Rundeck ACL policies. ===================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rundeck_acl_policy`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Create, update and remove Rundeck ACL policies through HTTP API. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_version** integer | **Default:**14 | Sets the API version used by module. API version must be at least 14. | | **client\_cert** path added in 0.2.0 of community.general | | PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, `client_key` is not required. | | **client\_key** path added in 0.2.0 of community.general | | PEM formatted file that contains your private key to be used for SSL client authentication. If `client_cert` contains both the certificate and key, this option is not required. | | **force** boolean added in 0.2.0 of community.general | **Choices:*** **no** ← * yes | If `yes` do not get a cached copy. Alias `thirsty` has been deprecated and will be removed in 2.13. aliases: thirsty | | **force\_basic\_auth** boolean added in 0.2.0 of community.general | **Choices:*** **no** ← * yes | Credentials specified with *url\_username* and *url\_password* should be passed in HTTP Header. | | **http\_agent** string added in 0.2.0 of community.general | **Default:**"ansible-httpget" | Header to identify as, generally appears in web server logs. | | **name** string / required | | Sets the project name. | | **policy** string | | Sets the ACL policy content. ACL policy content is a YAML object as described in http://rundeck.org/docs/man5/aclpolicy.html. It can be a YAML string or a pure Ansible inventory YAML object. | | **project** string | | Sets the project which receive the ACL policy. If unset, it's a system ACL policy. | | **state** string | **Choices:*** **present** ← * absent | Create or remove Rundeck project. | | **token** string / required | | Sets the token to authenticate against Rundeck API. | | **url** string / required | | Sets the rundeck instance URL. | | **url\_password** string added in 0.2.0 of community.general | | The password for use in HTTP basic authentication. If the *url\_username* parameter is not specified, the *url\_password* parameter will not be used. | | **url\_username** string added in 0.2.0 of community.general | | The username for use in HTTP basic authentication. This parameter can be used without *url\_password* for sites that allow empty passwords | | **use\_gssapi** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** ← * yes | Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication. Requires the Python library [gssapi](https://github.com/pythongssapi/python-gssapi) to be installed. Credentials for GSSAPI can be specified with *url\_username*/*url\_password* or with the GSSAPI env var `KRB5CCNAME` that specified a custom Kerberos credential cache. NTLM authentication is `not` supported even if the GSSAPI mech for NTLM has been installed. | | **use\_proxy** boolean added in 0.2.0 of community.general | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. | | **validate\_certs** boolean added in 0.2.0 of community.general | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Create or update a rundeck ACL policy in project Ansible community.general.rundeck_acl_policy: name: "Project_01" api_version: 18 url: "https://rundeck.example.org" token: "mytoken" state: present project: "Ansible" policy: description: "my policy" context: application: rundeck for: project: - allow: read by: group: "build" - name: Remove a rundeck system policy community.general.rundeck_acl_policy: name: "Project_02" url: "https://rundeck.example.org" token: "mytoken" state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **after** dictionary | success | Dictionary containing ACL policy informations after modification. | | **before** dictionary | success | Dictionary containing ACL policy informations before modification. | | **rundeck\_response** string | failed | Rundeck response when a failure occurs. | ### Authors * Loic Blot (@nerzhul) ansible community.general.aerospike_migrations – Check or wait for migrations between nodes community.general.aerospike\_migrations – Check or wait for migrations between nodes ==================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.aerospike_migrations`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This can be used to check for migrations in a cluster. This makes it easy to do a rolling upgrade/update on Aerospike nodes. * If waiting for migrations is not desired, simply just poll until port 3000 if available or asinfo -v status returns ok Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **connect\_timeout** integer | **Default:**1000 | How long to try to connect before giving up (milliseconds) | | **consecutive\_good\_checks** integer | **Default:**3 | How many times should the cluster report "no migrations" consecutively before returning OK back to ansible? | | **fail\_on\_cluster\_change** boolean | **Choices:*** no * **yes** ← | Fail if the cluster key changes if something else is changing the cluster, we may want to fail | | **host** string | **Default:**"localhost" | Which host do we use as seed for info connection | | **local\_only** boolean / required | **Choices:*** no * yes | Do you wish to only check for migrations on the local node before returning, or do you want all nodes in the cluster to finish before returning? | | **migrate\_rx\_key** string | **Default:**"migrate\_rx\_partitions\_remaining" | The metric key used to determine if we have rx migrations remaining. Changeable due to backwards compatibility. | | **migrate\_tx\_key** string | **Default:**"migrate\_tx\_partitions\_remaining" | The metric key used to determine if we have tx migrations remaining. Changeable due to backwards compatibility. | | **min\_cluster\_size** integer | **Default:**1 | Check will return bad until cluster size is met or until tries is exhausted | | **port** integer | **Default:**3000 | Which port to connect to Aerospike on (service port) | | **sleep\_between\_checks** integer | **Default:**60 | How long to sleep between each check (seconds). | | **target\_cluster\_size** integer | | When all aerospike builds in the cluster are greater than version 4.3, then the `cluster-stable` info command will be used. Inside this command, you can optionally specify what the target cluster size is - but it is not necessary. You can still rely on min\_cluster\_size if you don't want to use this option. If this option is specified on a cluster that has at least 1 host <4.3 then it will be ignored until the min version reaches 4.3. | | **tries\_limit** integer | **Default:**300 | How many times do we poll before giving up and failing? | Examples -------- ``` # check for migrations on local node - name: Wait for migrations on local node before proceeding community.general.aerospike_migrations: host: "localhost" connect_timeout: 2000 consecutive_good_checks: 5 sleep_between_checks: 15 tries_limit: 600 local_only: False # example playbook: - name: Upgrade aerospike hosts: all become: true serial: 1 tasks: - name: Install dependencies ansible.builtin.apt: name: - python - python-pip - python-setuptools state: latest - name: Setup aerospike ansible.builtin.pip: name: aerospike # check for migrations every (sleep_between_checks) # If at least (consecutive_good_checks) checks come back OK in a row, then return OK. # Will exit if any exception, which can be caused by bad nodes, # nodes not returning data, or other reasons. # Maximum runtime before giving up in this case will be: # Tries Limit * Sleep Between Checks * delay * retries - name: Wait for aerospike migrations community.general.aerospike_migrations: local_only: True sleep_between_checks: 1 tries_limit: 5 consecutive_good_checks: 3 fail_on_cluster_change: true min_cluster_size: 3 target_cluster_size: 4 register: migrations_check until: migrations_check is succeeded changed_when: false delay: 60 retries: 120 - name: Another thing ansible.builtin.shell: | echo foo - name: Reboot ansible.builtin.reboot: ``` ### Authors * Albert Autin (@Alb0t)
programming_docs
ansible community.general.hwc_ecs_instance – Creates a resource of Ecs/Instance in Huawei Cloud community.general.hwc\_ecs\_instance – Creates a resource of Ecs/Instance in Huawei Cloud ========================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.hwc_ecs_instance`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * instance management. Requirements ------------ The below requirements are needed on the host that executes this module. * keystoneauth1 >= 3.6.0 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **admin\_pass** string | | Specifies the initial login password of the administrator account for logging in to an ECS using password authentication. The Linux administrator is root, and the Windows administrator is Administrator. Password complexity requirements, consists of 8 to 26 characters. The password must contain at least three of the following character types 'uppercase letters, lowercase letters, digits, and special characters (!@$%^-\_=+[{}]:,./?)'. The password cannot contain the username or the username in reverse. The Windows ECS password cannot contain the username, the username in reverse, or more than two consecutive characters in the username. | | **availability\_zone** string / required | | Specifies the name of the AZ where the ECS is located. | | **data\_volumes** list / elements=dictionary | | Specifies the data disks of ECS instance. | | | **device** string | | Specifies the disk device name. | | | **volume\_id** string / required | | Specifies the disk ID. | | **description** string | | Specifies the description of an ECS, which is a null string by default. Can contain a maximum of 85 characters. Cannot contain special characters, such as < and >. | | **domain** string / required | | The name of the Domain to scope to (Identity v3). (currently only domain names are supported, and not domain IDs). | | **eip\_id** string | | Specifies the ID of the elastic IP address assigned to the ECS. Only elastic IP addresses in the DOWN state can be assigned. | | **enable\_auto\_recovery** boolean | **Choices:*** no * yes | Specifies whether automatic recovery is enabled on the ECS. | | **enterprise\_project\_id** string | | Specifies the ID of the enterprise project to which the ECS belongs. | | **flavor\_name** string / required | | Specifies the name of the system flavor. | | **id** string | | The id of resource to be managed. | | **identity\_endpoint** string / required | | The Identity authentication URL. | | **image\_id** string / required | | Specifies the ID of the system image. | | **name** string / required | | Specifies the ECS name. Value requirements consists of 1 to 64 characters, including letters, digits, underscores `_`, hyphens (-), periods (.). | | **nics** list / elements=dictionary / required | | Specifies the NIC information of the ECS. Constraints the network of the NIC must belong to the VPC specified by vpc\_id. A maximum of 12 NICs can be attached to an ECS. | | | **ip\_address** string / required | | Specifies the IP address of the NIC. The value is an IPv4 address. Its value must be an unused IP address in the network segment of the subnet. | | | **subnet\_id** string / required | | Specifies the ID of subnet. | | **password** string / required | | The password to login with. | | **project** string / required | | The name of the Tenant (Identity v2) or Project (Identity v3). (currently only project names are supported, and not project IDs). | | **region** string | | The region to which the project belongs. | | **root\_volume** dictionary / required | | Specifies the configuration of the ECS's system disks. | | | **size** integer | | Specifies the system disk size, in GB. The value range is 1 to 1024. The system disk size must be greater than or equal to the minimum system disk size supported by the image (min\_disk attribute of the image). If this parameter is not specified or is set to 0, the default system disk size is the minimum value of the system disk in the image (min\_disk attribute of the image). | | | **snapshot\_id** string | | Specifies the snapshot ID or ID of the original data disk contained in the full-ECS image. | | | **volume\_type** string / required | | Specifies the ECS system disk type. SATA is common I/O disk type. SAS is high I/O disk type. SSD is ultra-high I/O disk type. co-p1 is high I/O (performance-optimized I) disk type. uh-l1 is ultra-high I/O (latency-optimized) disk type. NOTE is For HANA, HL1, and HL2 ECSs, use co-p1 and uh-l1 disks. For other ECSs, do not use co-p1 or uh-l1 disks. | | **security\_groups** list / elements=string | | Specifies the security groups of the ECS. If this parameter is left blank, the default security group is bound to the ECS by default. | | **server\_metadata** dictionary | | Specifies the metadata of ECS to be created. | | **server\_tags** dictionary | | Specifies the tags of an ECS. When you create ECSs, one ECS supports up to 10 tags. | | **ssh\_key\_name** string | | Specifies the name of the SSH key used for logging in to the ECS. | | **state** string | **Choices:*** **present** ← * absent | Whether the given object should exist in Huawei Cloud. | | **timeouts** dictionary | | The timeouts for each operations. | | | **create** string | **Default:**"30m" | The timeouts for create operation. | | | **delete** string | **Default:**"30m" | The timeouts for delete operation. | | | **update** string | **Default:**"30m" | The timeouts for update operation. | | **user** string / required | | The user name to login with (currently only user names are supported, and not user IDs). | | **user\_data** string | | Specifies the user data to be injected during the ECS creation process. Text, text files, and gzip files can be injected. The content to be injected must be encoded with base64. The maximum size of the content to be injected (before encoding) is 32 KB. For Linux ECSs, this parameter does not take effect when adminPass is used. | | **vpc\_id** string / required | | Specifies the ID of the VPC to which the ECS belongs. | Notes ----- Note * For authentication, you can set identity\_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT` env variable. * For authentication, you can set user using the `ANSIBLE_HWC_USER` env variable. * For authentication, you can set password using the `ANSIBLE_HWC_PASSWORD` env variable. * For authentication, you can set domain using the `ANSIBLE_HWC_DOMAIN` env variable. * For authentication, you can set project using the `ANSIBLE_HWC_PROJECT` env variable. * For authentication, you can set region using the `ANSIBLE_HWC_REGION` env variable. * Environment variables values will only be used if the playbook values are not set. Examples -------- ``` # create an ecs instance - name: Create a vpc hwc_network_vpc: cidr: "192.168.100.0/24" name: "ansible_network_vpc_test" register: vpc - name: Create a subnet hwc_vpc_subnet: gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" dhcp_enable: true vpc_id: "{{ vpc.id }}" cidr: "192.168.100.0/26" register: subnet - name: Create a eip hwc_vpc_eip: dedicated_bandwidth: charge_mode: "traffic" name: "ansible_test_dedicated_bandwidth" size: 1 type: "5_bgp" register: eip - name: Create a disk hwc_evs_disk: availability_zone: "cn-north-1a" name: "ansible_evs_disk_test" volume_type: "SATA" size: 10 register: disk - name: Create an instance community.general.hwc_ecs_instance: data_volumes: - volume_id: "{{ disk.id }}" enable_auto_recovery: false eip_id: "{{ eip.id }}" name: "ansible_ecs_instance_test" availability_zone: "cn-north-1a" nics: - subnet_id: "{{ subnet.id }}" ip_address: "192.168.100.33" - subnet_id: "{{ subnet.id }}" ip_address: "192.168.100.34" server_tags: my_server: "my_server" image_id: "8da46d6d-6079-4e31-ad6d-a7167efff892" flavor_name: "s3.small.1" vpc_id: "{{ vpc.id }}" root_volume: volume_type: "SAS" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **admin\_pass** string | success | Specifies the initial login password of the administrator account for logging in to an ECS using password authentication. The Linux administrator is root, and the Windows administrator is Administrator. Password complexity requirements consists of 8 to 26 characters. The password must contain at least three of the following character types "uppercase letters, lowercase letters, digits, and special characters (!@$%^-\_=+[{}]:,./?)". The password cannot contain the username or the username in reverse. The Windows ECS password cannot contain the username, the username in reverse, or more than two consecutive characters in the username. | | **availability\_zone** string | success | Specifies the name of the AZ where the ECS is located. | | **config\_drive** string | success | Specifies the configuration driver. | | **created** string | success | Specifies the time when an ECS was created. | | **data\_volumes** list / elements=string | success | Specifies the data disks of ECS instance. | | | **device** string | success | Specifies the disk device name. | | | **volume\_id** string | success | Specifies the disk ID. | | **description** string | success | Specifies the description of an ECS, which is a null string by default. Can contain a maximum of 85 characters. Cannot contain special characters, such as < and >. | | **disk\_config\_type** string | success | Specifies the disk configuration type. MANUAL is The image space is not expanded. AUTO is the image space of the system disk will be expanded to be as same as the flavor. | | **eip\_id** string | success | Specifies the ID of the elastic IP address assigned to the ECS. Only elastic IP addresses in the DOWN state can be assigned. | | **enable\_auto\_recovery** boolean | success | Specifies whether automatic recovery is enabled on the ECS. | | **enterprise\_project\_id** string | success | Specifies the ID of the enterprise project to which the ECS belongs. | | **flavor\_name** string | success | Specifies the name of the system flavor. | | **host\_name** string | success | Specifies the host name of the ECS. | | **image\_id** string | success | Specifies the ID of the system image. | | **image\_name** string | success | Specifies the image name of the ECS. | | **name** string | success | Specifies the ECS name. Value requirements "Consists of 1 to 64 characters, including letters, digits, underscores `_`, hyphens (-), periods (.)". | | **nics** list / elements=string | success | Specifies the NIC information of the ECS. The network of the NIC must belong to the VPC specified by vpc\_id. A maximum of 12 NICs can be attached to an ECS. | | | **ip\_address** string | success | Specifies the IP address of the NIC. The value is an IPv4 address. Its value must be an unused IP address in the network segment of the subnet. | | | **port\_id** string | success | Specifies the port ID corresponding to the IP address. | | | **subnet\_id** string | success | Specifies the ID of subnet. | | **power\_state** integer | success | Specifies the power status of the ECS. | | **root\_volume** dictionary | success | Specifies the configuration of the ECS's system disks. | | | **device** string | success | Specifies the disk device name. | | | **size** integer | success | Specifies the system disk size, in GB. The value range is 1 to 1024. The system disk size must be greater than or equal to the minimum system disk size supported by the image (min\_disk attribute of the image). If this parameter is not specified or is set to 0, the default system disk size is the minimum value of the system disk in the image (min\_disk attribute of the image). | | | **snapshot\_id** string | success | Specifies the snapshot ID or ID of the original data disk contained in the full-ECS image. | | | **volume\_id** string | success | Specifies the disk ID. | | | **volume\_type** string | success | Specifies the ECS system disk type. SATA is common I/O disk type. SAS is high I/O disk type. SSD is ultra-high I/O disk type. co-p1 is high I/O (performance-optimized I) disk type. uh-l1 is ultra-high I/O (latency-optimized) disk type. NOTE is For HANA, HL1, and HL2 ECSs, use co-p1 and uh-l1 disks. For other ECSs, do not use co-p1 or uh-l1 disks. | | **security\_groups** list / elements=string | success | Specifies the security groups of the ECS. If this parameter is left blank, the default security group is bound to the ECS by default. | | **server\_alias** string | success | Specifies the ECS alias. | | **server\_metadata** dictionary | success | Specifies the metadata of ECS to be created. | | **server\_tags** dictionary | success | Specifies the tags of an ECS. When you create ECSs, one ECS supports up to 10 tags. | | **ssh\_key\_name** string | success | Specifies the name of the SSH key used for logging in to the ECS. | | **status** string | success | Specifies the ECS status. Options are ACTIVE, REBOOT, HARD\_REBOOT, REBUILD, MIGRATING, BUILD, SHUTOFF, RESIZE, VERIFY\_RESIZE, ERROR, and DELETED. | | **user\_data** string | success | Specifies the user data to be injected during the ECS creation process. Text, text files, and gzip files can be injected. The content to be injected must be encoded with base64. The maximum size of the content to be injected (before encoding) is 32 KB. For Linux ECSs, this parameter does not take effect when adminPass is used. | | **vpc\_id** string | success | Specifies the ID of the VPC to which the ECS belongs. | ### Authors * Huawei Inc. (@huaweicloud) ansible community.general.redis_data – Set key value pairs in Redis community.general.redis\_data – Set key value pairs in Redis ============================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.redis_data`. New in version 3.7.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Set key value pairs in Redis database. Requirements ------------ The below requirements are needed on the host that executes this module. * redis * certifi Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ca\_certs** string | | Path to root certificates file. If not set and *tls* is set to `true`, certifi ca-certificates will be used. | | **existing** boolean | **Choices:*** no * yes | Only set key if it already exists. | | **expiration** integer | | Expiration time in milliseconds. Setting this flag will always result in a change in the database. | | **keep\_ttl** boolean | **Choices:*** no * yes | Retain the time to live associated with the key. | | **key** string / required | | Database key. | | **login\_host** string | **Default:**"localhost" | Specify the target host running the database. | | **login\_password** string | | Specify the password to authenticate with. Usually not used when target is localhost. | | **login\_port** integer | **Default:**6379 | Specify the port to connect to. | | **login\_user** string | | Specify the user to authenticate with. Requires [redis](https://pypi.org/project/redis) >= 3.4.0. | | **non\_existing** boolean | **Choices:*** no * yes | Only set key if it does not already exist. | | **state** string | **Choices:*** **present** ← * absent | State of the key. | | **tls** boolean | **Choices:*** no * **yes** ← | Specify whether or not to use TLS for the connection. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Specify whether or not to validate TLS certificates. This should only be turned off for personally controlled sites or with `localhost` as target. | | **value** string | | Value that key should be set to. | Notes ----- Note * Requires the `redis` Python package on the remote host. You can install it with pip (`pip install redis`) or with a package manager. Information on the library can be found at <https://github.com/andymccurdy/redis-py>. See Also -------- See also [community.general.redis\_data\_info](redis_data_info_module#ansible-collections-community-general-redis-data-info-module) The official documentation on the **community.general.redis\_data\_info** module. [community.general.redis](redis_module#ansible-collections-community-general-redis-module) The official documentation on the **community.general.redis** module. Examples -------- ``` - name: Set key foo=bar on localhost with no username community.general.redis_data: login_host: localhost login_password: supersecret key: foo value: bar state: present - name: Set key foo=bar if non existing with expiration of 30s community.general.redis_data: login_host: localhost login_password: supersecret key: foo value: bar non_existing: true expiration: 30000 state: present - name: Set key foo=bar if existing and keep current TTL community.general.redis_data: login_host: localhost login_password: supersecret key: foo value: bar existing: true keep_ttl: true - name: Set key foo=bar on redishost with custom ca-cert file community.general.redis_data: login_host: redishost login_password: supersecret login_user: someuser validate_certs: true ssl_ca_certs: /path/to/ca/certs key: foo value: bar - name: Delete key foo on localhost with no username community.general.redis_data: login_host: localhost login_password: supersecret key: foo state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **msg** string | always | A short message. **Sample:** Set key: foo to bar | | **old\_value** string | on\_success if state is `present` and key exists in database. | Value of key before setting. **Sample:** old\_value\_of\_key | | **value** string | on success if state is `present`. | Value key was set to. **Sample:** new\_value\_of\_key | ### Authors * Andreas Botzner (@paginabianca) ansible community.general.elasticsearch_plugin – Manage Elasticsearch plugins community.general.elasticsearch\_plugin – Manage Elasticsearch plugins ====================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.elasticsearch_plugin`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manages Elasticsearch plugins. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **force** boolean | **Choices:*** **no** ← * yes | Force batch mode when installing plugins. This is only necessary if a plugin requires additional permissions and console detection fails. | | **name** string / required | | Name of the plugin to install. | | **plugin\_bin** path | | Location of the plugin binary. If this file is not found, the default plugin binaries will be used. The default changed in Ansible 2.4 to None. | | **plugin\_dir** path | **Default:**"/usr/share/elasticsearch/plugins/" | Your configured plugin directory specified in Elasticsearch | | **proxy\_host** string | | Proxy host to use during plugin installation | | **proxy\_port** string | | Proxy port to use during plugin installation | | **src** string | | Optionally set the source location to retrieve the plugin from. This can be a file:// URL to install from a local file, or a remote URL. If this is not set, the plugin location is just based on the name. The name parameter must match the descriptor in the plugin ZIP specified. Is only used if the state would change, which is solely checked based on the name parameter. If, for example, the plugin is already installed, changing this has no effect. For ES 1.x use url. | | **state** string | **Choices:*** **present** ← * absent | Desired state of a plugin. | | **timeout** string | **Default:**"1m" | Timeout setting: 30s, 1m, 1h... Only valid for Elasticsearch < 5.0. This option is ignored for Elasticsearch > 5.0. | | **url** string | | Set exact URL to download the plugin from (Only works for ES 1.x). For ES 2.x and higher, use src. | | **version** string | | Version of the plugin to be installed. If plugin exists with previous version, it will NOT be updated | Examples -------- ``` - name: Install Elasticsearch Head plugin in Elasticsearch 2.x community.general.elasticsearch_plugin: name: mobz/elasticsearch-head state: present - name: Install a specific version of Elasticsearch Head in Elasticsearch 2.x community.general.elasticsearch_plugin: name: mobz/elasticsearch-head version: 2.0.0 - name: Uninstall Elasticsearch head plugin in Elasticsearch 2.x community.general.elasticsearch_plugin: name: mobz/elasticsearch-head state: absent - name: Install a specific plugin in Elasticsearch >= 5.0 community.general.elasticsearch_plugin: name: analysis-icu state: present - name: Install the ingest-geoip plugin with a forced installation community.general.elasticsearch_plugin: name: ingest-geoip state: present force: yes ``` ### Authors * Mathew Davies (@ThePixelDeveloper) * Sam Doran (@samdoran)
programming_docs
ansible community.general.sudosu – Run tasks using sudo su - community.general.sudosu – Run tasks using sudo su - ==================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.sudosu`. New in version 2.4.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) Synopsis -------- * This become plugins allows your remote/login user to execute commands as another user via the `sudo` and `su` utilities combined. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **become\_flags** string | **Default:**"-H -S -n" | ini entries: [privilege\_escalation]become\_flags = -H -S -n [sudo\_become\_plugin]flags = -H -S -n env:ANSIBLE\_BECOME\_FLAGS env:ANSIBLE\_SUDO\_FLAGS var: ansible\_become\_flags var: ansible\_sudo\_flags | Options to pass to `sudo`. | | **become\_pass** string | | ini entries: [sudo\_become\_plugin]password = None env:ANSIBLE\_BECOME\_PASS env:ANSIBLE\_SUDO\_PASS var: ansible\_become\_password var: ansible\_become\_pass var: ansible\_sudo\_pass | Password to pass to `sudo`. | | **become\_user** string | **Default:**"root" | ini entries: [privilege\_escalation]become\_user = root [sudo\_become\_plugin]user = root env:ANSIBLE\_BECOME\_USER env:ANSIBLE\_SUDO\_USER var: ansible\_become\_user var: ansible\_sudo\_user | User you 'become' to execute the task. | ### Authors * Dag Wieers (@dagwieers) ansible community.general.consul_session – Manipulate consul sessions community.general.consul\_session – Manipulate consul sessions ============================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.consul_session`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Allows the addition, modification and deletion of sessions in a consul cluster. These sessions can then be used in conjunction with key value pairs to implement distributed locks. In depth documentation for working with sessions can be found at <http://www.consul.io/docs/internals/sessions.html> Requirements ------------ The below requirements are needed on the host that executes this module. * python-consul * requests Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **behavior** string | **Choices:*** delete * **release** ← | The optional behavior that can be attached to the session when it is created. This controls the behavior when a session is invalidated. | | **checks** list / elements=string | | Checks that will be used to verify the session health. If all the checks fail, the session will be invalidated and any locks associated with the session will be release and can be acquired once the associated lock delay has expired. | | **datacenter** string | | The name of the datacenter in which the session exists or should be created. | | **delay** integer | **Default:**15 | The optional lock delay that can be attached to the session when it is created. Locks for invalidated sessions ar blocked from being acquired until this delay has expired. Durations are in seconds. | | **host** string | **Default:**"localhost" | The host of the consul agent defaults to localhost. | | **id** string | | ID of the session, required when *state* is either `info` or `remove`. | | **name** string | | The name that should be associated with the session. Required when *state=node* is used. | | **node** string | | The name of the node that with which the session will be associated. by default this is the name of the agent. | | **port** integer | **Default:**8500 | The port on which the consul agent is running. | | **scheme** string | **Default:**"http" | The protocol scheme on which the consul agent is running. | | **state** string | **Choices:*** absent * info * list * node * **present** ← | Whether the session should be present i.e. created if it doesn't exist, or absent, removed if present. If created, the *id* for the session is returned in the output. If `absent`, *id* is required to remove the session. Info for a single session, all the sessions for a node or all available sessions can be retrieved by specifying `info`, `node` or `list` for the *state*; for `node` or `info`, the node *name* or session *id* is required as parameter. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether to verify the TLS certificate of the consul agent. | Examples -------- ``` - name: Register basic session with consul community.general.consul_session: name: session1 - name: Register a session with an existing check community.general.consul_session: name: session_with_check checks: - existing_check_name - name: Register a session with lock_delay community.general.consul_session: name: session_with_delay delay: 20s - name: Retrieve info about session by id community.general.consul_session: id: session_id state: info - name: Retrieve active sessions community.general.consul_session: state: list ``` ### Authors * Steve Gargan (@sgargan) ansible community.general.hwc_vpc_security_group_rule – Creates a resource of Vpc/SecurityGroupRule in Huawei Cloud community.general.hwc\_vpc\_security\_group\_rule – Creates a resource of Vpc/SecurityGroupRule in Huawei Cloud =============================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.hwc_vpc_security_group_rule`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * vpc security group management. Requirements ------------ The below requirements are needed on the host that executes this module. * keystoneauth1 >= 3.6.0 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **description** string | | Provides supplementary information about the security group rule. The value is a string of no more than 255 characters that can contain letters and digits. | | **direction** string / required | | Specifies the direction of access control. The value can be egress or ingress. | | **domain** string / required | | The name of the Domain to scope to (Identity v3). (currently only domain names are supported, and not domain IDs). | | **ethertype** string | | Specifies the IP protocol version. The value can be IPv4 or IPv6. If you do not set this parameter, IPv4 is used by default. | | **id** string | | The id of resource to be managed. | | **identity\_endpoint** string / required | | The Identity authentication URL. | | **password** string / required | | The password to login with. | | **port\_range\_max** integer | | Specifies the end port number. The value ranges from 1 to 65535. If the protocol is not icmp, the value cannot be smaller than the port\_range\_min value. An empty value indicates all ports. | | **port\_range\_min** integer | | Specifies the start port number. The value ranges from 1 to 65535. The value cannot be greater than the port\_range\_max value. An empty value indicates all ports. | | **project** string / required | | The name of the Tenant (Identity v2) or Project (Identity v3). (currently only project names are supported, and not project IDs). | | **protocol** string | | Specifies the protocol type. The value can be icmp, tcp, or udp. If the parameter is left blank, the security group supports all protocols. | | **region** string | | The region to which the project belongs. | | **remote\_group\_id** string | | Specifies the ID of the peer security group. The value is exclusive with parameter remote\_ip\_prefix. | | **remote\_ip\_prefix** string | | Specifies the remote IP address. If the access control direction is set to egress, the parameter specifies the source IP address. If the access control direction is set to ingress, the parameter specifies the destination IP address. The value can be in the CIDR format or IP addresses. The parameter is exclusive with parameter remote\_group\_id. | | **security\_group\_id** string / required | | Specifies the security group rule ID, which uniquely identifies the security group rule. | | **state** string | **Choices:*** **present** ← * absent | Whether the given object should exist in Huawei Cloud. | | **user** string / required | | The user name to login with (currently only user names are supported, and not user IDs). | Notes ----- Note * If *id* option is provided, it takes precedence over *enterprise\_project\_id* for security group rule selection. * *security\_group\_id* is used for security group rule selection. If more than one security group rule with this options exists, execution is aborted. * No parameter support updating. If one of option is changed, the module will create a new resource. * For authentication, you can set identity\_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT` env variable. * For authentication, you can set user using the `ANSIBLE_HWC_USER` env variable. * For authentication, you can set password using the `ANSIBLE_HWC_PASSWORD` env variable. * For authentication, you can set domain using the `ANSIBLE_HWC_DOMAIN` env variable. * For authentication, you can set project using the `ANSIBLE_HWC_PROJECT` env variable. * For authentication, you can set region using the `ANSIBLE_HWC_REGION` env variable. * Environment variables values will only be used if the playbook values are not set. Examples -------- ``` # create a security group rule - name: Create a security group hwc_vpc_security_group: name: "ansible_network_security_group_test" register: sg - name: Create a security group rule community.general.hwc_vpc_security_group_rule: direction: "ingress" protocol: "tcp" ethertype: "IPv4" port_range_max: 22 security_group_id: "{{ sg.id }}" port_range_min: 22 remote_ip_prefix: "0.0.0.0/0" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **description** string | success | Provides supplementary information about the security group rule. The value is a string of no more than 255 characters that can contain letters and digits. | | **direction** string | success | Specifies the direction of access control. The value can be egress or ingress. | | **ethertype** string | success | Specifies the IP protocol version. The value can be IPv4 or IPv6. If you do not set this parameter, IPv4 is used by default. | | **port\_range\_max** integer | success | Specifies the end port number. The value ranges from 1 to 65535. If the protocol is not icmp, the value cannot be smaller than the port\_range\_min value. An empty value indicates all ports. | | **port\_range\_min** integer | success | Specifies the start port number. The value ranges from 1 to 65535. The value cannot be greater than the port\_range\_max value. An empty value indicates all ports. | | **protocol** string | success | Specifies the protocol type. The value can be icmp, tcp, or udp. If the parameter is left blank, the security group supports all protocols. | | **remote\_group\_id** string | success | Specifies the ID of the peer security group. The value is exclusive with parameter remote\_ip\_prefix. | | **remote\_ip\_prefix** string | success | Specifies the remote IP address. If the access control direction is set to egress, the parameter specifies the source IP address. If the access control direction is set to ingress, the parameter specifies the destination IP address. The value can be in the CIDR format or IP addresses. The parameter is exclusive with parameter remote\_group\_id. | | **security\_group\_id** string | success | Specifies the security group rule ID, which uniquely identifies the security group rule. | ### Authors * Huawei Inc. (@huaweicloud) ansible community.general.iptables_state – Save iptables state into a file or restore it from a file community.general.iptables\_state – Save iptables state into a file or restore it from a file ============================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.iptables_state`. New in version 1.1.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * `iptables` is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel. * This module handles the saving and/or loading of rules. This is the same as the behaviour of the `iptables-save` and `iptables-restore` (or `ip6tables-save` and `ip6tables-restore` for IPv6) commands which this module uses internally. * Modifying the state of the firewall remotely may lead to loose access to the host in case of mistake in new ruleset. This module embeds a rollback feature to avoid this, by telling the host to restore previous rules if a cookie is still there after a given delay, and all this time telling the controller to try to remove this cookie on the host through a new connection. Note This module has a corresponding [action plugin](../../../plugins/action#action-plugins). Requirements ------------ The below requirements are needed on the host that executes this module. * iptables * ip6tables Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **counters** boolean | **Choices:*** **no** ← * yes | Save or restore the values of all packet and byte counters. When `true`, the module is not idempotent. | | **ip\_version** string | **Choices:*** **ipv4** ← * ipv6 | Which version of the IP protocol this module should apply to. | | **modprobe** path | | Specify the path to the `modprobe` program internally used by iptables related commands to load kernel modules. By default, `/proc/sys/kernel/modprobe` is inspected to determine the executable's path. | | **noflush** boolean | **Choices:*** **no** ← * yes | For *state=restored*, ignored otherwise. If `false`, restoring iptables rules from a file flushes (deletes) all previous contents of the respective table(s). If `true`, the previous rules are left untouched (but policies are updated anyway, for all built-in chains). | | **path** path / required | | The file the iptables state should be saved to. The file the iptables state should be restored from. | | **state** string / required | **Choices:*** saved * restored | Whether the firewall state should be saved (into a file) or restored (from a file). | | **table** string | **Choices:*** filter * nat * mangle * raw * security | When *state=restored*, restore only the named table even if the input file contains other tables. Fail if the named table is not declared in the file. When *state=saved*, restrict output to the specified table. If not specified, output includes all active tables. | | **wait** integer | | Wait N seconds for the xtables lock to prevent instant failure in case multiple instances of the program are running concurrently. | Notes ----- Note * The rollback feature is not a module option and depends on task’s attributes. To enable it, the module must be played asynchronously, i.e. by setting task attributes *poll* to `0`, and *async* to a value less or equal to `ANSIBLE_TIMEOUT`. If *async* is greater, the rollback will still happen if it shall happen, but you will experience a connection timeout instead of more relevant info returned by the module after its failure. * This module supports *check\_mode*. Examples -------- ``` # This will apply to all loaded/active IPv4 tables. - name: Save current state of the firewall in system file community.general.iptables_state: state: saved path: /etc/sysconfig/iptables # This will apply only to IPv6 filter table. - name: save current state of the firewall in system file community.general.iptables_state: ip_version: ipv6 table: filter state: saved path: /etc/iptables/rules.v6 # This will load a state from a file, with a rollback in case of access loss - name: restore firewall state from a file community.general.iptables_state: state: restored path: /run/iptables.apply async: "{{ ansible_timeout }}" poll: 0 # This will load new rules by appending them to the current ones - name: restore firewall state from a file community.general.iptables_state: state: restored path: /run/iptables.apply noflush: true async: "{{ ansible_timeout }}" poll: 0 # This will only retrieve information - name: get current state of the firewall community.general.iptables_state: state: saved path: /tmp/iptables check_mode: yes changed_when: false register: iptables_state - name: show current state of the firewall ansible.builtin.debug: var: iptables_state.initial_state ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **applied** boolean | always | Whether or not the wanted state has been successfully restored. **Sample:** True | | **initial\_state** list / elements=string | always | The current state of the firewall when module starts. **Sample:** ['# Generated by xtables-save v1.8.2', '\*filter', ':INPUT ACCEPT [0:0]', ':FORWARD ACCEPT [0:0]', ':OUTPUT ACCEPT [0:0]', 'COMMIT', '# Completed'] | | **restored** list / elements=string | always | The state the module restored, whenever it is finally applied or not. **Sample:** ['# Generated by xtables-save v1.8.2', '\*filter', ':INPUT DROP [0:0]', ':FORWARD DROP [0:0]', ':OUTPUT ACCEPT [0:0]', '-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT', '-A INPUT -m conntrack --ctstate INVALID -j DROP', '-A INPUT -i lo -j ACCEPT', '-A INPUT -p icmp -j ACCEPT', '-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT', 'COMMIT', '# Completed'] | | **saved** list / elements=string | always | The iptables state the module saved. **Sample:** ['# Generated by xtables-save v1.8.2', '\*filter', ':INPUT ACCEPT [0:0]', ':FORWARD DROP [0:0]', ':OUTPUT ACCEPT [0:0]', 'COMMIT', '# Completed'] | | **tables** dictionary | always | The iptables we have interest for when module starts. **Sample:** { "filter": [ ":INPUT ACCEPT", ":FORWARD ACCEPT", ":OUTPUT ACCEPT", "-A INPUT -i lo -j ACCEPT", "-A INPUT -p icmp -j ACCEPT", "-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT", "-A INPUT -j REJECT --reject-with icmp-host-prohibited" ], "nat": [ ":PREROUTING ACCEPT", ":INPUT ACCEPT", ":OUTPUT ACCEPT", ":POSTROUTING ACCEPT" ] } | | | **table** list / elements=string | success | Policies and rules for all chains of the named table. | ### Authors * quidame (@quidame)
programming_docs
ansible community.general.typetalk – Send a message to typetalk community.general.typetalk – Send a message to typetalk ======================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.typetalk`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Send a message to typetalk using typetalk API Requirements ------------ The below requirements are needed on the host that executes this module. * json Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **client\_id** string / required | | OAuth2 client ID | | **client\_secret** string / required | | OAuth2 client secret | | **msg** string / required | | message body | | **topic** integer / required | | topic id to post message | Examples -------- ``` - name: Send a message to typetalk community.general.typetalk: client_id: 12345 client_secret: 12345 topic: 1 msg: install completed ``` ### Authors * Takashi Someda (@tksmd) ansible community.general.utm_proxy_location – create, update or destroy reverse_proxy location entry in Sophos UTM community.general.utm\_proxy\_location – create, update or destroy reverse\_proxy location entry in Sophos UTM ============================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.utm_proxy_location`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Create, update or destroy a reverse\_proxy location entry in SOPHOS UTM. * This module needs to have the REST Ability of the UTM to be activated. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **access\_control** string | **Choices:*** **0** ← * 1 | whether to activate the access control for the location | | **allowed\_networks** list / elements=string | **Default:**"REF\_NetworkAny" | A list of allowed networks | | **auth\_profile** string | | The reference name of the auth profile | | **backend** list / elements=string | **Default:**[] | A list of backends that are connected with this location declaration | | **be\_path** string | | The path of the backend | | **comment** string | | The optional comment string | | **denied\_networks** list / elements=string | **Default:**[] | A list of denied network references | | **headers** dictionary | | A dictionary of additional headers to be sent to POST and PUT requests. Is needed for some modules | | **hot\_standby** boolean | **Choices:*** **no** ← * yes | Activate hot standby mode | | **name** string / required | | The name of the object. Will be used to identify the entry | | **path** string | **Default:**"/" | The path of the location | | **state** string | **Choices:*** absent * **present** ← | The desired state of the object. `present` will create or update an object `absent` will delete an object if it was present | | **status** boolean | **Choices:*** no * **yes** ← | Whether the location is active or not | | **stickysession\_id** string | **Default:**"ROUTEID" | The stickysession id | | **stickysession\_status** boolean | **Choices:*** **no** ← * yes | Enable the stickysession | | **utm\_host** string / required | | The REST Endpoint of the Sophos UTM. | | **utm\_port** integer | **Default:**4444 | The port of the REST interface. | | **utm\_protocol** string | **Choices:*** http * **https** ← | The protocol of the REST Endpoint. | | **utm\_token** string / required | | The token used to identify at the REST-API. See <https://www.sophos.com/en-us/medialibrary/PDFs/documentation/UTMonAWS/Sophos-UTM-RESTful-API.pdf?la=en>, Chapter 2.4.2. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether the REST interface's ssl certificate should be verified or not. | | **websocket\_passthrough** boolean | **Choices:*** **no** ← * yes | Enable the websocket passthrough | Examples -------- ``` - name: Create UTM proxy_location utm_proxy_backend: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestLocationEntry backend: REF_OBJECT_STRING state: present - name: Remove UTM proxy_location utm_proxy_backend: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestLocationEntry state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **result** complex | success | The utm object that was created | | | **\_locked** boolean | success | Whether or not the object is currently locked | | | **\_ref** string | success | The reference name of the object | | | **\_type** string | success | The type of the object | | | **access\_control** string | success | Whether to use access control state | | | **allowed\_networks** list / elements=string | success | List of allowed network reference names | | | **auth\_profile** string | success | The auth profile reference name | | | **backend** string | success | The backend reference name | | | **be\_path** string | success | The backend path | | | **comment** string | success | The comment string | | | **denied\_networks** list / elements=string | success | The list of the denied network names | | | **hot\_standby** boolean | success | Use hot standy | | | **name** string | success | The name of the object | | | **path** string | success | Path name | | | **status** boolean | success | Whether the object is active or not | | | **stickysession\_id** string | success | The identifier of the stickysession | | | **stickysession\_status** boolean | success | Whether to use stickysession or not | | | **websocket\_passthrough** boolean | success | Whether websocket passthrough will be used or not | ### Authors * Johannes Brunswicker (@MatrixCrawler) ansible community.general.cloudflare_dns – Manage Cloudflare DNS records community.general.cloudflare\_dns – Manage Cloudflare DNS records ================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.cloudflare_dns`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages dns records via the Cloudflare API, see the docs: <https://api.cloudflare.com/>. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **account\_api\_key** string | | Account API key. Required for api keys authentication. You can obtain your API key from the bottom of the Cloudflare 'My Account' page, found here: <https://dash.cloudflare.com/>. aliases: account\_api\_token | | **account\_email** string | | Account email. Required for API keys authentication. | | **algorithm** integer | | Algorithm number. Required for `type=DS` and `type=SSHFP` when `state=present`. | | **api\_token** string added in 0.2.0 of community.general | | API token. Required for api token authentication. You can obtain your API token from the bottom of the Cloudflare 'My Account' page, found here: <https://dash.cloudflare.com/>. Can be specified in `CLOUDFLARE_TOKEN` environment variable since community.general 2.0.0. | | **cert\_usage** integer | **Choices:*** 0 * 1 * 2 * 3 | Certificate usage number. Required for `type=TLSA` when `state=present`. | | **hash\_type** integer | **Choices:*** 1 * 2 | Hash type number. Required for `type=DS`, `type=SSHFP` and `type=TLSA` when `state=present`. | | **key\_tag** integer | | DNSSEC key tag. Needed for `type=DS` when `state=present`. | | **port** integer | | Service port. Required for `type=SRV` and `type=TLSA`. | | **priority** integer | **Default:**1 | Record priority. Required for `type=MX` and `type=SRV` | | **proto** string | | Service protocol. Required for `type=SRV` and `type=TLSA`. Common values are TCP and UDP. Before Ansible 2.6 only TCP and UDP were available. | | **proxied** boolean | **Choices:*** **no** ← * yes | Proxy through Cloudflare network or just use DNS. | | **record** string | **Default:**"@" | Record to add. Required if `state=present`. Default is `@` (e.g. the zone name). aliases: name | | **selector** integer | **Choices:*** 0 * 1 | Selector number. Required for `type=TLSA` when `state=present`. | | **service** string | | Record service. Required for *type=SRV*. | | **solo** boolean | **Choices:*** no * yes | Whether the record should be the only one for that record type and record name. Only use with `state=present`. This will delete all other records with the same record name and type. | | **state** string | **Choices:*** absent * **present** ← | Whether the record(s) should exist or not. | | **timeout** integer | **Default:**30 | Timeout for Cloudflare API calls. | | **ttl** integer | **Default:**1 | The TTL to give the new record. Must be between 120 and 2,147,483,647 seconds, or 1 for automatic. | | **type** string | **Choices:*** A * AAAA * CNAME * DS * MX * NS * SPF * SRV * SSHFP * TLSA * TXT | The type of DNS record to create. Required if `state=present`. `type=DS`, `type=SSHFP` and `type=TLSA` added in Ansible 2.7. | | **value** string | | The record value. Required for `state=present`. aliases: content | | **weight** integer | **Default:**1 | Service weight. Required for `type=SRV`. | | **zone** string / required | | The name of the Zone to work with (e.g. "example.com"). The Zone must already exist. aliases: domain | Examples -------- ``` - name: Create a test.example.net A record to point to 127.0.0.1 community.general.cloudflare_dns: zone: example.net record: test type: A value: 127.0.0.1 account_email: [email protected] account_api_key: dummyapitoken register: record - name: Create a record using api token community.general.cloudflare_dns: zone: example.net record: test type: A value: 127.0.0.1 api_token: dummyapitoken - name: Create a example.net CNAME record to example.com community.general.cloudflare_dns: zone: example.net type: CNAME value: example.com account_email: [email protected] account_api_key: dummyapitoken state: present - name: Change its TTL community.general.cloudflare_dns: zone: example.net type: CNAME value: example.com ttl: 600 account_email: [email protected] account_api_key: dummyapitoken state: present - name: Delete the record community.general.cloudflare_dns: zone: example.net type: CNAME value: example.com account_email: [email protected] account_api_key: dummyapitoken state: absent - name: Create a example.net CNAME record to example.com and proxy through Cloudflare's network community.general.cloudflare_dns: zone: example.net type: CNAME value: example.com proxied: yes account_email: [email protected] account_api_key: dummyapitoken state: present # This deletes all other TXT records named "test.example.net" - name: Create TXT record "test.example.net" with value "unique value" community.general.cloudflare_dns: domain: example.net record: test type: TXT value: unique value solo: true account_email: [email protected] account_api_key: dummyapitoken state: present - name: Create an SRV record _foo._tcp.example.net community.general.cloudflare_dns: domain: example.net service: foo proto: tcp port: 3500 priority: 10 weight: 20 type: SRV value: fooserver.example.net - name: Create a SSHFP record login.example.com community.general.cloudflare_dns: zone: example.com record: login type: SSHFP algorithm: 4 hash_type: 2 value: 9dc1d6742696d2f51ca1f1a78b3d16a840f7d111eb9454239e70db31363f33e1 - name: Create a TLSA record _25._tcp.mail.example.com community.general.cloudflare_dns: zone: example.com record: mail port: 25 proto: tcp type: TLSA cert_usage: 3 selector: 1 hash_type: 1 value: 6b76d034492b493e15a7376fccd08e63befdad0edab8e442562f532338364bf3 - name: Create a DS record for subdomain.example.com community.general.cloudflare_dns: zone: example.com record: subdomain type: DS key_tag: 5464 algorithm: 8 hash_type: 2 value: B4EB5AC4467D2DFB3BAF9FB9961DC1B6FED54A58CDFAA3E465081EC86F89BFAB ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **record** complex | success, except on record deletion | A dictionary containing the record data. | | | **content** string | success | The record content (details depend on record type). **Sample:** 192.0.2.91 | | | **created\_on** string | success | The record creation date. **Sample:** 2016-03-25T19:09:42.516553Z | | | **data** dictionary | success, if type is SRV, DS, SSHFP or TLSA | Additional record data. **Sample:** {'name': 'jabber', 'port': 8080, 'priority': 10, 'proto': '\_tcp', 'service': '\_xmpp', 'target': 'jabberhost.sample.com', 'weight': 5} | | | **id** string | success | The record ID. **Sample:** f9efb0549e96abcb750de63b38c9576e | | | **locked** boolean | success | No documentation available. | | | **meta** dictionary | success | No documentation available. **Sample:** {'auto\_added': False} | | | **modified\_on** string | success | Record modification date. **Sample:** 2016-03-25T19:09:42.516553Z | | | **name** string | success | The record name as FQDN (including \_service and \_proto for SRV). **Sample:** www.sample.com | | | **priority** integer | success, if type is MX | Priority of the MX record. **Sample:** 10 | | | **proxiable** boolean | success | Whether this record can be proxied through Cloudflare. | | | **proxied** boolean | success | Whether the record is proxied through Cloudflare. | | | **ttl** integer | success | The time-to-live for the record. **Sample:** 300 | | | **type** string | success | The record type. **Sample:** A | | | **zone\_id** string | success | The ID of the zone containing the record. **Sample:** abcede0bf9f0066f94029d2e6b73856a | | | **zone\_name** string | success | The name of the zone containing the record. **Sample:** sample.com | ### Authors * Michael Gruener (@mgruener) ansible community.general.ipa_sudocmd – Manage FreeIPA sudo command community.general.ipa\_sudocmd – Manage FreeIPA sudo command ============================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ipa_sudocmd`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Add, modify or delete sudo command within FreeIPA server using FreeIPA API. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **description** string | | A description of this command. | | **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_prot** string | **Choices:*** http * **https** ← | Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. | | **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **state** string | **Choices:*** absent * disabled * enabled * **present** ← | State to ensure. | | **sudocmd** string / required | | Sudo command. aliases: name | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | This only applies if `ipa_prot` is *https*. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Ensure sudo command exists community.general.ipa_sudocmd: name: su description: Allow to run su via sudo ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - name: Ensure sudo command does not exist community.general.ipa_sudocmd: name: su state: absent ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **sudocmd** dictionary | always | Sudo command as return from IPA API | ### Authors * Thomas Krahn (@Nosmoht)
programming_docs
ansible community.general.say – Makes a computer to speak. community.general.say – Makes a computer to speak. ================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.say`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * makes a computer speak! Amuse your friends, annoy your coworkers! Requirements ------------ The below requirements are needed on the host that executes this module. * say or espeak or espeak-ng Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **msg** string / required | | What to say | | **voice** string | | What voice to use | Notes ----- Note * In 2.5, this module has been renamed from `osx_say` to [community.general.say](#ansible-collections-community-general-say-module). * If you like this module, you may also be interested in the osx\_say callback plugin. * A list of available voices, with language, can be found by running `say -v ?` on a OSX host and `espeak --voices` on a Linux host. Examples -------- ``` - name: Makes a computer to speak community.general.say: msg: '{{ inventory_hostname }} is all done' voice: Zarvox delegate_to: localhost ``` ### Authors * Ansible Core Team * Michael DeHaan (@mpdehaan) ansible community.general.oneview_logical_interconnect_group_info – Retrieve information about one or more of the OneView Logical Interconnect Groups community.general.oneview\_logical\_interconnect\_group\_info – Retrieve information about one or more of the OneView Logical Interconnect Groups ================================================================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneview_logical_interconnect_group_info`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Retrieve information about one or more of the Logical Interconnect Groups from OneView * This module was called `oneview_logical_interconnect_group_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [community.general.oneview\_logical\_interconnect\_group\_info](#ansible-collections-community-general-oneview-logical-interconnect-group-info-module) module no longer returns `ansible_facts`! Requirements ------------ The below requirements are needed on the host that executes this module. * hpOneView >= 2.0.1 * python >= 2.7.9 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_version** integer | | OneView API Version. | | **config** path | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional and when used should be present in the host running the ansible commands. If the file path is not provided, the configuration will be loaded from environment variables. For links to example configuration files or how to use the environment variables verify the notes section. | | **hostname** string | | IP address or hostname for the appliance. | | **image\_streamer\_hostname** string | | IP address or hostname for the HPE Image Streamer REST API. | | **name** string | | Logical Interconnect Group name. | | **params** dictionary | | List of params to delimit, filter and sort the list of resources. params allowed: - `start`: The first item to return, using 0-based indexing. - `count`: The number of resources to return. - `filter`: A general filter/query string to narrow the list of items returned. - `sort`: The sort order of the returned data set. | | **password** string | | Password for API authentication. | | **username** string | | Username for API authentication. | Notes ----- Note * A sample configuration file for the config parameter can be found at: <https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json> * Check how to use environment variables for configuration at: <https://github.com/HewlettPackard/oneview-ansible#environment-variables> * Additional Playbooks for the HPE OneView Ansible modules can be found at: <https://github.com/HewlettPackard/oneview-ansible/tree/master/examples> * The OneView API version used will directly affect returned and expected fields in resources. Information on setting the desired API version and can be found at: <https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version> Examples -------- ``` - name: Gather information about all Logical Interconnect Groups community.general.oneview_logical_interconnect_group_info: hostname: 172.16.101.48 username: administrator password: my_password api_version: 500 no_log: true delegate_to: localhost register: result - name: Print fetched information about Logical Interconnect Groups ansible.builtin.debug: msg: "{{ result.logical_interconnect_groups }}" - name: Gather paginated, filtered and sorted information about Logical Interconnect Groups community.general.oneview_logical_interconnect_group_info: params: start: 0 count: 3 sort: name:descending filter: name=LIGName hostname: 172.16.101.48 username: administrator password: my_password api_version: 500 no_log: true delegate_to: localhost register: result - name: Print fetched information about paginated, filtered and sorted list of Logical Interconnect Groups ansible.builtin.debug: msg: "{{ result.logical_interconnect_groups }}" - name: Gather information about a Logical Interconnect Group by name community.general.oneview_logical_interconnect_group_info: name: logical interconnect group name hostname: 172.16.101.48 username: administrator password: my_password api_version: 500 no_log: true delegate_to: localhost register: result - name: Print fetched information about Logical Interconnect Group found by name ansible.builtin.debug: msg: "{{ result.logical_interconnect_groups }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **logical\_interconnect\_groups** dictionary | Always, but can be null. | Has all the OneView information about the Logical Interconnect Groups. | ### Authors * Felipe Bulsoni (@fgbulsoni) * Thiago Miotto (@tmiotto) * Adriane Cardozo (@adriane-cardozo) ansible community.general.snmp_facts – Retrieve facts for a device using SNMP community.general.snmp\_facts – Retrieve facts for a device using SNMP ====================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.snmp_facts`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Retrieve facts for a device using SNMP, the facts will be inserted to the ansible\_facts key. Requirements ------------ The below requirements are needed on the host that executes this module. * pysnmp Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **authkey** string | | Authentication key. Required *version* is `v3`. | | **community** string | | The SNMP community string, required if *version* is `v2` or `v2c`. | | **host** string / required | | Set to target SNMP server (normally `{{ inventory_hostname }}`). | | **integrity** string | **Choices:*** md5 * sha | Hashing algorithm. Required if *version* is `v3`. | | **level** string | **Choices:*** authNoPriv * authPriv | Authentication level. Required if *version* is `v3`. | | **privacy** string | **Choices:*** aes * des | Encryption algorithm. Required if *level* is `authPriv`. | | **privkey** string | | Encryption key. Required if *level* is `authPriv`. | | **retries** integer added in 2.3.0 of community.general | | Maximum number of request retries, 0 retries means just a single request. | | **timeout** integer added in 2.3.0 of community.general | | Response timeout in seconds. | | **username** string | | Username for SNMPv3. Required if *version* is `v3`. | | **version** string / required | **Choices:*** v2 * v2c * v3 | SNMP Version to use, `v2`, `v2c` or `v3`. | Examples -------- ``` - name: Gather facts with SNMP version 2 community.general.snmp_facts: host: '{{ inventory_hostname }}' version: v2c community: public delegate_to: local - name: Gather facts using SNMP version 3 community.general.snmp_facts: host: '{{ inventory_hostname }}' version: v3 level: authPriv integrity: sha privacy: aes username: snmp-user authkey: abc12345 privkey: def6789 delegate_to: localhost ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **ansible\_all\_ipv4\_addresses** list / elements=string | success | List of all IPv4 addresses. **Sample:** ['127.0.0.1', '172.17.0.1'] | | **ansible\_interfaces** dictionary | success | Dictionary of each network interface and its metadata. **Sample:** {'1': {'adminstatus': 'up', 'description': '', 'ifindex': '1', 'ipv4': [{'address': '127.0.0.1', 'netmask': '255.0.0.0'}], 'mac': '', 'mtu': '65536', 'name': 'lo', 'operstatus': 'up', 'speed': '65536'}, '2': {'adminstatus': 'up', 'description': '', 'ifindex': '2', 'ipv4': [{'address': '192.168.213.128', 'netmask': '255.255.255.0'}], 'mac': '000a305a52a1', 'mtu': '1500', 'name': 'Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)', 'operstatus': 'up', 'speed': '1500'}} | | **ansible\_syscontact** string | success | The textual identification of the contact person for this managed node, together with information on how to contact this person. **Sample:** Me <[email protected]> | | **ansible\_sysdescr** string | success | A textual description of the entity. **Sample:** Linux ubuntu-user 4.4.0-93-generic | | **ansible\_syslocation** string | success | The physical location of this node (e.g., `telephone closet, 3rd floor'). **Sample:** Sitting on the Dock of the Bay | | **ansible\_sysname** string | success | An administratively-assigned name for this managed node. **Sample:** ubuntu-user | | **ansible\_sysobjectid** string | success | The vendor's authoritative identification of the network management subsystem contained in the entity. **Sample:** 1.3.6.1.4.1.8072.3.2.10 | | **ansible\_sysuptime** integer | success | The time (in hundredths of a second) since the network management portion of the system was last re-initialized. **Sample:** 42388 | ### Authors * Patrick Ogenstad (@ogenstad) ansible community.general.gandi_livedns – Manage Gandi LiveDNS records community.general.gandi\_livedns – Manage Gandi LiveDNS records =============================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.gandi_livedns`. New in version 2.3.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages DNS records by the Gandi LiveDNS API, see the docs: <https://doc.livedns.gandi.net/>. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string / required | | Account API token. | | **domain** string / required | | The name of the Domain to work with (for example, "example.com"). | | **record** string / required | | Record to add. | | **state** string | **Choices:*** absent * **present** ← | Whether the record(s) should exist or not. | | **ttl** integer | | The TTL to give the new record. Required when *state=present*. | | **type** string / required | | The type of DNS record to create. | | **values** list / elements=string | | The record values. Required when *state=present*. | Notes ----- Note * Supports `check_mode`. Examples -------- ``` - name: Create a test A record to point to 127.0.0.1 in the my.com domain community.general.gandi_livedns: domain: my.com record: test type: A values: - 127.0.0.1 ttl: 7200 api_key: dummyapitoken register: record - name: Create a mail CNAME record to www.my.com domain community.general.gandi_livedns: domain: my.com type: CNAME record: mail values: - www ttl: 7200 api_key: dummyapitoken state: present - name: Change its TTL community.general.gandi_livedns: domain: my.com type: CNAME record: mail values: - www ttl: 10800 api_key: dummyapitoken state: present - name: Delete the record community.general.gandi_livedns: domain: my.com type: CNAME record: mail api_key: dummyapitoken state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **record** dictionary | success, except on record deletion | A dictionary containing the record data. | | | **domain** string | success | The domain associated with the record. **Sample:** my.com | | | **record** string | success | The record name. **Sample:** www | | | **ttl** integer | success | The time-to-live for the record. **Sample:** 300 | | | **type** string | success | The record type. **Sample:** A | | | **values** list / elements=string | success | The record content (details depend on record type). **Sample:** ['192.0.2.91', '192.0.2.92'] | ### Authors * Gregory Thiemonge (@gthiemonge) ansible community.general.apache2_mod_proxy – Set and/or get members’ attributes of an Apache httpd 2.4 mod_proxy balancer pool community.general.apache2\_mod\_proxy – Set and/or get members’ attributes of an Apache httpd 2.4 mod\_proxy balancer pool ========================================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.apache2_mod_proxy`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Set and/or get members’ attributes of an Apache httpd 2.4 mod\_proxy balancer pool, using HTTP POST and GET requests. The httpd mod\_proxy balancer-member status page has to be enabled and accessible, as this module relies on parsing this page. This module supports ansible check\_mode, and requires BeautifulSoup python module. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **balancer\_url\_suffix** string | **Default:**"/balancer-manager/" | Suffix of the balancer pool url required to access the balancer pool status page (e.g. balancer\_vhost[:port]/balancer\_url\_suffix). | | **balancer\_vhost** string / required | | (ipv4|ipv6|fqdn):port of the Apache httpd 2.4 mod\_proxy balancer pool. | | **member\_host** string | | (ipv4|ipv6|fqdn) of the balancer member to get or to set attributes to. Port number is autodetected and should not be specified here. If undefined, apache2\_mod\_proxy module will return a members list of dictionaries of all the current balancer pool members' attributes. | | **state** string | | Desired state of the member host. (absent|disabled),drained,hot\_standby,ignore\_errors can be simultaneously invoked by separating them with a comma (e.g. state=drained,ignore\_errors). Accepted state values: ["present", "absent", "enabled", "disabled", "drained", "hot\_standby", "ignore\_errors"] | | **tls** boolean | **Choices:*** **no** ← * yes | Use https to access balancer management page. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Validate ssl/tls certificates. | Examples -------- ``` - name: Get all current balancer pool members attributes community.general.apache2_mod_proxy: balancer_vhost: 10.0.0.2 - name: Get a specific member attributes community.general.apache2_mod_proxy: balancer_vhost: myws.mydomain.org balancer_suffix: /lb/ member_host: node1.myws.mydomain.org # Enable all balancer pool members: - name: Get attributes community.general.apache2_mod_proxy: balancer_vhost: '{{ myloadbalancer_host }}' register: result - name: Enable all balancer pool members community.general.apache2_mod_proxy: balancer_vhost: '{{ myloadbalancer_host }}' member_host: '{{ item.host }}' state: present with_items: '{{ result.members }}' # Gracefully disable a member from a loadbalancer node: - name: Step 1 community.general.apache2_mod_proxy: balancer_vhost: '{{ vhost_host }}' member_host: '{{ member.host }}' state: drained delegate_to: myloadbalancernode - name: Step 2 ansible.builtin.wait_for: host: '{{ member.host }}' port: '{{ member.port }}' state: drained delegate_to: myloadbalancernode - name: Step 3 community.general.apache2_mod_proxy: balancer_vhost: '{{ vhost_host }}' member_host: '{{ member.host }}' state: absent delegate_to: myloadbalancernode ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **member** dictionary | success | specific balancer member information dictionary, returned when apache2\_mod\_proxy module is invoked with member\_host parameter. **Sample:** {'attributes': {'Busy': '0', 'Elected': '42', 'Factor': '1', 'From': '136K', 'Load': '0', 'Route': None, 'RouteRedir': None, 'Set': '0', 'Status': 'Init Ok ', 'To': ' 47K', 'Worker URL': None}, 'balancer\_url': 'http://10.10.0.2/balancer-manager/', 'host': '10.10.0.20', 'management\_url': 'http://10.10.0.2/lb/?b=mywsbalancer&w=http://10.10.0.20:8080/ws&nonce=8925436c-79c6-4841-8936-e7d13b79239b', 'path': '/ws', 'port': 8080, 'protocol': 'http', 'status': {'disabled': False, 'drained': False, 'hot\_standby': False, 'ignore\_errors': False}} | | **members** list / elements=string | success | list of member (defined above) dictionaries, returned when apache2\_mod\_proxy is invoked with no member\_host and state args. **Sample:** [{'attributes': {'Busy': '0', 'Elected': '42', 'Factor': '1', 'From': '136K', 'Load': '0', 'Route': None, 'RouteRedir': None, 'Set': '0', 'Status': 'Init Ok ', 'To': ' 47K', 'Worker URL': None}, 'balancer\_url': 'http://10.10.0.2/balancer-manager/', 'host': '10.10.0.20', 'management\_url': 'http://10.10.0.2/lb/?b=mywsbalancer&w=http://10.10.0.20:8080/ws&nonce=8925436c-79c6-4841-8936-e7d13b79239b', 'path': '/ws', 'port': 8080, 'protocol': 'http', 'status': {'disabled': False, 'drained': False, 'hot\_standby': False, 'ignore\_errors': False}}, {'attributes': {'Busy': '0', 'Elected': '42', 'Factor': '1', 'From': '136K', 'Load': '0', 'Route': None, 'RouteRedir': None, 'Set': '0', 'Status': 'Init Ok ', 'To': ' 47K', 'Worker URL': None}, 'balancer\_url': 'http://10.10.0.2/balancer-manager/', 'host': '10.10.0.21', 'management\_url': 'http://10.10.0.2/lb/?b=mywsbalancer&w=http://10.10.0.21:8080/ws&nonce=8925436c-79c6-4841-8936-e7d13b79239b', 'path': '/ws', 'port': 8080, 'protocol': 'http', 'status': {'disabled': False, 'drained': False, 'hot\_standby': False, 'ignore\_errors': False}}] | ### Authors * Olivier Boukili (@oboukili)
programming_docs
ansible community.general.hipchat – Send a message to Hipchat. community.general.hipchat – Send a message to Hipchat. ====================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.hipchat`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Send a message to a Hipchat room, with options to control the formatting. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api** string | **Default:**"https://api.hipchat.com/v1" | API url if using a self-hosted hipchat server. For Hipchat API version 2 use the default URI with `/v2` instead of `/v1`. | | **color** string | **Choices:*** **yellow** ← * red * green * purple * gray * random | Background color for the message. | | **msg** string / required | | The message body. | | **msg\_format** string | **Choices:*** **text** ← * html | Message format. | | **msg\_from** string | **Default:**"Ansible" | Name the message will appear to be sent from. Max length is 15 characters - above this it will be truncated. aliases: from | | **notify** boolean | **Choices:*** no * **yes** ← | If true, a notification will be triggered for users in the room. | | **room** string / required | | ID or name of the room. | | **token** string / required | | API token. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Send a message to a Hipchat room community.general.hipchat: room: notif msg: Ansible task finished - name: Send a message to a Hipchat room using Hipchat API version 2 community.general.hipchat: api: https://api.hipchat.com/v2/ token: OAUTH2_TOKEN room: notify msg: Ansible task finished ``` ### Authors * Shirou Wakayama (@shirou) * Paul Bourdel (@pb8226) ansible community.general.serverless – Manages a Serverless Framework project community.general.serverless – Manages a Serverless Framework project ===================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.serverless`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Provides support for managing Serverless Framework (<https://serverless.com/>) project deployments and stacks. Requirements ------------ The below requirements are needed on the host that executes this module. * serverless * yaml Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **deploy** boolean | **Choices:*** no * **yes** ← | Whether or not to deploy artifacts after building them. When this option is `false` all the functions will be built, but no stack update will be run to send them out. This is mostly useful for generating artifacts to be stored/deployed elsewhere. | | **force** boolean | **Choices:*** **no** ← * yes | Whether or not to force full deployment, equivalent to serverless `--force` option. | | **functions** list / elements=string | **Default:**[] | A list of specific functions to deploy. If this is not provided, all functions in the service will be deployed. Deprecated parameter, it will be removed in community.general 5.0.0. | | **region** string | | AWS region to deploy the service to. This parameter defaults to `us-east-1`. | | **serverless\_bin\_path** path | | The path of a serverless framework binary relative to the 'service\_path' eg. node\_module/.bin/serverless | | **service\_path** path / required | | The path to the root of the Serverless Service to be operated on. | | **stage** string | | The name of the serverless framework project stage to deploy to. This uses the serverless framework default "dev". | | **state** string | **Choices:*** absent * **present** ← | Goal state of given stage/project. | | **verbose** boolean | **Choices:*** **no** ← * yes | Shows all stack events during deployment, and display any Stack Output. | Notes ----- Note * Currently, the `serverless` command must be in the path of the node executing the task. In the future this may be a flag. Examples -------- ``` - name: Basic deploy of a service community.general.serverless: service_path: '{{ project_dir }}' state: present - name: Deploy a project, then pull its resource list back into Ansible community.general.serverless: stage: dev region: us-east-1 service_path: '{{ project_dir }}' register: sls # The cloudformation stack is always named the same as the full service, so the # cloudformation_info module can get a full list of the stack resources, as # well as stack events and outputs - cloudformation_info: region: us-east-1 stack_name: '{{ sls.service_name }}' stack_resources: true - name: Deploy a project using a locally installed serverless binary community.general.serverless: stage: dev region: us-east-1 service_path: '{{ project_dir }}' serverless_bin_path: node_modules/.bin/serverless ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **command** string | always | Full `serverless` command run by this module, in case you want to re-run the command outside the module. **Sample:** serverless deploy --stage production | | **service\_name** string | always | The service name specified in the serverless.yml that was just deployed. **Sample:** my-fancy-service-dev | | **state** string | always | Whether the stack for the serverless project is present/absent. | ### Authors * Ryan Scott Brown (@ryansb) ansible community.general.manageiq_alert_profiles – Configuration of alert profiles for ManageIQ community.general.manageiq\_alert\_profiles – Configuration of alert profiles for ManageIQ ========================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.manageiq_alert_profiles`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * The manageiq\_alert\_profiles module supports adding, updating and deleting alert profiles in ManageIQ. Requirements ------------ The below requirements are needed on the host that executes this module. * manageiq-client <https://github.com/ManageIQ/manageiq-api-client-python/> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **alerts** list / elements=string | | List of alert descriptions to assign to this profile. Required if state is "present" | | **manageiq\_connection** dictionary | | ManageIQ connection configuration information. | | | **ca\_cert** string | | The path to a CA bundle file or directory with certificates. defaults to None. aliases: ca\_bundle\_path | | | **password** string | | ManageIQ password. `MIQ_PASSWORD` env var if set. otherwise, required if no token is passed in. | | | **token** string | | ManageIQ token. `MIQ_TOKEN` env var if set. otherwise, required if no username or password is passed in. | | | **url** string | | ManageIQ environment url. `MIQ_URL` env var if set. otherwise, it is required to pass it. | | | **username** string | | ManageIQ username. `MIQ_USERNAME` env var if set. otherwise, required if no token is passed in. | | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether SSL certificates should be verified for HTTPS requests. defaults to True. aliases: verify\_ssl | | **name** string | | The unique alert profile name in ManageIQ. Required when state is "absent" or "present". | | **notes** string | | Optional notes for this profile | | **resource\_type** string | **Choices:*** Vm * ContainerNode * MiqServer * Host * Storage * EmsCluster * ExtManagementSystem * MiddlewareServer | The resource type for the alert profile in ManageIQ. Required when state is "present". | | **state** string | **Choices:*** absent * **present** ← | absent - alert profile should not exist, present - alert profile should exist, | Examples -------- ``` - name: Add an alert profile to ManageIQ community.general.manageiq_alert_profiles: state: present name: Test profile resource_type: ContainerNode alerts: - Test Alert 01 - Test Alert 02 manageiq_connection: url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' validate_certs: False - name: Delete an alert profile from ManageIQ community.general.manageiq_alert_profiles: state: absent name: Test profile manageiq_connection: url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' validate_certs: False ``` ### Authors * Elad Alfassa (@elad661) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#0f6a6e63696e7c7c6e292c3c3834292c3a3d34292c3b37347d6a6b676e7b292c3b39346c6062)> ansible community.general.nios_nsgroup – Configure InfoBlox DNS Nameserver Groups community.general.nios\_nsgroup – Configure InfoBlox DNS Nameserver Groups ========================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nios_nsgroup`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Status](#status) DEPRECATED ---------- Removed in version 5.0.0 Why Please install the infoblox.nios\_modules collection and use the corresponding module from it. Alternative infoblox.nios\_modules.nios\_nsgroup Synopsis -------- * Adds and/or removes nameserver groups form Infoblox NIOS servers. This module manages NIOS `nsgroup` objects using the Infoblox. WAPI interface over REST. Requirements ------------ The below requirements are needed on the host that executes this module. * infoblox\_client Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **comment** string | | Configures a text string comment to be associated with the instance of this object. The provided text string will be configured on the object instance. | | **extattrs** string | | Allows for the configuration of Extensible Attributes on the instance of the object. This argument accepts a set of key / value pairs for configuration. | | **external\_primaries** list / elements=dictionary | | Configures a list of external nameservers (non-members of the grid). This option is required when setting *use\_external\_primaries* to `true`. | | | **address** string / required | | Configures the IP address of the external nameserver | | | **name** string / required | | Set a label for the external nameserver | | | **stealth** boolean | **Choices:*** **no** ← * yes | Configure the external nameserver as stealth server (without NS record) in the zones. | | | **tsig\_key** string | | Set a DNS TSIG key for the nameserver to secure zone transfers (AFXRs). | | | **tsig\_key\_alg** string | **Choices:*** **HMAC-MD5** ← * HMAC-SHA256 | Provides the algorithm used for the *tsig\_key* in use. | | | **tsig\_key\_name** string / required | | Sets a label for the *tsig\_key* value | | **external\_secondaries** list / elements=dictionary | | Allows to provide a list of external secondary nameservers, that are not members of the grid. | | | **address** string / required | | Configures the IP address of the external nameserver | | | **name** string / required | | Set a label for the external nameserver | | | **stealth** boolean | **Choices:*** **no** ← * yes | Configure the external nameserver as stealth server (without NS record) in the zones. | | | **tsig\_key** string | | Set a DNS TSIG key for the nameserver to secure zone transfers (AFXRs). | | | **tsig\_key\_alg** string | **Choices:*** **HMAC-MD5** ← * HMAC-SHA256 | Provides the algorithm used for the *tsig\_key* in use. | | | **tsig\_key\_name** string / required | | Sets a label for the *tsig\_key* value | | **grid\_primary** list / elements=dictionary | | This host is to be used as primary server in this nameserver group. It must be a grid member. This option is required when setting *use\_external\_primaries* to `false`. | | | **enable\_preferred\_primaries** boolean | **Choices:*** **no** ← * yes | This flag represents whether the preferred\_primaries field values of this member are used (see Infoblox WAPI docs). | | | **grid\_replicate** boolean | **Choices:*** **no** ← * yes | Use DNS zone transfers if set to `True` or ID Grid Replication if set to `False`. | | | **lead** boolean | **Choices:*** **no** ← * yes | This flag controls if the grid lead secondary nameserver performs zone transfers to non lead secondaries. | | | **name** string / required | | Provide the name of the grid member to identify the host. | | | **preferred\_primaries** list / elements=dictionary | | Provide a list of elements like in *external\_primaries* to set the precedence of preferred primary nameservers. | | | | **address** string / required | | Configures the IP address of the preferred primary nameserver. | | | | **name** string / required | | Set a label for the preferred primary nameserver. | | | | **stealth** boolean | **Choices:*** **no** ← * yes | Configure the preferred primary nameserver as stealth server (without NS record) in the zones. | | | | **tsig\_key** string | | Set a DNS TSIG key for the nameserver to secure zone transfers (AFXRs). | | | | **tsig\_key\_alg** string | **Choices:*** **HMAC-MD5** ← * HMAC-SHA256 | Provides the algorithm used for the *tsig\_key* in use. | | | | **tsig\_key\_name** string / required | | Sets a label for the *tsig\_key* value. | | | **stealth** boolean | **Choices:*** **no** ← * yes | Configure the external nameserver as stealth server (without NS record) in the zones. | | **grid\_secondaries** list / elements=dictionary | | Configures the list of grid member hosts that act as secondary nameservers. This option is required when setting *use\_external\_primaries* to `true`. | | | **enable\_preferred\_primaries** boolean | **Choices:*** **no** ← * yes | This flag represents whether the preferred\_primaries field values of this member are used (see Infoblox WAPI docs). | | | **grid\_replicate** boolean | **Choices:*** **no** ← * yes | Use DNS zone transfers if set to `True` or ID Grid Replication if set to `False` | | | **lead** boolean | **Choices:*** **no** ← * yes | This flag controls if the grid lead secondary nameserver performs zone transfers to non lead secondaries. | | | **name** string / required | | Provide the name of the grid member to identify the host. | | | **preferred\_primaries** list / elements=dictionary | | Provide a list of elements like in *external\_primaries* to set the precedence of preferred primary nameservers. | | | | **address** string / required | | Configures the IP address of the preferred primary nameserver. | | | | **name** string / required | | Set a label for the preferred primary nameserver. | | | | **stealth** boolean | **Choices:*** **no** ← * yes | Configure the preferred primary nameserver as stealth server (without NS record) in the zones. | | | | **tsig\_key** string | | Set a DNS TSIG key for the nameserver to secure zone transfers (AFXRs). | | | | **tsig\_key\_alg** string | **Choices:*** **HMAC-MD5** ← * HMAC-SHA256 | Provides the algorithm used for the *tsig\_key* in use. | | | | **tsig\_key\_name** string / required | | Sets a label for the *tsig\_key* value. | | | **stealth** boolean | **Choices:*** **no** ← * yes | Configure the external nameserver as stealth server (without NS record) in the zones. | | **is\_grid\_default** boolean | **Choices:*** **no** ← * yes | If set to `True` this nsgroup will become the default nameserver group for new zones. | | **name** string / required | | Specifies the name of the NIOS nameserver group to be managed. | | **provider** dictionary | | A dict object containing connection details. | | | **host** string | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. | | | **http\_pool\_connections** integer | **Default:**10 | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_pool\_maxsize** integer | **Default:**10 | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_request\_timeout** integer | **Default:**10 | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. | | | **max\_results** integer | **Default:**1000 | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. | | | **max\_retries** integer | **Default:**3 | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. | | | **password** string | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. | | | **silent\_ssl\_warnings** boolean | **Choices:*** no * **yes** ← | Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **username** string | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. | | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable. aliases: ssl\_verify | | | **wapi\_version** string | **Default:**"2.1" | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 | | **state** string | **Choices:*** **present** ← * absent | Configures the intended state of the instance of the object on the NIOS server. When this value is set to `present`, the object is configured on the device and when this value is set to `absent` the value is removed (if necessary) from the device. | | **use\_external\_primary** boolean | **Choices:*** **no** ← * yes | This flag controls whether the group is using an external primary nameserver. Note that modification of this field requires passing values for *grid\_secondaries* and *external\_primaries*. | Notes ----- Note * This module must be run locally, which can be achieved by specifying `connection: local`. * Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible. Examples -------- ``` - name: Create simple infoblox nameserver group community.general.nios_nsgroup: name: my-simple-group comment: "this is a simple nameserver group" grid_primary: - name: infoblox-test.example.com state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Create infoblox nameserver group with external primaries community.general.nios_nsgroup: name: my-example-group use_external_primary: true comment: "this is my example nameserver group" external_primaries: "{{ ext_nameservers }}" grid_secondaries: - name: infoblox-test.example.com lead: True preferred_primaries: "{{ ext_nameservers }}" state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Delete infoblox nameserver group community.general.nios_nsgroup: name: my-simple-group comment: "this is a simple nameserver group" grid_primary: - name: infoblox-test.example.com state: absent provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local ``` Status ------ * This module will be removed in version 5.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Erich Birngruber (@ebirn) * Sumit Jaiswal (@sjaiswal)
programming_docs
ansible community.general.nios_zone – Configure Infoblox NIOS DNS zones community.general.nios\_zone – Configure Infoblox NIOS DNS zones ================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nios_zone`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Status](#status) DEPRECATED ---------- Removed in version 5.0.0 Why Please install the infoblox.nios\_modules collection and use the corresponding module from it. Alternative infoblox.nios\_modules.nios\_zone Synopsis -------- * Adds and/or removes instances of DNS zone objects from Infoblox NIOS servers. This module manages NIOS `zone_auth` objects using the Infoblox WAPI interface over REST. Requirements ------------ The below requirements are needed on the host that executes this module. * infoblox-client Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **comment** string | | Configures a text string comment to be associated with the instance of this object. The provided text string will be configured on the object instance. | | **extattrs** dictionary | | Allows for the configuration of Extensible Attributes on the instance of the object. This argument accepts a set of key / value pairs for configuration. | | **fqdn** string / required | | Specifies the qualified domain name to either add or remove from the NIOS instance based on the configured `state` value. aliases: name | | **grid\_primary** list / elements=dictionary | | Configures the grid primary servers for this zone. | | | **name** string / required | | The name of the grid primary server | | **grid\_secondaries** list / elements=dictionary | | Configures the grid secondary servers for this zone. | | | **name** string / required | | The name of the grid secondary server | | **ns\_group** string | | Configures the name server group for this zone. Name server group is mutually exclusive with grid primary and grid secondaries. | | **provider** dictionary | | A dict object containing connection details. | | | **host** string | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. | | | **http\_pool\_connections** integer | **Default:**10 | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_pool\_maxsize** integer | **Default:**10 | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_request\_timeout** integer | **Default:**10 | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. | | | **max\_results** integer | **Default:**1000 | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. | | | **max\_retries** integer | **Default:**3 | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. | | | **password** string | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. | | | **silent\_ssl\_warnings** boolean | **Choices:*** no * **yes** ← | Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **username** string | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. | | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable. aliases: ssl\_verify | | | **wapi\_version** string | **Default:**"2.1" | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 | | **restart\_if\_needed** boolean | **Choices:*** no * yes | If set to true, causes the NIOS DNS service to restart and load the new zone configuration | | **state** string | **Choices:*** **present** ← * absent | Configures the intended state of the instance of the object on the NIOS server. When this value is set to `present`, the object is configured on the device and when this value is set to `absent` the value is removed (if necessary) from the device. | | **view** string | **Default:**"default" | Configures the DNS view name for the configured resource. The specified DNS zone must already exist on the running NIOS instance prior to configuring zones. aliases: dns\_view | | **zone\_format** string | **Default:**"FORWARD" | Create an authorative Reverse-Mapping Zone which is an area of network space for which one or more name servers-primary and secondary-have the responsibility to respond to address-to-name queries. It supports reverse-mapping zones for both IPv4 and IPv6 addresses. | Notes ----- Note * This module must be run locally, which can be achieved by specifying `connection: local`. * Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible. Examples -------- ``` - name: Configure a zone on the system using grid primary and secondaries community.general.nios_zone: name: ansible.com grid_primary: - name: gridprimary.grid.com grid_secondaries: - name: gridsecondary1.grid.com - name: gridsecondary2.grid.com restart_if_needed: true state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Configure a zone on the system using a name server group community.general.nios_zone: name: ansible.com ns_group: examplensg restart_if_needed: true state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Configure a reverse mapping zone on the system using IPV4 zone format community.general.nios_zone: name: 10.10.10.0/24 zone_format: IPV4 state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Configure a reverse mapping zone on the system using IPV6 zone format community.general.nios_zone: name: 100::1/128 zone_format: IPV6 state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Update the comment and ext attributes for an existing zone community.general.nios_zone: name: ansible.com comment: this is an example comment extattrs: Site: west-dc state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Remove the dns zone community.general.nios_zone: name: ansible.com state: absent provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Remove the reverse mapping dns zone from the system with IPV4 zone format community.general.nios_zone: name: 10.10.10.0/24 zone_format: IPV4 state: absent provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local ``` Status ------ * This module will be removed in version 5.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Peter Sprygada (@privateip) ansible community.general.manageiq_group – Management of groups in ManageIQ. community.general.manageiq\_group – Management of groups in ManageIQ. ===================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.manageiq_group`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * The manageiq\_group module supports adding, updating and deleting groups in ManageIQ. Requirements ------------ The below requirements are needed on the host that executes this module. * manageiq-client * manageiq-client <https://github.com/ManageIQ/manageiq-api-client-python/> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **belongsto\_filters** list / elements=string | | A list of strings with a reference to the allowed host, cluster or folder | | **belongsto\_filters\_merge\_mode** string | **Choices:*** merge * **replace** ← | In merge mode existing settings are merged with the supplied `belongsto_filters`. In replace mode current values are replaced with the supplied `belongsto_filters`. | | **description** string / required | | The group description. | | **managed\_filters** dictionary | | The tag values per category | | **managed\_filters\_merge\_mode** string | **Choices:*** merge * **replace** ← | In merge mode existing categories are kept or updated, new categories are added. In replace mode all categories will be replaced with the supplied `managed_filters`. | | **manageiq\_connection** dictionary | | ManageIQ connection configuration information. | | | **ca\_cert** string | | The path to a CA bundle file or directory with certificates. defaults to None. aliases: ca\_bundle\_path | | | **password** string | | ManageIQ password. `MIQ_PASSWORD` env var if set. otherwise, required if no token is passed in. | | | **token** string | | ManageIQ token. `MIQ_TOKEN` env var if set. otherwise, required if no username or password is passed in. | | | **url** string | | ManageIQ environment url. `MIQ_URL` env var if set. otherwise, it is required to pass it. | | | **username** string | | ManageIQ username. `MIQ_USERNAME` env var if set. otherwise, required if no token is passed in. | | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether SSL certificates should be verified for HTTPS requests. defaults to True. aliases: verify\_ssl | | **role** string | | The the group role name The `role_id` has precedence over the `role` when supplied. | | **role\_id** integer | | The the group role id | | **state** string | **Choices:*** absent * **present** ← | absent - group should not exist, present - group should be. | | **tenant** string | | The tenant for the group identified by the tenant name. The `tenant_id` has precedence over the `tenant` when supplied. Tenant names are case sensitive. | | **tenant\_id** integer | | The tenant for the group identified by the tenant id. | Examples -------- ``` - name: Create a group in ManageIQ with the role EvmRole-user and tenant 'my_tenant' community.general.manageiq_group: description: 'MyGroup-user' role: 'EvmRole-user' tenant: 'my_tenant' manageiq_connection: url: 'https://manageiq_server' username: 'admin' password: 'smartvm' validate_certs: False - name: Create a group in ManageIQ with the role EvmRole-user and tenant with tenant_id 4 community.general.manageiq_group: description: 'MyGroup-user' role: 'EvmRole-user' tenant_id: 4 manageiq_connection: url: 'https://manageiq_server' username: 'admin' password: 'smartvm' validate_certs: False - name: - Create or update a group in ManageIQ with the role EvmRole-user and tenant my_tenant. - Apply 3 prov_max_cpu and 2 department tags to the group. - Limit access to a cluster for the group. community.general.manageiq_group: description: 'MyGroup-user' role: 'EvmRole-user' tenant: my_tenant managed_filters: prov_max_cpu: - '1' - '2' - '4' department: - defense - engineering managed_filters_merge_mode: replace belongsto_filters: - "/belongsto/ExtManagementSystem|ProviderName/EmsFolder|Datacenters/EmsFolder|dc_name/EmsFolder|host/EmsCluster|Cluster name" belongsto_filters_merge_mode: merge manageiq_connection: url: 'https://manageiq_server' username: 'admin' password: 'smartvm' validate_certs: False - name: Delete a group in ManageIQ community.general.manageiq_group: state: 'absent' description: 'MyGroup-user' manageiq_connection: url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - name: Delete a group in ManageIQ using a token community.general.manageiq_group: state: 'absent' description: 'MyGroup-user' manageiq_connection: url: 'http://127.0.0.1:3000' token: 'sometoken' ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **group** complex | success | The group. | | | **belongsto\_filters** list / elements=string | success | A list of strings with a reference to the allowed host, cluster or folder | | | **created\_on** string | success | Group creation date **Sample:** 2018-08-12T08:37:55+00:00 | | | **description** string | success | The group description | | | **group\_type** string | success | The group type, system or user | | | **id** integer | success | The group id | | | **managed\_filters** dictionary | success | The tag values per category | | | **role** string | success | The group role name | | | **tenant** string | success | The group tenant name | | | **updated\_on** integer | success | Group update date **Sample:** 2018-08-12T08:37:55+00:00 | ### Authors * Evert Mulder (@evertmulder) ansible community.general.ipa_hbacrule – Manage FreeIPA HBAC rule community.general.ipa\_hbacrule – Manage FreeIPA HBAC rule ========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ipa_hbacrule`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Add, modify or delete an IPA HBAC rule using IPA API. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **cn** string / required | | Canonical name. Can not be changed as it is the unique identifier. aliases: name | | **description** string | | Description | | **host** list / elements=string | | List of host names to assign. If an empty list is passed all hosts will be removed from the rule. If option is omitted hosts will not be checked or changed. | | **hostcategory** string | **Choices:*** all | Host category | | **hostgroup** list / elements=string | | List of hostgroup names to assign. If an empty list is passed all hostgroups will be removed. from the rule If option is omitted hostgroups will not be checked or changed. | | **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_prot** string | **Choices:*** http * **https** ← | Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. | | **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **service** list / elements=string | | List of service names to assign. If an empty list is passed all services will be removed from the rule. If option is omitted services will not be checked or changed. | | **servicecategory** string | **Choices:*** all | Service category | | **servicegroup** list / elements=string | | List of service group names to assign. If an empty list is passed all assigned service groups will be removed from the rule. If option is omitted service groups will not be checked or changed. | | **sourcehost** list / elements=string | | List of source host names to assign. If an empty list if passed all assigned source hosts will be removed from the rule. If option is omitted source hosts will not be checked or changed. | | **sourcehostcategory** string | **Choices:*** all | Source host category | | **sourcehostgroup** list / elements=string | | List of source host group names to assign. If an empty list if passed all assigned source host groups will be removed from the rule. If option is omitted source host groups will not be checked or changed. | | **state** string | **Choices:*** absent * disabled * enabled * **present** ← | State to ensure | | **user** list / elements=string | | List of user names to assign. If an empty list if passed all assigned users will be removed from the rule. If option is omitted users will not be checked or changed. | | **usercategory** string | **Choices:*** all | User category | | **usergroup** list / elements=string | | List of user group names to assign. If an empty list if passed all assigned user groups will be removed from the rule. If option is omitted user groups will not be checked or changed. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | This only applies if `ipa_prot` is *https*. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Ensure rule to allow all users to access any host from any host community.general.ipa_hbacrule: name: allow_all description: Allow all users to access any host from any host hostcategory: all servicecategory: all usercategory: all state: present ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - name: Ensure rule with certain limitations community.general.ipa_hbacrule: name: allow_all_developers_access_to_db description: Allow all developers to access any database from any host hostgroup: - db-server usergroup: - developers state: present ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - name: Ensure rule is absent community.general.ipa_hbacrule: name: rule_to_be_deleted state: absent ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **hbacrule** dictionary | always | HBAC rule as returned by IPA API. | ### Authors * Thomas Krahn (@Nosmoht)
programming_docs
ansible community.general.ipa_dnszone – Manage FreeIPA DNS Zones community.general.ipa\_dnszone – Manage FreeIPA DNS Zones ========================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ipa_dnszone`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Add and delete an IPA DNS Zones using IPA API Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **dynamicupdate** string | **Choices:*** **false** ← * true | Apply dynamic update to zone | | **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_prot** string | **Choices:*** http * **https** ← | Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. | | **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **state** string | **Choices:*** absent * **present** ← | State to ensure | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | This only applies if `ipa_prot` is *https*. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. | | **zone\_name** string / required | | The DNS zone name to which needs to be managed. | Examples -------- ``` - name: Ensure dns zone is present community.general.ipa_dnszone: ipa_host: spider.example.com ipa_pass: Passw0rd! state: present zone_name: example.com - name: Ensure dns zone is present and is dynamic update community.general.ipa_dnszone: ipa_host: spider.example.com ipa_pass: Passw0rd! state: present zone_name: example.com dynamicupdate: true - name: Ensure that dns zone is removed community.general.ipa_dnszone: zone_name: example.com ipa_host: localhost ipa_user: admin ipa_pass: topsecret state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **zone** dictionary | always | DNS zone as returned by IPA API. | ### Authors * Fran Fitzpatrick (@fxfitz) ansible community.general.hwc_vpc_route – Creates a resource of Vpc/Route in Huawei Cloud community.general.hwc\_vpc\_route – Creates a resource of Vpc/Route in Huawei Cloud =================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.hwc_vpc_route`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * vpc route management. Requirements ------------ The below requirements are needed on the host that executes this module. * keystoneauth1 >= 3.6.0 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **destination** string / required | | Specifies the destination IP address or CIDR block. | | **domain** string / required | | The name of the Domain to scope to (Identity v3). (currently only domain names are supported, and not domain IDs). | | **id** string | | The id of resource to be managed. | | **identity\_endpoint** string / required | | The Identity authentication URL. | | **next\_hop** string / required | | Specifies the next hop. The value is VPC peering connection ID. | | **password** string / required | | The password to login with. | | **project** string / required | | The name of the Tenant (Identity v2) or Project (Identity v3). (currently only project names are supported, and not project IDs). | | **region** string | | The region to which the project belongs. | | **state** string | **Choices:*** **present** ← * absent | Whether the given object should exist in Huawei Cloud. | | **type** string | **Default:**"peering" | Specifies the type of route. | | **user** string / required | | The user name to login with (currently only user names are supported, and not user IDs). | | **vpc\_id** string / required | | Specifies the VPC ID to which route is added. | Notes ----- Note * If *id* option is provided, it takes precedence over *destination*, *vpc\_id*, *type* and *next\_hop* for route selection. * *destination*, *vpc\_id*, *type* and *next\_hop* are used for route selection. If more than one route with this options exists, execution is aborted. * No parameter support updating. If one of option is changed, the module will create a new resource. * For authentication, you can set identity\_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT` env variable. * For authentication, you can set user using the `ANSIBLE_HWC_USER` env variable. * For authentication, you can set password using the `ANSIBLE_HWC_PASSWORD` env variable. * For authentication, you can set domain using the `ANSIBLE_HWC_DOMAIN` env variable. * For authentication, you can set project using the `ANSIBLE_HWC_PROJECT` env variable. * For authentication, you can set region using the `ANSIBLE_HWC_REGION` env variable. * Environment variables values will only be used if the playbook values are not set. Examples -------- ``` # create a peering connect - name: Create a local vpc hwc_network_vpc: cidr: "192.168.0.0/16" name: "ansible_network_vpc_test_local" register: vpc1 - name: Create a peering vpc hwc_network_vpc: cidr: "192.168.0.0/16" name: "ansible_network_vpc_test_peering" register: vpc2 - name: Create a peering connect hwc_vpc_peering_connect: local_vpc_id: "{{ vpc1.id }}" name: "ansible_network_peering_test" filters: - "name" peering_vpc: vpc_id: "{{ vpc2.id }}" register: connect - name: Create a route community.general.hwc_vpc_route: vpc_id: "{{ vpc1.id }}" destination: "192.168.0.0/16" next_hop: "{{ connect.id }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **destination** string | success | Specifies the destination IP address or CIDR block. | | **id** string | success | UUID of the route. | | **next\_hop** string | success | Specifies the next hop. The value is VPC peering connection ID. | | **type** string | success | Specifies the type of route. | | **vpc\_id** string | success | Specifies the VPC ID to which route is added. | ### Authors * Huawei Inc. (@huaweicloud) ansible community.general.yarn – Manage node.js packages with Yarn community.general.yarn – Manage node.js packages with Yarn ========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.yarn`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage node.js packages with the Yarn package manager (<https://yarnpkg.com/>) Requirements ------------ The below requirements are needed on the host that executes this module. * Yarn installed in bin path (typically /usr/local/bin) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **executable** path | | The executable location for yarn. | | **global** boolean | **Choices:*** **no** ← * yes | Install the node.js library globally | | **ignore\_scripts** boolean | **Choices:*** **no** ← * yes | Use the --ignore-scripts flag when installing. | | **name** string | | The name of a node.js library to install If omitted all packages in package.json are installed. To globally install from local node.js library. Prepend "file:" to the path of the node.js library. | | **path** path | | The base path where Node.js libraries will be installed. This is where the node\_modules folder lives. | | **production** boolean | **Choices:*** **no** ← * yes | Install dependencies in production mode. Yarn will ignore any dependencies under devDependencies in package.json | | **registry** string | | The registry to install modules from. | | **state** string | **Choices:*** **present** ← * absent * latest | Installation state of the named node.js library If absent is selected, a name option must be provided | | **version** string | | The version of the library to be installed. Must be in semver format. If "latest" is desired, use "state" arg instead | Examples -------- ``` - name: Install "imagemin" node.js package. community.general.yarn: name: imagemin path: /app/location - name: Install "imagemin" node.js package on version 5.3.1 community.general.yarn: name: imagemin version: '5.3.1' path: /app/location - name: Install "imagemin" node.js package globally. community.general.yarn: name: imagemin global: yes - name: Remove the globally-installed package "imagemin". community.general.yarn: name: imagemin global: yes state: absent - name: Install "imagemin" node.js package from custom registry. community.general.yarn: name: imagemin registry: 'http://registry.mysite.com' - name: Install packages based on package.json. community.general.yarn: path: /app/location - name: Update all packages in package.json to their latest version. community.general.yarn: path: /app/location state: latest ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **changed** boolean | always | Whether Yarn changed any package data **Sample:** True | | **invocation** dictionary | success | Parameters and values used during execution **Sample:** {'module\_args': {'executable': None, 'globally': False, 'ignore\_scripts': False, 'name': None, 'path': '/some/path/folder', 'production': False, 'registry': None, 'state': 'present', 'version': None}} | | **msg** string | failure | Provides an error message if Yarn syntax was incorrect **Sample:** Package must be explicitly named when uninstalling. | | **out** string | always | Output generated from Yarn with emojis removed. **Sample:** yarn add v0.16.1[1/4] Resolving packages...[2/4] Fetching packages...[3/4] Linking dependencies...[4/4] Building fresh packages...success Saved lockfile.success Saved 1 new [email protected] Done in 0.59s. | ### Authors * David Gunter (@verkaufer) * Chris Hoffman (@chrishoffman), creator of NPM Ansible module) ansible community.general.clc_aa_policy – Create or Delete Anti Affinity Policies at CenturyLink Cloud. community.general.clc\_aa\_policy – Create or Delete Anti Affinity Policies at CenturyLink Cloud. ================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.clc_aa_policy`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * An Ansible module to Create or Delete Anti Affinity Policies at CenturyLink Cloud. Requirements ------------ The below requirements are needed on the host that executes this module. * python = 2.7 * requests >= 2.5.0 * clc-sdk Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **location** string / required | | Datacenter in which the policy lives/should live. | | **name** string / required | | The name of the Anti Affinity Policy. | | **state** string | **Choices:*** **present** ← * absent | Whether to create or delete the policy. | Notes ----- Note * To use this module, it is required to set the below environment variables which enables access to the Centurylink Cloud - CLC\_V2\_API\_USERNAME, the account login id for the centurylink cloud - CLC\_V2\_API\_PASSWORD, the account password for the centurylink cloud * Alternatively, the module accepts the API token and account alias. The API token can be generated using the CLC account login and password via the HTTP api call @ <https://api.ctl.io/v2/authentication/login> - CLC\_V2\_API\_TOKEN, the API token generated from <https://api.ctl.io/v2/authentication/login> - CLC\_ACCT\_ALIAS, the account alias associated with the centurylink cloud * Users can set CLC\_V2\_API\_URL to specify an endpoint for pointing to a different CLC environment. Examples -------- ``` # Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples --- - name: Create AA Policy hosts: localhost gather_facts: False connection: local tasks: - name: Create an Anti Affinity Policy community.general.clc_aa_policy: name: Hammer Time location: UK3 state: present register: policy - name: Debug ansible.builtin.debug: var: policy - name: Delete AA Policy hosts: localhost gather_facts: False connection: local tasks: - name: Delete an Anti Affinity Policy community.general.clc_aa_policy: name: Hammer Time location: UK3 state: absent register: policy - name: Debug ansible.builtin.debug: var: policy ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **policy** dictionary | success | The anti affinity policy information **Sample:** {'id': '1a28dd0988984d87b9cd61fa8da15424', 'links': [{'href': '/v2/antiAffinityPolicies/wfad/1a28dd0988984d87b9cd61fa8da15424', 'rel': 'self', 'verbs': ['GET', 'DELETE', 'PUT']}, {'href': '/v2/datacenters/wfad/UC1', 'id': 'uc1', 'name': 'UC1 - US West (Santa Clara)', 'rel': 'location'}], 'location': 'UC1', 'name': 'test\_aa\_policy'} | ### Authors * CLC Runner (@clc-runner) ansible community.general.hwc_vpc_private_ip – Creates a resource of Vpc/PrivateIP in Huawei Cloud community.general.hwc\_vpc\_private\_ip – Creates a resource of Vpc/PrivateIP in Huawei Cloud ============================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.hwc_vpc_private_ip`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * vpc private ip management. Requirements ------------ The below requirements are needed on the host that executes this module. * keystoneauth1 >= 3.6.0 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **domain** string / required | | The name of the Domain to scope to (Identity v3). (currently only domain names are supported, and not domain IDs). | | **id** string | | The id of resource to be managed. | | **identity\_endpoint** string / required | | The Identity authentication URL. | | **ip\_address** string | | Specifies the target IP address. The value can be an available IP address in the subnet. If it is not specified, the system automatically assigns an IP address. Cannot be changed after creating the private ip. | | **password** string / required | | The password to login with. | | **project** string / required | | The name of the Tenant (Identity v2) or Project (Identity v3). (currently only project names are supported, and not project IDs). | | **region** string | | The region to which the project belongs. | | **state** string | **Choices:*** **present** ← * absent | Whether the given object should exist in Huawei Cloud. | | **subnet\_id** string / required | | Specifies the ID of the subnet from which IP addresses are assigned. Cannot be changed after creating the private ip. | | **user** string / required | | The user name to login with (currently only user names are supported, and not user IDs). | Notes ----- Note * If *id* option is provided, it takes precedence over *subnet\_id*, *ip\_address* for private ip selection. * *subnet\_id*, *ip\_address* are used for private ip selection. If more than one private ip with this options exists, execution is aborted. * No parameter support updating. If one of option is changed, the module will create a new resource. * For authentication, you can set identity\_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT` env variable. * For authentication, you can set user using the `ANSIBLE_HWC_USER` env variable. * For authentication, you can set password using the `ANSIBLE_HWC_PASSWORD` env variable. * For authentication, you can set domain using the `ANSIBLE_HWC_DOMAIN` env variable. * For authentication, you can set project using the `ANSIBLE_HWC_PROJECT` env variable. * For authentication, you can set region using the `ANSIBLE_HWC_REGION` env variable. * Environment variables values will only be used if the playbook values are not set. Examples -------- ``` # create a private ip - name: Create vpc hwc_network_vpc: cidr: "192.168.100.0/24" name: "ansible_network_vpc_test" register: vpc - name: Create subnet hwc_vpc_subnet: gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" dhcp_enable: True vpc_id: "{{ vpc.id }}" cidr: "192.168.100.0/26" register: subnet - name: Create a private ip community.general.hwc_vpc_private_ip: subnet_id: "{{ subnet.id }}" ip_address: "192.168.100.33" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **ip\_address** string | success | Specifies the target IP address. The value can be an available IP address in the subnet. If it is not specified, the system automatically assigns an IP address. | | **subnet\_id** string | success | Specifies the ID of the subnet from which IP addresses are assigned. | ### Authors * Huawei Inc. (@huaweicloud)
programming_docs
ansible community.general.qubes – Interact with an existing QubesOS AppVM community.general.qubes – Interact with an existing QubesOS AppVM ================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.qubes`. * [Synopsis](#synopsis) * [Parameters](#parameters) Synopsis -------- * Run commands or put/fetch files to an existing Qubes AppVM using qubes tools. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **remote\_addr** string | **Default:**"inventory\_hostname" | var: ansible\_host | vm name | | **remote\_user** string | **Default:**"The \*user\* account as default in Qubes OS." | var: ansible\_user | The user to execute as inside the vm. | ### Authors * Kushal Das (@kushaldas) ansible community.general.lxd – Returns Ansible inventory from lxd host community.general.lxd – Returns Ansible inventory from lxd host =============================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.lxd`. New in version 3.0.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Get inventory from the lxd. * Uses a YAML configuration file that ends with ‘lxd.(yml|yaml)’. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **client\_cert** path | **Default:**"$HOME/.config/lxc/client.crt" | | The client certificate file path. aliases: cert\_file | | **client\_key** path | **Default:**"$HOME/.config/lxc/client.key" | | The client certificate key file path. aliases: key\_file | | **groupby** dictionary | | | Create groups by the following keywords `location`, `pattern`, `network_range`, `os`, `release`, `profile`, `vlanid`. See example for syntax. | | **plugin** string / required | **Choices:*** community.general.lxd | | Token that ensures this is a source file for the 'lxd' plugin. | | **prefered\_container\_network\_family** string | **Choices:*** **inet** ← * inet6 | | If a container has multiple network interfaces, which one is the prefered by family. Specify `inet` for IPv4 and `inet6` for IPv6. | | **prefered\_container\_network\_interface** string | **Default:**"eth" | | If a container has multiple network interfaces, select which one is the prefered as pattern. Combined with the first number that can be found e.g. 'eth' + 0. | | **state** string | **Choices:*** STOPPED * STARTING * RUNNING * **none** ← | | Filter the container according to the current status. | | **trust\_password** string | | | The client trusted password. You need to set this password on the lxd server before running this module using the following command `lxc config set core.trust_password <some random password>` See <https://www.stgraber.org/2016/04/18/lxd-api-direct-interaction/>. If *trust\_password* is set, this module send a request for authentication before sending any requests. | | **url** string | **Default:**"unix:/var/snap/lxd/common/lxd/unix.socket" | | The unix domain socket path or the https URL for the lxd server. Sockets in filesystem have to start with `unix:`. Mostly `unix:/var/lib/lxd/unix.socket` or `unix:/var/snap/lxd/common/lxd/unix.socket`. | Examples -------- ``` # simple lxd.yml plugin: community.general.lxd url: unix:/var/snap/lxd/common/lxd/unix.socket # simple lxd.yml including filter plugin: community.general.lxd url: unix:/var/snap/lxd/common/lxd/unix.socket state: RUNNING # grouping lxd.yml groupby: testpattern: type: pattern attribute: test vlan666: type: vlanid attribute: 666 locationBerlin: type: location attribute: Berlin osUbuntu: type: os attribute: ubuntu releaseFocal: type: release attribute: focal releaseBionic: type: release attribute: bionic profileDefault: type: profile attribute: default profileX11: type: profile attribute: x11 netRangeIPv4: type: network_range attribute: 10.98.143.0/24 netRangeIPv6: type: network_range attribute: fd42:bd00:7b11:2167:216:3eff::/24 ``` ### Authors * Frank Dornheim (@conloos) ansible community.general.nexmo – Send a SMS via nexmo community.general.nexmo – Send a SMS via nexmo ============================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nexmo`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Send a SMS message via nexmo Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string / required | | Nexmo API Key | | **api\_secret** string / required | | Nexmo API Secret | | **client\_cert** path | | PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, `client_key` is not required. | | **client\_key** path | | PEM formatted file that contains your private key to be used for SSL client authentication. If `client_cert` contains both the certificate and key, this option is not required. | | **dest** list / elements=integer / required | | Phone number(s) to send SMS message to | | **force** boolean | **Choices:*** **no** ← * yes | If `yes` do not get a cached copy. Alias `thirsty` has been deprecated and will be removed in 2.13. aliases: thirsty | | **force\_basic\_auth** boolean | **Choices:*** **no** ← * yes | Credentials specified with *url\_username* and *url\_password* should be passed in HTTP Header. | | **http\_agent** string | **Default:**"ansible-httpget" | Header to identify as, generally appears in web server logs. | | **msg** string / required | | Message to text to send. Messages longer than 160 characters will be split into multiple messages | | **src** integer / required | | Nexmo Number to send from | | **url** string | | HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path | | **url\_password** string | | The password for use in HTTP basic authentication. If the *url\_username* parameter is not specified, the *url\_password* parameter will not be used. | | **url\_username** string | | The username for use in HTTP basic authentication. This parameter can be used without *url\_password* for sites that allow empty passwords | | **use\_gssapi** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** ← * yes | Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication. Requires the Python library [gssapi](https://github.com/pythongssapi/python-gssapi) to be installed. Credentials for GSSAPI can be specified with *url\_username*/*url\_password* or with the GSSAPI env var `KRB5CCNAME` that specified a custom Kerberos credential cache. NTLM authentication is `not` supported even if the GSSAPI mech for NTLM has been installed. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Send notification message via Nexmo community.general.nexmo: api_key: 640c8a53 api_secret: 0ce239a6 src: 12345678901 dest: - 10987654321 - 16789012345 msg: '{{ inventory_hostname }} completed' delegate_to: localhost ``` ### Authors * Matt Martz (@sivel) ansible community.general.layman – Manage Gentoo overlays community.general.layman – Manage Gentoo overlays ================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.layman`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Uses Layman to manage an additional repositories for the Portage package manager on Gentoo Linux. Please note that Layman must be installed on a managed node prior using this module. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * layman python module Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **list\_url** string | | An URL of the alternative overlays list that defines the overlay to install. This list will be fetched and saved under `${overlay_defs}`/${name}.xml), where `overlay_defs` is readed from the Layman's configuration. aliases: url | | **name** string / required | | The overlay id to install, synchronize, or uninstall. Use 'ALL' to sync all of the installed overlays (can be used only when `state=updated`). | | **state** string | **Choices:*** **present** ← * absent * updated | Whether to install (`present`), sync (`updated`), or uninstall (`absent`) the overlay. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only be set to `no` when no other option exists. Prior to 1.9.3 the code defaulted to `no`. | Examples -------- ``` - name: Install the overlay mozilla which is on the central overlays list community.general.layman: name: mozilla - name: Install the overlay cvut from the specified alternative list community.general.layman: name: cvut list_url: 'http://raw.github.com/cvut/gentoo-overlay/master/overlay.xml' - name: Update (sync) the overlay cvut or install if not installed yet community.general.layman: name: cvut list_url: 'http://raw.github.com/cvut/gentoo-overlay/master/overlay.xml' state: updated - name: Update (sync) all of the installed overlays community.general.layman: name: ALL state: updated - name: Uninstall the overlay cvut community.general.layman: name: cvut state: absent ``` ### Authors * Jakub Jirutka (@jirutka) ansible community.general.logstash – Sends events to Logstash community.general.logstash – Sends events to Logstash ===================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.logstash`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This callback will report facts and task events to Logstash <https://www.elastic.co/products/logstash> Requirements ------------ The below requirements are needed on the local controller node that executes this callback. * whitelisting in configuration * logstash (python library) Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **format\_version** string added in 2.0.0 of community.general | **Choices:*** **v1** ← * v2 | ini entries: [callback\_logstash]format\_version = v1 env:LOGSTASH\_FORMAT\_VERSION | Logging format | | **port** string | **Default:**5000 | ini entries: [callback\_logstash]port = 5000 added in 1.0.0 of community.general env:LOGSTASH\_PORT | Port on which logstash is listening | | **pre\_command** string added in 2.0.0 of community.general | | ini entries: [callback\_logstash]pre\_command = None env:LOGSTASH\_PRE\_COMMAND | Executes command before run and result put to ansible\_pre\_command\_output field. | | **server** string | **Default:**"localhost" | ini entries: [callback\_logstash]server = localhost added in 1.0.0 of community.general env:LOGSTASH\_SERVER | Address of the Logstash server | | **type** string | **Default:**"ansible" | ini entries: [callback\_logstash]type = ansible added in 1.0.0 of community.general env:LOGSTASH\_TYPE | Message type | Examples -------- ``` ansible.cfg: | # Enable Callback plugin [defaults] callback_whitelist = community.general.logstash [callback_logstash] server = logstash.example.com port = 5000 pre_command = git rev-parse HEAD type = ansible 11-input-tcp.conf: | # Enable Logstash TCP Input input { tcp { port => 5000 codec => json add_field => { "[@metadata][beat]" => "notify" } add_field => { "[@metadata][type]" => "ansible" } } } ``` ### Authors * Yevhen Khmelenko (@ujenmr) ansible community.general.packet_ip_subnet – Assign IP subnet to a bare metal server. community.general.packet\_ip\_subnet – Assign IP subnet to a bare metal server. =============================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.packet_ip_subnet`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Assign or unassign IPv4 or IPv6 subnets to or from a device in the Packet host. * IPv4 subnets must come from already reserved block. * IPv6 subnets must come from publicly routable /56 block from your project. * See <https://support.packet.com/kb/articles/elastic-ips> for more info on IP block reservation. Requirements ------------ The below requirements are needed on the host that executes this module. * packet-python >= 1.35 * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auth\_token** string | | Packet API token. You can also supply it in env var `PACKET_API_TOKEN`. | | **cidr** string / required | | IPv4 or IPv6 subnet which you want to manage. It must come from a reserved block for your project in the Packet Host. aliases: name | | **device\_count** integer | **Default:**100 | The number of devices to retrieve from the project. The max allowed value is 1000. See <https://www.packet.com/developers/api/#retrieve-all-devices-of-a-project> for more info. | | **device\_id** string | | UUID of a device to/from which to assign/remove a subnet. | | **hostname** string | | A hostname of a device to/from which to assign/remove a subnet. | | **project\_id** string | | UUID of a project of the device to/from which to assign/remove a subnet. | | **state** string | **Choices:*** **present** ← * absent | Desired state of the IP subnet on the specified device. With state == `present`, you must specify either hostname or device\_id. Subnet with given CIDR will then be assigned to the specified device. With state == `absent`, you can specify either hostname or device\_id. The subnet will be removed from specified devices. If you leave both hostname and device\_id empty, the subnet will be removed from any device it's assigned to. | Examples -------- ``` # All the examples assume that you have your Packet API token in env var PACKET_API_TOKEN. # You can also pass it to the auth_token parameter of the module instead. - name: Create 1 device and assign an arbitrary public IPv4 subnet to it hosts: localhost tasks: - packet_device: project_id: 89b497ee-5afc-420a-8fb5-56984898f4df hostnames: myserver operating_system: ubuntu_16_04 plan: baremetal_0 facility: sjc1 state: active # Pick an IPv4 address from a block allocated to your project. - community.general.packet_ip_subnet: project_id: 89b497ee-5afc-420a-8fb5-56984898f4df hostname: myserver cidr: "147.75.201.78/32" # Release IP address 147.75.201.78 - name: Unassign IP address from any device in your project hosts: localhost tasks: - community.general.packet_ip_subnet: project_id: 89b497ee-5afc-420a-8fb5-56984898f4df cidr: "147.75.201.78/32" state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **changed** boolean | success | True if an IP address assignments were altered in any way (created or removed). **Sample:** True | | **device\_id** string | success | UUID of the device associated with the specified IP address. | | **subnet** dictionary | success | Dict with data about the handled IP subnet. **Sample:** {'address': '147.75.90.241', 'address\_family': 4, 'assigned\_to': {'href': '/devices/61f9aa5e-0530-47f5-97c2-113828e61ed0'}, 'cidr': 31, 'created\_at': '2017-08-07T15:15:30Z', 'enabled': True, 'gateway': '147.75.90.240', 'href': '/ips/31eda960-0a16-4c0f-b196-f3dc4928529f', 'id': '1eda960-0a16-4c0f-b196-f3dc4928529f', 'manageable': True, 'management': True, 'netmask': '255.255.255.254', 'network': '147.75.90.240', 'public': True} | ### Authors * Tomas Karasek (@t0mk) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#f4809b99d2d7c0c2cf809bd2d7c0c2cf809c91d2d7c0c2cf9fd2d7c7c3cfd2d7c1c6cfd2d7c0cccf9399959d98d2d7c0c2cf979b99)> * Nurfet Becirevic (@nurfet-becirevic) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#c2acb7b0a4a7b6e4e1f6f4f9a0a7a1abb0a7b4aba1e4e1f1f5f9e4e1f7f0f9e4e1f6faf9a5afa3abaee4e1f6f4f9a1adaf)> ansible community.general.librato_annotation – create an annotation in librato community.general.librato\_annotation – create an annotation in librato ======================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.librato_annotation`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Create an annotation event on the given annotation stream :name. If the annotation stream does not exist, it will be created automatically Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string / required | | Librato account api key | | **description** string | | The description contains extra metadata about a particular annotation The description should contain specifics on the individual annotation e.g. Deployed 9b562b2 shipped new feature foo! | | **end\_time** integer | | The unix timestamp indicating the time at which the event referenced by this annotation ended For events that have a duration, this is a useful way to annotate the duration of the event | | **links** list / elements=dictionary | | See examples | | **name** string | | The annotation stream name If the annotation stream does not exist, it will be created automatically | | **source** string | | A string which describes the originating source of an annotation when that annotation is tracked across multiple members of a population | | **start\_time** integer | | The unix timestamp indicating the time at which the event referenced by this annotation started | | **title** string / required | | The title of an annotation is a string and may contain spaces The title should be a short, high-level summary of the annotation e.g. v45 Deployment | | **user** string / required | | Librato account username | Examples -------- ``` - name: Create a simple annotation event with a source community.general.librato_annotation: user: [email protected] api_key: XXXXXXXXXXXXXXXXX title: App Config Change source: foo.bar description: This is a detailed description of the config change - name: Create an annotation that includes a link community.general.librato_annotation: user: [email protected] api_key: XXXXXXXXXXXXXXXXXX name: code.deploy title: app code deploy description: this is a detailed description of a deployment links: - rel: example href: http://www.example.com/deploy - name: Create an annotation with a start_time and end_time community.general.librato_annotation: user: [email protected] api_key: XXXXXXXXXXXXXXXXXX name: maintenance title: Maintenance window description: This is a detailed description of maintenance start_time: 1395940006 end_time: 1395954406 ``` ### Authors * Seth Edwards (@Sedward)
programming_docs
ansible community.general.portinstall – Installing packages from FreeBSD’s ports system community.general.portinstall – Installing packages from FreeBSD’s ports system =============================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.portinstall`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manage packages for FreeBSD using ‘portinstall’. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **name** string / required | | name of package to install/remove aliases: pkg | | **state** string | **Choices:*** **present** ← * absent | state of the package | | **use\_packages** boolean | **Choices:*** no * **yes** ← | use packages instead of ports whenever available | Examples -------- ``` - name: Install package foo community.general.portinstall: name: foo state: present - name: Install package security/cyrus-sasl2-saslauthd community.general.portinstall: name: security/cyrus-sasl2-saslauthd state: present - name: Remove packages foo and bar community.general.portinstall: name: foo,bar state: absent ``` ### Authors * berenddeboer (@berenddeboer) ansible community.general.ldap_entry – Add or remove LDAP entries. community.general.ldap\_entry – Add or remove LDAP entries. =========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ldap_entry`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Add or remove LDAP entries. This module only asserts the existence or non-existence of an LDAP entry, not its attributes. To assert the attribute values of an entry, see [community.general.ldap\_attrs](ldap_attrs_module#ansible-collections-community-general-ldap-attrs-module). Requirements ------------ The below requirements are needed on the host that executes this module. * python-ldap Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **attributes** dictionary | | If *state=present*, attributes necessary to create an entry. Existing entries are never modified. To assert specific attribute values on an existing entry, use [community.general.ldap\_attrs](ldap_attrs_module) module instead. | | **bind\_dn** string | | A DN to bind with. If this is omitted, we'll try a SASL bind with the EXTERNAL mechanism as default. If this is blank, we'll use an anonymous bind. | | **bind\_pw** string | | The password to use with *bind\_dn*. | | **dn** string / required | | The DN of the entry to add or remove. | | **objectClass** list / elements=string | | If *state=present*, value or list of values to use when creating the entry. It can either be a string or an actual list of strings. | | **referrals\_chasing** string added in 2.0.0 of community.general | **Choices:*** disabled * **anonymous** ← | Set the referrals chasing behavior. `anonymous` follow referrals anonymously. This is the default behavior. `disabled` disable referrals chasing. This sets `OPT_REFERRALS` to off. | | **sasl\_class** string added in 2.0.0 of community.general | **Choices:*** **external** ← * gssapi | The class to use for SASL authentication. possible choices are `external`, `gssapi`. | | **server\_uri** string | **Default:**"ldapi:///" | A URI to the LDAP server. The default value lets the underlying LDAP client library look for a UNIX domain socket in its default location. | | **start\_tls** boolean | **Choices:*** **no** ← * yes | If true, we'll use the START\_TLS LDAP extension. | | **state** string | **Choices:*** **present** ← * absent | The target state of the entry. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If set to `no`, SSL certificates will not be validated. This should only be used on sites using self-signed certificates. | Notes ----- Note * The default authentication settings will attempt to use a SASL EXTERNAL bind over a UNIX domain socket. This works well with the default Ubuntu install for example, which includes a cn=peercred,cn=external,cn=auth ACL rule allowing root to modify the server configuration. If you need to use a simple bind to access your server, pass the credentials in *bind\_dn* and *bind\_pw*. Examples -------- ``` - name: Make sure we have a parent entry for users community.general.ldap_entry: dn: ou=users,dc=example,dc=com objectClass: organizationalUnit - name: Make sure we have an admin user community.general.ldap_entry: dn: cn=admin,dc=example,dc=com objectClass: - simpleSecurityObject - organizationalRole attributes: description: An LDAP administrator userPassword: "{SSHA}tabyipcHzhwESzRaGA7oQ/SDoBZQOGND" - name: Get rid of an old entry community.general.ldap_entry: dn: ou=stuff,dc=example,dc=com state: absent server_uri: ldap://localhost/ bind_dn: cn=admin,dc=example,dc=com bind_pw: password # # The same as in the previous example but with the authentication details # stored in the ldap_auth variable: # # ldap_auth: # server_uri: ldap://localhost/ # bind_dn: cn=admin,dc=example,dc=com # bind_pw: password # # In the example below, 'args' is a task keyword, passed at the same level as the module - name: Get rid of an old entry community.general.ldap_entry: dn: ou=stuff,dc=example,dc=com state: absent args: "{{ ldap_auth }}" ``` ### Authors * Jiri Tyr (@jtyr) ansible community.general.smartos_image_info – Get SmartOS image details. community.general.smartos\_image\_info – Get SmartOS image details. =================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.smartos_image_info`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Retrieve information about all installed images on SmartOS. * This module was called `smartos_image_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [community.general.smartos\_image\_info](#ansible-collections-community-general-smartos-image-info-module) module no longer returns `ansible_facts`! Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **filters** string | | Criteria for selecting image. Can be any value from image manifest and 'published\_date', 'published', 'source', 'clones', and 'size'. More information can be found at <https://smartos.org/man/1m/imgadm> under 'imgadm list'. | Examples -------- ``` - name: Return information about all installed images community.general.smartos_image_info: register: result - name: Return all private active Linux images community.general.smartos_image_info: filters: "os=linux state=active public=false" register: result - name: Show, how many clones does every image have community.general.smartos_image_info: register: result - name: Print information ansible.builtin.debug: msg: "{{ result.smartos_images[item]['name'] }}-{{ result.smartos_images[item]['version'] }} has {{ result.smartos_images[item]['clones'] }} VM(s)" with_items: "{{ result.smartos_images.keys() | list }}" - name: Print information ansible.builtin.debug: msg: "{{ smartos_images[item]['name'] }}-{{ smartos_images[item]['version'] }} has {{ smartos_images[item]['clones'] }} VM(s)" with_items: "{{ smartos_images.keys() | list }}" ``` ### Authors * Adam Števko (@xen0l) ansible community.general.bower – Manage bower packages with bower community.general.bower – Manage bower packages with bower ========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.bower`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manage bower packages with bower Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **name** string | | The name of a bower package to install | | **offline** boolean | **Choices:*** **no** ← * yes | Install packages from local cache, if the packages were installed before | | **path** path / required | | The base path where to install the bower packages | | **production** boolean | **Choices:*** **no** ← * yes | Install with --production flag | | **relative\_execpath** path | | Relative path to bower executable from install path | | **state** string | **Choices:*** **present** ← * absent * latest | The state of the bower package | | **version** string | | The version to be installed | Examples -------- ``` - name: Install "bootstrap" bower package. community.general.bower: name: bootstrap - name: Install "bootstrap" bower package on version 3.1.1. community.general.bower: name: bootstrap version: '3.1.1' - name: Remove the "bootstrap" bower package. community.general.bower: name: bootstrap state: absent - name: Install packages based on bower.json. community.general.bower: path: /app/location - name: Update packages based on bower.json to their latest version. community.general.bower: path: /app/location state: latest # install bower locally and run from there - npm: path: /app/location name: bower global: no - community.general.bower: path: /app/location relative_execpath: node_modules/.bin ``` ### Authors * Michael Warkentin (@mwarkentin) ansible community.general.rundeck_job_executions_info – Query executions for a Rundeck job community.general.rundeck\_job\_executions\_info – Query executions for a Rundeck job ===================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rundeck_job_executions_info`. New in version 3.8.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module gets the list of executions for a specified Rundeck job. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_token** string / required | | Rundeck User API Token. | | **api\_version** integer | **Default:**39 | Rundeck API version to be used. API version must be at least 14. | | **client\_cert** path | | PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, `client_key` is not required. | | **client\_key** path | | PEM formatted file that contains your private key to be used for SSL client authentication. If `client_cert` contains both the certificate and key, this option is not required. | | **force** boolean | **Choices:*** **no** ← * yes | If `yes` do not get a cached copy. Alias `thirsty` has been deprecated and will be removed in 2.13. aliases: thirsty | | **force\_basic\_auth** boolean | **Choices:*** **no** ← * yes | Credentials specified with *url\_username* and *url\_password* should be passed in HTTP Header. | | **http\_agent** string | **Default:**"ansible-httpget" | Header to identify as, generally appears in web server logs. | | **job\_id** string / required | | The job unique ID. | | **max** integer | **Default:**20 | Max results to return. | | **offset** integer | **Default:**0 | The start point to return the results. | | **status** string | **Choices:*** succeeded * failed * aborted * running | The job status to filter. | | **url** string / required | | Rundeck instance URL. | | **url\_password** string | | The password for use in HTTP basic authentication. If the *url\_username* parameter is not specified, the *url\_password* parameter will not be used. | | **url\_username** string | | The username for use in HTTP basic authentication. This parameter can be used without *url\_password* for sites that allow empty passwords | | **use\_gssapi** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** ← * yes | Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication. Requires the Python library [gssapi](https://github.com/pythongssapi/python-gssapi) to be installed. Credentials for GSSAPI can be specified with *url\_username*/*url\_password* or with the GSSAPI env var `KRB5CCNAME` that specified a custom Kerberos credential cache. NTLM authentication is `not` supported even if the GSSAPI mech for NTLM has been installed. | | **use\_proxy** boolean | **Choices:*** no * **yes** ← | If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Get Rundeck job executions info community.general.rundeck_job_executions_info: url: "https://rundeck.example.org" api_version: 39 api_token: "mytoken" job_id: "xxxxxxxxxxxxxxxxx" register: rundeck_job_executions_info - name: Show Rundeck job executions info ansible.builtin.debug: var: rundeck_job_executions_info.executions ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **executions** list / elements=dictionary | always | Job executions list. **Sample:** [{'argstring': '-exit\_code 0', 'date-ended': {'date': '2021-10-06T13:05:18Z', 'unixtime': 1633525518386}, 'date-started': {'date': '2021-10-06T13:05:15Z', 'unixtime': 1633525515026}, 'description': 'Plugin[com.batix.rundeck.plugins.AnsiblePlaybookInlineWorkflowStep, nodeStep: false]', 'executionType': 'user', 'href': 'https://rundeck.example.org/api/39/execution/1', 'id': 1, 'job': {'averageDuration': 6381, 'description': '', 'group': '', 'href': 'https://rundeck.example.org/api/39/job/697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a', 'id': '697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a', 'name': 'Test', 'options': {'exit\_code': '0'}, 'permalink': 'https://rundeck.example.org/project/myproject/job/show/697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a', 'project': 'myproject'}, 'permalink': 'https://rundeck.example.org/project/myproject/execution/show/1', 'project': 'myproject', 'serverUUID': '5b9a1438-fa3a-457e-b254-8f3d70338068', 'status': 'succeeded', 'user': 'admin'}] | | **paging** dictionary | success | Results pagination info. **Sample:** {'count': 20, 'max': 20, 'offset': 0, 'total': 100} | | | **count** integer | success | Number of results in the response. | | | **max** integer | success | Maximum number of results per page. | | | **offset** integer | success | Offset from first of all results. | | | **total** integer | success | Total number of results. | ### Authors * Phillipe Smith (@phsmith) ansible community.general.pacemaker_cluster – Manage pacemaker clusters community.general.pacemaker\_cluster – Manage pacemaker clusters ================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pacemaker_cluster`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module can manage a pacemaker cluster and nodes from Ansible using the pacemaker cli. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **force** boolean | **Choices:*** no * **yes** ← | Force the change of the cluster state | | **node** string | | Specify which node of the cluster you want to manage. None == the cluster status itself, 'all' == check the status of all nodes. | | **state** string | **Choices:*** cleanup * offline * online * restart | Indicate desired state of the cluster | | **timeout** integer | **Default:**300 | Timeout when the module should considered that the action has failed | Examples -------- ``` --- - name: Set cluster Online hosts: localhost gather_facts: no tasks: - name: Get cluster state community.general.pacemaker_cluster: state: online ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **changed** boolean | always | True if the cluster state has changed | | **out** string | always | The output of the current state of the cluster. It return a list of the nodes state. **Sample:** out: [[" overcloud-controller-0", " Online"]]} | | **rc** boolean | always | exit code of the module | ### Authors * Mathieu Bultel (@matbu) ansible community.general.gitlab_hook – Manages GitLab project hooks. community.general.gitlab\_hook – Manages GitLab project hooks. ============================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.gitlab_hook`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Adds, updates and removes project hook Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * python-gitlab python module Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_password** string | | The password to use for authentication against the API | | **api\_token** string | | GitLab token for logging in. | | **api\_url** string | | The resolvable endpoint for the API | | **api\_username** string | | The username to use for authentication against the API | | **hook\_url** string / required | | The url that you want GitLab to post to, this is used as the primary key for updates and deletion. | | **hook\_validate\_certs** boolean | **Choices:*** **no** ← * yes | Whether GitLab will do SSL verification when triggering the hook. aliases: enable\_ssl\_verification | | **issues\_events** boolean | **Choices:*** **no** ← * yes | Trigger hook on issues events. | | **job\_events** boolean | **Choices:*** **no** ← * yes | Trigger hook on job events. | | **merge\_requests\_events** boolean | **Choices:*** **no** ← * yes | Trigger hook on merge requests events. | | **note\_events** boolean | **Choices:*** **no** ← * yes | Trigger hook on note events or when someone adds a comment. | | **pipeline\_events** boolean | **Choices:*** **no** ← * yes | Trigger hook on pipeline events. | | **project** string / required | | Id or Full path of the project in the form of group/name. | | **push\_events** boolean | **Choices:*** no * **yes** ← | Trigger hook on push events. | | **push\_events\_branch\_filter** string added in 0.2.0 of community.general | | Branch name of wildcard to trigger hook on push events | | **state** string | **Choices:*** **present** ← * absent | When `present` the hook will be updated to match the input or created if it doesn't exist. When `absent` hook will be deleted if it exists. | | **tag\_push\_events** boolean | **Choices:*** **no** ← * yes | Trigger hook on tag push events. | | **token** string | | Secret token to validate hook messages at the receiver. If this is present it will always result in a change as it cannot be retrieved from GitLab. Will show up in the X-GitLab-Token HTTP request header. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether or not to validate SSL certs when supplying a https endpoint. | | **wiki\_page\_events** boolean | **Choices:*** **no** ← * yes | Trigger hook on wiki events. | Examples -------- ``` - name: "Adding a project hook" community.general.gitlab_hook: api_url: https://gitlab.example.com/ api_token: "{{ access_token }}" project: "my_group/my_project" hook_url: "https://my-ci-server.example.com/gitlab-hook" state: present push_events: yes tag_push_events: yes hook_validate_certs: no token: "my-super-secret-token-that-my-ci-server-will-check" - name: "Delete the previous hook" community.general.gitlab_hook: api_url: https://gitlab.example.com/ api_token: "{{ access_token }}" project: "my_group/my_project" hook_url: "https://my-ci-server.example.com/gitlab-hook" state: absent - name: "Delete a hook by numeric project id" community.general.gitlab_hook: api_url: https://gitlab.example.com/ api_token: "{{ access_token }}" project: 10 hook_url: "https://my-ci-server.example.com/gitlab-hook" state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **error** string | failed | the error message returned by the GitLab API **Sample:** 400: path is already in use | | **hook** dictionary | always | API object | | **msg** string | always | Success or failure message **Sample:** Success | | **result** dictionary | always | json parsed response from the server | ### Authors * Marcus Watkins (@marwatk) * Guillaume Martinez (@Lunik)
programming_docs
ansible community.general.pids – Retrieves process IDs list if the process is running otherwise return empty list community.general.pids – Retrieves process IDs list if the process is running otherwise return empty list ========================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pids`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Retrieves a list of PIDs of given process name in Ansible controller/controlled machines.Returns an empty list if no process in that name exists. Requirements ------------ The below requirements are needed on the host that executes this module. * psutil(python module) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ignore\_case** boolean added in 3.0.0 of community.general | **Choices:*** **no** ← * yes | Ignore case in pattern if using the *pattern* option. | | **name** string | | The name of the process(es) you want to get PID(s) for. | | **pattern** string added in 3.0.0 of community.general | | The pattern (regular expression) to match the process(es) you want to get PID(s) for. | Examples -------- ``` # Pass the process name - name: Getting process IDs of the process community.general.pids: name: python register: pids_of_python - name: Printing the process IDs obtained ansible.builtin.debug: msg: "PIDS of python:{{pids_of_python.pids|join(',')}}" - name: Getting process IDs of processes matching pattern community.general.pids: pattern: python(2(\.7)?|3(\.6)?)?\s+myapp\.py register: myapp_pids ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **pids** list / elements=string | list of none, one, or more process IDs | Process IDs of the given process **Sample:** [100, 200] | ### Authors * Saranya Sridharan (@saranyasridharan) ansible community.general.rax_mon_notification_plan – Create or delete a Rackspace Cloud Monitoring notification plan. community.general.rax\_mon\_notification\_plan – Create or delete a Rackspace Cloud Monitoring notification plan. ================================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rax_mon_notification_plan`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Create or delete a Rackspace Cloud Monitoring notification plan by associating existing rax\_mon\_notifications with severity levels. Rackspace monitoring module flow | rax\_mon\_entity -> rax\_mon\_check -> rax\_mon\_notification -> *rax\_mon\_notification\_plan* -> rax\_mon\_alarm Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * pyrax Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string | | Rackspace API key, overrides *credentials*. aliases: password | | **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/> | | **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided. aliases: creds\_file | | **critical\_state** list / elements=string | | Notification list to use when the alarm state is CRITICAL. Must be an array of valid rax\_mon\_notification ids. | | **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. | | **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. | | **label** string / required | | Defines a friendly name for this notification plan. String between 1 and 255 characters long. | | **ok\_state** list / elements=string | | Notification list to use when the alarm state is OK. Must be an array of valid rax\_mon\_notification ids. | | **region** string | | Region to create an instance in. | | **state** string | **Choices:*** **present** ← * absent | Ensure that the notification plan with this `label` exists or does not exist. | | **tenant\_id** string | | The tenant ID used for authentication. | | **tenant\_name** string | | The tenant name used for authentication. | | **username** string | | Rackspace username, overrides *credentials*. | | **validate\_certs** boolean | **Choices:*** no * yes | Whether or not to require SSL validation of API endpoints. aliases: verify\_ssl | | **warning\_state** list / elements=string | | Notification list to use when the alarm state is WARNING. Must be an array of valid rax\_mon\_notification ids. | Notes ----- Note * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) Examples -------- ``` - name: Example notification plan gather_facts: False hosts: local connection: local tasks: - name: Establish who gets called when. community.general.rax_mon_notification_plan: credentials: ~/.rax_pub state: present label: defcon1 critical_state: - "{{ everyone['notification']['id'] }}" warning_state: - "{{ opsfloor['notification']['id'] }}" register: defcon1 ``` ### Authors * Ash Wilson (@smashwilson) ansible community.general.redfish_command – Manages Out-Of-Band controllers using Redfish APIs community.general.redfish\_command – Manages Out-Of-Band controllers using Redfish APIs ======================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.redfish_command`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Builds Redfish URIs locally and sends them to remote OOB controllers to perform an action. * Manages OOB controller ex. reboot, log management. * Manages OOB controller users ex. add, remove, update. * Manages system power ex. on, off, graceful and forced reboot. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **account\_properties** dictionary added in 0.2.0 of community.general | | properties of account service to update | | **auth\_token** string added in 2.3.0 of community.general | | Security token for authentication with OOB controller | | **baseuri** string / required | | Base URI of OOB controller | | **boot\_next** string | | BootNext target when bootdevice is "UefiBootNext" | | **boot\_override\_mode** string added in 3.5.0 of community.general | **Choices:*** Legacy * UEFI | Boot mode when using an override. | | **bootdevice** string | | bootdevice when setting boot configuration | | **category** string / required | | Category to execute on OOB controller | | **command** list / elements=string / required | | List of commands to execute on OOB controller | | **id** string | | ID of account to delete/modify. Can also be used in account creation to work around vendor issues where the ID of the new user is required in the POST request. aliases: account\_id | | **new\_password** string | | New password of account to add/modify aliases: account\_password | | **new\_username** string | | Username of account to add/delete/modify aliases: account\_username | | **password** string | | Password for authentication with OOB controller | | **resource\_id** string added in 0.2.0 of community.general | | The ID of the System, Manager or Chassis to modify | | **roleid** string | | Role of account to add/modify aliases: account\_roleid | | **session\_uri** string added in 2.3.0 of community.general | | URI of the session resource | | **strip\_etag\_quotes** boolean added in 3.7.0 of community.general | **Choices:*** **no** ← * yes | Removes surrounding quotes of etag used in `If-Match` header of `PATCH` requests. Only use this option to resolve bad vendor implementation where `If-Match` only matches the unquoted etag string. | | **timeout** integer | **Default:**10 | Timeout in seconds for URL requests to OOB controller | | **uefi\_target** string | | UEFI target when bootdevice is "UefiTarget" | | **update\_creds** dictionary added in 0.2.0 of community.general | | The credentials for retrieving the update image | | | **password** string | | The password for retrieving the update image | | | **username** string | | The username for retrieving the update image | | **update\_image\_uri** string added in 0.2.0 of community.general | | The URI of the image for the update | | **update\_protocol** string added in 0.2.0 of community.general | | The protocol for the update | | **update\_targets** list / elements=string added in 0.2.0 of community.general | | The list of target resource URIs to apply the update to | | **update\_username** string added in 0.2.0 of community.general | | new update user name for account\_username aliases: account\_updatename | | **username** string | | Username for authentication with OOB controller | | **virtual\_media** dictionary added in 0.2.0 of community.general | | The options for VirtualMedia commands | | | **image\_url** string | | The URL od the image the insert or eject | | | **inserted** boolean | **Choices:*** no * **yes** ← | Indicates if the image is treated as inserted on command completion | | | **media\_types** list / elements=string | | The list of media types appropriate for the image | | | **password** string | | The password for accessing the image URL | | | **transfer\_method** string | | The transfer method to use with the image | | | **transfer\_protocol\_type** string | | The network protocol to use with the image | | | **username** string | | The username for accessing the image URL | | | **write\_protected** boolean | **Choices:*** no * **yes** ← | Indicates if the media is treated as write-protected | Examples -------- ``` - name: Restart system power gracefully community.general.redfish_command: category: Systems command: PowerGracefulRestart resource_id: 437XR1138R2 baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Turn system power off community.general.redfish_command: category: Systems command: PowerForceOff resource_id: 437XR1138R2 - name: Restart system power forcefully community.general.redfish_command: category: Systems command: PowerForceRestart resource_id: 437XR1138R2 - name: Shutdown system power gracefully community.general.redfish_command: category: Systems command: PowerGracefulShutdown resource_id: 437XR1138R2 - name: Turn system power on community.general.redfish_command: category: Systems command: PowerOn resource_id: 437XR1138R2 - name: Reboot system power community.general.redfish_command: category: Systems command: PowerReboot resource_id: 437XR1138R2 - name: Set one-time boot device to {{ bootdevice }} community.general.redfish_command: category: Systems command: SetOneTimeBoot resource_id: 437XR1138R2 bootdevice: "{{ bootdevice }}" baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Set one-time boot device to UefiTarget of "/0x31/0x33/0x01/0x01" community.general.redfish_command: category: Systems command: SetOneTimeBoot resource_id: 437XR1138R2 bootdevice: "UefiTarget" uefi_target: "/0x31/0x33/0x01/0x01" baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Set one-time boot device to BootNext target of "Boot0001" community.general.redfish_command: category: Systems command: SetOneTimeBoot resource_id: 437XR1138R2 bootdevice: "UefiBootNext" boot_next: "Boot0001" baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Set persistent boot device override community.general.redfish_command: category: Systems command: EnableContinuousBootOverride resource_id: 437XR1138R2 bootdevice: "{{ bootdevice }}" baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Set one-time boot to BiosSetup community.general.redfish_command: category: Systems command: SetOneTimeBoot bootnext: BiosSetup boot_override_mode: Legacy baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Disable persistent boot device override community.general.redfish_command: category: Systems command: DisableBootOverride - name: Add user community.general.redfish_command: category: Accounts command: AddUser baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" new_username: "{{ new_username }}" new_password: "{{ new_password }}" roleid: "{{ roleid }}" - name: Add user using new option aliases community.general.redfish_command: category: Accounts command: AddUser baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" account_username: "{{ account_username }}" account_password: "{{ account_password }}" account_roleid: "{{ account_roleid }}" - name: Delete user community.general.redfish_command: category: Accounts command: DeleteUser baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" account_username: "{{ account_username }}" - name: Disable user community.general.redfish_command: category: Accounts command: DisableUser baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" account_username: "{{ account_username }}" - name: Enable user community.general.redfish_command: category: Accounts command: EnableUser baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" account_username: "{{ account_username }}" - name: Add and enable user community.general.redfish_command: category: Accounts command: AddUser,EnableUser baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" new_username: "{{ new_username }}" new_password: "{{ new_password }}" roleid: "{{ roleid }}" - name: Update user password community.general.redfish_command: category: Accounts command: UpdateUserPassword baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" account_username: "{{ account_username }}" account_password: "{{ account_password }}" - name: Update user role community.general.redfish_command: category: Accounts command: UpdateUserRole baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" account_username: "{{ account_username }}" roleid: "{{ roleid }}" - name: Update user name community.general.redfish_command: category: Accounts command: UpdateUserName baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" account_username: "{{ account_username }}" account_updatename: "{{ account_updatename }}" - name: Update user name community.general.redfish_command: category: Accounts command: UpdateUserName baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" account_username: "{{ account_username }}" update_username: "{{ update_username }}" - name: Update AccountService properties community.general.redfish_command: category: Accounts command: UpdateAccountServiceProperties baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" account_properties: AccountLockoutThreshold: 5 AccountLockoutDuration: 600 - name: Clear Manager Logs with a timeout of 20 seconds community.general.redfish_command: category: Manager command: ClearLogs resource_id: BMC baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" timeout: 20 - name: Create session community.general.redfish_command: category: Sessions command: CreateSession baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" register: result - name: Set chassis indicator LED to blink using security token for auth community.general.redfish_command: category: Chassis command: IndicatorLedBlink resource_id: 1U baseuri: "{{ baseuri }}" auth_token: "{{ result.session.token }}" - name: Delete session using security token created by CreateSesssion above community.general.redfish_command: category: Sessions command: DeleteSession baseuri: "{{ baseuri }}" auth_token: "{{ result.session.token }}" session_uri: "{{ result.session.uri }}" - name: Clear Sessions community.general.redfish_command: category: Sessions command: ClearSessions baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Simple update community.general.redfish_command: category: Update command: SimpleUpdate baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" update_image_uri: https://example.com/myupdate.img - name: Simple update with additional options community.general.redfish_command: category: Update command: SimpleUpdate baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" update_image_uri: //example.com/myupdate.img update_protocol: FTP update_targets: - /redfish/v1/UpdateService/FirmwareInventory/BMC update_creds: username: operator password: supersecretpwd - name: Insert Virtual Media community.general.redfish_command: category: Manager command: VirtualMediaInsert baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" virtual_media: image_url: 'http://example.com/images/SomeLinux-current.iso' media_types: - CD - DVD resource_id: BMC - name: Eject Virtual Media community.general.redfish_command: category: Manager command: VirtualMediaEject baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" virtual_media: image_url: 'http://example.com/images/SomeLinux-current.iso' resource_id: BMC - name: Restart manager power gracefully community.general.redfish_command: category: Manager command: GracefulRestart resource_id: BMC baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" - name: Restart manager power gracefully community.general.redfish_command: category: Manager command: PowerGracefulRestart resource_id: BMC - name: Turn manager power off community.general.redfish_command: category: Manager command: PowerForceOff resource_id: BMC - name: Restart manager power forcefully community.general.redfish_command: category: Manager command: PowerForceRestart resource_id: BMC - name: Shutdown manager power gracefully community.general.redfish_command: category: Manager command: PowerGracefulShutdown resource_id: BMC - name: Turn manager power on community.general.redfish_command: category: Manager command: PowerOn resource_id: BMC - name: Reboot manager power community.general.redfish_command: category: Manager command: PowerReboot resource_id: BMC ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **msg** string | always | Message with action result or error description **Sample:** Action was successful | ### Authors * Jose Delarosa (@jose-delarosa)
programming_docs
ansible community.general.lxd_container – Manage LXD Containers community.general.lxd\_container – Manage LXD Containers ======================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.lxd_container`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Management of LXD containers Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **architecture** string | | The architecture for the container (for example `x86_64` or `i686`). See <https://github.com/lxc/lxd/blob/master/doc/rest-api.md#post-1>. | | **client\_cert** path | | The client certificate file path. If not specified, it defaults to `${HOME}/.config/lxc/client.crt`. aliases: cert\_file | | **client\_key** path | | The client certificate key file path. If not specified, it defaults to `${HOME}/.config/lxc/client.key`. aliases: key\_file | | **config** dictionary | | The config for the container (for example `{"limits.cpu": "2"}`). See <https://github.com/lxc/lxd/blob/master/doc/rest-api.md#post-1>. If the container already exists and its "config" values in metadata obtained from GET /1.0/containers/<name> <https://github.com/lxc/lxd/blob/master/doc/rest-api.md#10containersname> are different, this module tries to apply the configurations. The keys starting with `volatile.` are ignored for this comparison when *ignore\_volatile\_options=true*. | | **devices** dictionary | | The devices for the container (for example `{ "rootfs": { "path": "/dev/kvm", "type": "unix-char" }}`). See <https://github.com/lxc/lxd/blob/master/doc/rest-api.md#post-1>. | | **ephemeral** boolean | **Choices:*** no * yes | Whether or not the container is ephemeral (for example `true` or `false`). See <https://github.com/lxc/lxd/blob/master/doc/rest-api.md#post-1>. | | **force\_stop** boolean | **Choices:*** **no** ← * yes | If this is true, the `lxd_container` forces to stop the container when it stops or restarts the container. | | **ignore\_volatile\_options** boolean added in 3.7.0 of community.general | **Choices:*** no * **yes** ← | If set to `true`, options starting with `volatile.` are ignored. As a result, they are reapplied for each execution. This default behavior can be changed by setting this option to `false`. The default value `true` will be deprecated in community.general 4.0.0, and will change to `false` in community.general 5.0.0. | | **name** string / required | | Name of a container. | | **profiles** list / elements=string | | Profile to be used by the container. | | **snap\_url** string | **Default:**"unix:/var/snap/lxd/common/lxd/unix.socket" | The unix domain socket path when LXD is installed by snap package manager. | | **source** dictionary | | The source for the container (e.g. { "type": "image", "mode": "pull", "server": "https://images.linuxcontainers.org", "protocol": "lxd", "alias": "ubuntu/xenial/amd64" }). See <https://github.com/lxc/lxd/blob/master/doc/rest-api.md#post-1> for complete API documentation. Note that `protocol` accepts two choices: `lxd` or `simplestreams`. | | **state** string | **Choices:*** **started** ← * stopped * restarted * absent * frozen | Define the state of a container. | | **target** string added in 1.0.0 of community.general | | For cluster deployments. Will attempt to create a container on a target node. If container exists elsewhere in a cluster, then container will not be replaced or moved. The name should respond to same name of the node you see in `lxc cluster list`. | | **timeout** integer | **Default:**30 | A timeout for changing the state of the container. This is also used as a timeout for waiting until IPv4 addresses are set to the all network interfaces in the container after starting or restarting. | | **trust\_password** string | | The client trusted password. You need to set this password on the LXD server before running this module using the following command: `lxc config set core.trust_password <some random password>`. See <https://www.stgraber.org/2016/04/18/lxd-api-direct-interaction/>. If trust\_password is set, this module send a request for authentication before sending any requests. | | **url** string | **Default:**"unix:/var/lib/lxd/unix.socket" | The unix domain socket path or the https URL for the LXD server. | | **wait\_for\_ipv4\_addresses** boolean | **Choices:*** **no** ← * yes | If this is true, the `lxd_container` waits until IPv4 addresses are set to the all network interfaces in the container after starting or restarting. | Notes ----- Note * Containers must have a unique name. If you attempt to create a container with a name that already existed in the users namespace the module will simply return as “unchanged”. * There are two ways to run commands in containers, using the command module or using the ansible lxd connection plugin bundled in Ansible >= 2.1, the later requires python to be installed in the container which can be done with the command module. * You can copy a file from the host to the container with the Ansible [ansible.builtin.copy](../../ansible/builtin/copy_module#ansible-collections-ansible-builtin-copy-module) and [ansible.builtin.template](../../ansible/builtin/template_module#ansible-collections-ansible-builtin-template-module) module and the `lxd` connection plugin. See the example below. * You can copy a file in the created container to the localhost with `command=lxc file pull container_name/dir/filename filename`. See the first example below. Examples -------- ``` # An example for creating a Ubuntu container and install python - hosts: localhost connection: local tasks: - name: Create a started container community.general.lxd_container: name: mycontainer ignore_volatile_options: true state: started source: type: image mode: pull server: https://images.linuxcontainers.org protocol: lxd # if you get a 404, try setting protocol: simplestreams alias: ubuntu/xenial/amd64 profiles: ["default"] wait_for_ipv4_addresses: true timeout: 600 - name: Check python is installed in container delegate_to: mycontainer ansible.builtin.raw: dpkg -s python register: python_install_check failed_when: python_install_check.rc not in [0, 1] changed_when: false - name: Install python in container delegate_to: mycontainer ansible.builtin.raw: apt-get install -y python when: python_install_check.rc == 1 # An example for creating an Ubuntu 14.04 container using an image fingerprint. # This requires changing 'server' and 'protocol' key values, replacing the # 'alias' key with with 'fingerprint' and supplying an appropriate value that # matches the container image you wish to use. - hosts: localhost connection: local tasks: - name: Create a started container community.general.lxd_container: name: mycontainer ignore_volatile_options: true state: started source: type: image mode: pull # Provides current (and older) Ubuntu images with listed fingerprints server: https://cloud-images.ubuntu.com/releases # Protocol used by 'ubuntu' remote (as shown by 'lxc remote list') protocol: simplestreams # This provides an Ubuntu 14.04 LTS amd64 image from 20150814. fingerprint: e9a8bdfab6dc profiles: ["default"] wait_for_ipv4_addresses: true timeout: 600 # An example for deleting a container - hosts: localhost connection: local tasks: - name: Delete a container community.general.lxd_container: name: mycontainer state: absent # An example for restarting a container - hosts: localhost connection: local tasks: - name: Restart a container community.general.lxd_container: name: mycontainer state: restarted # An example for restarting a container using https to connect to the LXD server - hosts: localhost connection: local tasks: - name: Restart a container community.general.lxd_container: url: https://127.0.0.1:8443 # These client_cert and client_key values are equal to the default values. #client_cert: "{{ lookup('env', 'HOME') }}/.config/lxc/client.crt" #client_key: "{{ lookup('env', 'HOME') }}/.config/lxc/client.key" trust_password: mypassword name: mycontainer state: restarted # Note your container must be in the inventory for the below example. # # [containers] # mycontainer ansible_connection=lxd # - hosts: - mycontainer tasks: - name: Copy /etc/hosts in the created container to localhost with name "mycontainer-hosts" ansible.builtin.fetch: src: /etc/hosts dest: /tmp/mycontainer-hosts flat: true # An example for LXD cluster deployments. This example will create two new container on specific # nodes - 'node01' and 'node02'. In 'target:', 'node01' and 'node02' are names of LXD cluster # members that LXD cluster recognizes, not ansible inventory names, see: 'lxc cluster list'. # LXD API calls can be made to any LXD member, in this example, we send API requests to #'node01.example.com', which matches ansible inventory name. - hosts: node01.example.com tasks: - name: Create LXD container community.general.lxd_container: name: new-container-1 ignore_volatile_options: true state: started source: type: image mode: pull alias: ubuntu/xenial/amd64 target: node01 - name: Create container on another node community.general.lxd_container: name: new-container-2 ignore_volatile_options: true state: started source: type: image mode: pull alias: ubuntu/xenial/amd64 target: node02 ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **actions** list / elements=string | success | List of actions performed for the container. **Sample:** ["create", "start"] | | **addresses** dictionary | when state is started or restarted | Mapping from the network device name to a list of IPv4 addresses in the container **Sample:** {'eth0': ['10.155.92.191']} | | **logs** list / elements=string | when ansible-playbook is invoked with -vvvv. | The logs of requests and responses. **Sample:** (too long to be placed here) | | **old\_state** string | when state is started or restarted | The old state of the container **Sample:** stopped | ### Authors * Hiroaki Nakamura (@hnakamur) ansible community.general.syslog_json – sends JSON events to syslog community.general.syslog\_json – sends JSON events to syslog ============================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.syslog_json`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) Synopsis -------- * This plugin logs ansible-playbook and ansible runs to a syslog server in JSON format * Before 2.9 only environment variables were available for configuration Requirements ------------ The below requirements are needed on the local controller node that executes this callback. * whitelist in configuration Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **facility** string | **Default:**"user" | ini entries: [callback\_syslog\_json]syslog\_facility = user env:SYSLOG\_FACILITY | syslog facility to log as | | **port** string | **Default:**514 | ini entries: [callback\_syslog\_json]syslog\_port = 514 env:SYSLOG\_PORT | port on which the syslog server is listening | | **server** string | **Default:**"localhost" | ini entries: [callback\_syslog\_json]syslog\_server = localhost env:SYSLOG\_SERVER | syslog server that will receive the event | ### Authors * Unknown (!UNKNOWN) ansible community.general.github_issue – View GitHub issue. community.general.github\_issue – View GitHub issue. ==================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.github_issue`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * View GitHub issue for a given repository and organization. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **action** string | **Choices:*** **get\_status** ← | Get various details about issue depending upon action specified. | | **issue** integer / required | | Issue number for which information is required. | | **organization** string / required | | Name of the GitHub organization in which the repository is hosted. | | **repo** string / required | | Name of repository from which issue needs to be retrieved. | Examples -------- ``` - name: Check if GitHub issue is closed or not community.general.github_issue: organization: ansible repo: ansible issue: 23642 action: get_status register: r - name: Take action depending upon issue status ansible.builtin.debug: msg: Do something when issue 23642 is open when: r.issue_status == 'open' ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **issue\_status** string | success | State of the GitHub issue **Sample:** open, closed | ### Authors * Abhijeet Kasurde (@Akasurde) ansible community.general.ipa_vault – Manage FreeIPA vaults community.general.ipa\_vault – Manage FreeIPA vaults ==================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ipa_vault`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Add, modify and delete vaults and secret vaults. * KRA service should be enabled to use this module. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **cn** string / required | | Vault name. Can not be changed as it is the unique identifier. aliases: name | | **description** string | | Description. | | **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_prot** string | **Choices:*** http * **https** ← | Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. | | **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipavaultpublickey** string | | Public key. aliases: vault\_public\_key | | **ipavaultsalt** string | | Vault Salt. aliases: vault\_salt | | **ipavaulttype** string | **Choices:*** asymmetric * standard * **symmetric** ← | Vault types are based on security level. aliases: vault\_type | | **replace** boolean | **Choices:*** **no** ← * yes | Force replace the existant vault on IPA server. | | **service** string | | Any service can own one or more service vaults. Mutually exclusive with user. | | **state** string | **Choices:*** absent * **present** ← | State to ensure. | | **username** list / elements=string | | Any user can own one or more user vaults. Mutually exclusive with service. aliases: user | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Validate IPA server certificates. | Examples -------- ``` - name: Ensure vault is present community.general.ipa_vault: name: vault01 vault_type: standard user: user01 ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret validate_certs: false - name: Ensure vault is present for Admin user community.general.ipa_vault: name: vault01 vault_type: standard ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - name: Ensure vault is absent community.general.ipa_vault: name: vault01 vault_type: standard user: user01 state: absent ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - name: Modify vault if already exists community.general.ipa_vault: name: vault01 vault_type: standard description: "Vault for test" ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret replace: True - name: Get vault info if already exists community.general.ipa_vault: name: vault01 ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **vault** dictionary | always | Vault as returned by IPA API | ### Authors * Juan Manuel Parrilla (@jparrill)
programming_docs
ansible community.general.nios_member – Configure Infoblox NIOS members community.general.nios\_member – Configure Infoblox NIOS members ================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nios_member`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Status](#status) DEPRECATED ---------- Removed in version 5.0.0 Why Please install the infoblox.nios\_modules collection and use the corresponding module from it. Alternative infoblox.nios\_modules.nios\_member Synopsis -------- * Adds and/or removes Infoblox NIOS servers. This module manages NIOS `member` objects using the Infoblox WAPI interface over REST. Requirements ------------ The below requirements are needed on the host that executes this module. * infoblox-client Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **comment** string | | A descriptive comment of the Grid member. | | **config\_addr\_type** string | **Default:**"IPV4" | Address configuration type (IPV4/IPV6/BOTH) | | **create\_token** boolean | **Choices:*** **no** ← * yes | Flag for initiating a create token request for pre-provisioned members. | | **enable\_ha** boolean | **Choices:*** **no** ← * yes | If set to True, the member has two physical nodes (HA pair). | | **extattrs** dictionary | | Extensible attributes associated with the object. | | **external\_syslog\_server\_enable** boolean | **Choices:*** no * yes | Determines if external syslog servers should be enabled | | **host\_name** string / required | | Specifies the host name of the member to either add or remove from the NIOS instance. aliases: name | | **ipv6\_setting** list / elements=dictionary | | Configures the IPv6 settings for the grid member. | | | **cidr\_prefix** integer | | The IPv6 CIDR prefix for the Grid Member | | | **gateway** string | | The gateway address for the Grid Member | | | **virtual\_ip** string | | The IPv6 Address of the Grid Member | | **lan2\_enabled** boolean | **Choices:*** **no** ← * yes | When set to "true", the LAN2 port is enabled as an independent port or as a port for failover purposes. | | **lan2\_port\_setting** list / elements=dictionary | | Settings for the Grid member LAN2 port if 'lan2\_enabled' is set to "true". | | | **enabled** boolean | **Choices:*** no * yes | If set to True, then it has its own IP settings. | | | **network\_setting** list / elements=dictionary | | If the 'enable' field is set to True, this defines IPv4 network settings for LAN2. | | | | **address** string | | The IPv4 Address of LAN2 | | | | **gateway** string | | The default gateway of LAN2 | | | | **subnet\_mask** string | | The subnet mask of LAN2 | | | **v6\_network\_setting** list / elements=dictionary | | If the 'enable' field is set to True, this defines IPv6 network settings for LAN2. | | | | **cidr\_prefix** integer | | The IPv6 CIDR prefix of LAN2 | | | | **gateway** string | | The gateway address of LAN2 | | | | **virtual\_ip** string | | The IPv6 Address of LAN2 | | **mgmt\_port\_setting** list / elements=dictionary | | Settings for the member MGMT port. | | | **enabled** boolean | **Choices:*** no * yes | Determines if MGMT port settings should be enabled. | | | **security\_access\_enabled** boolean | **Choices:*** no * yes | Determines if security access on the MGMT port is enabled or not. | | | **vpn\_enabled** boolean | **Choices:*** no * yes | Determines if VPN on the MGMT port is enabled or not. | | **node\_info** list / elements=dictionary | | Configures the node information list with detailed status report on the operations of the Grid Member. | | | **lan2\_physical\_setting** list / elements=dictionary | | Physical port settings for the LAN2 interface. | | | | **auto\_port\_setting\_enabled** boolean | **Choices:*** no * yes | Enable or disalbe the auto port setting. | | | | **duplex** string | | The port duplex; if speed is 1000, duplex must be FULL. | | | | **speed** string | | The port speed; if speed is 1000, duplex is FULL. | | | **lan\_ha\_port\_setting** list / elements=dictionary | | LAN/HA port settings for the node. | | | | **ha\_ip\_address** string | | HA IP address. | | | | **ha\_port\_setting** list / elements=dictionary | | Physical port settings for the HA interface. | | | | | **auto\_port\_setting\_enabled** boolean | **Choices:*** no * yes | Enable or disalbe the auto port setting. | | | | | **duplex** string | | The port duplex; if speed is 1000, duplex must be FULL. | | | | | **speed** string | | The port speed; if speed is 1000, duplex is FULL. | | | | **lan\_port\_setting** list / elements=dictionary | | Physical port settings for the LAN interface. | | | | | **auto\_port\_setting\_enabled** boolean | **Choices:*** no * yes | Enable or disalbe the auto port setting. | | | | | **duplex** string | | The port duplex; if speed is 1000, duplex must be FULL. | | | | | **speed** string | | The port speed; if speed is 1000, duplex is FULL. | | | | **mgmt\_ipv6addr** string | | Public IPv6 address for the LAN1 interface. | | | | **mgmt\_lan** string | | Public IPv4 address for the LAN1 interface. | | | **mgmt\_network\_setting** list / elements=dictionary | | Network settings for the MGMT port of the node. | | | | **address** string | | The IPv4 Address of MGMT | | | | **gateway** string | | The default gateway of MGMT | | | | **subnet\_mask** string | | The subnet mask of MGMT | | | **v6\_mgmt\_network\_setting** list / elements=dictionary | | The network settings for the IPv6 MGMT port of the node. | | | | **cidr\_prefix** integer | | The IPv6 CIDR prefix of MGMT | | | | **gateway** string | | The gateway address of MGMT | | | | **virtual\_ip** string | | The IPv6 Address of MGMT | | **platform** string | **Default:**"INFOBLOX" | Configures the Hardware Platform. | | **pre\_provisioning** list / elements=dictionary | | Pre-provisioning information. | | | **hardware\_info** list / elements=dictionary | | An array of structures that describe the hardware being pre-provisioned. | | | | **hwmodel** string | | Hardware model | | | | **hwtype** string | | Hardware type. | | | **licenses** list / elements=string | | An array of license types. | | **provider** dictionary | | A dict object containing connection details. | | | **host** string | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. | | | **http\_pool\_connections** integer | **Default:**10 | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_pool\_maxsize** integer | **Default:**10 | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_request\_timeout** integer | **Default:**10 | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. | | | **max\_results** integer | **Default:**1000 | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. | | | **max\_retries** integer | **Default:**3 | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. | | | **password** string | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. | | | **silent\_ssl\_warnings** boolean | **Choices:*** no * **yes** ← | Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **username** string | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. | | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable. aliases: ssl\_verify | | | **wapi\_version** string | **Default:**"2.1" | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 | | **router\_id** integer | | Virtual router identifier. Provide this ID if "ha\_enabled" is set to "true". This is a unique VRID number (from 1 to 255) for the local subnet. | | **state** string | **Choices:*** **present** ← * absent | Configures the intended state of the instance of the object on the NIOS server. When this value is set to `present`, the object is configured on the device and when this value is set to `absent` the value is removed (if necessary) from the device. | | **syslog\_servers** list / elements=dictionary | | The list of external syslog servers. | | | **address** string | | The server address. | | | **category\_list** list / elements=string | | The list of all syslog logging categories. | | | **connection\_type** string | **Default:**"UDP" | The connection type for communicating with this server.(STCP/TCP?UDP) | | | **local\_interface** string | **Default:**"ANY" | The local interface through which the appliance sends syslog messages to the syslog server.(ANY/LAN/MGMT) | | | **message\_node\_id** string | **Default:**"LAN" | Identify the node in the syslog message. (HOSTNAME/IP\_HOSTNAME/LAN/MGMT) | | | **message\_source** string | **Default:**"ANY" | The source of syslog messages to be sent to the external syslog server. | | | **only\_category\_list** boolean | **Choices:*** no * yes | The list of selected syslog logging categories. The appliance forwards syslog messages that belong to the selected categories. | | | **port** integer | **Default:**514 | The port this server listens on. | | | **severity** string | **Default:**"DEBUG" | The severity filter. The appliance sends log messages of the specified severity and above to the external syslog server. | | **upgrade\_group** string | **Default:**"Default" | The name of the upgrade group to which this Grid member belongs. | | **use\_syslog\_proxy\_setting** boolean | **Choices:*** no * yes | Use flag for external\_syslog\_server\_enable , syslog\_servers, syslog\_proxy\_setting, syslog\_size | | **vip\_setting** list / elements=dictionary | | Configures the network settings for the grid member. | | | **address** string | | The IPv4 Address of the Grid Member | | | **gateway** string | | The default gateway for the Grid Member | | | **subnet\_mask** string | | The subnet mask for the Grid Member | Notes ----- Note * This module must be run locally, which can be achieved by specifying `connection: local`. * Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible. Examples -------- ``` - name: Add a member to the grid with IPv4 address community.general.nios_member: host_name: member01.localdomain vip_setting: - address: 192.168.1.100 subnet_mask: 255.255.255.0 gateway: 192.168.1.1 config_addr_type: IPV4 platform: VNIOS comment: "Created by Ansible" state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Add a HA member to the grid community.general.nios_member: host_name: memberha.localdomain vip_setting: - address: 192.168.1.100 subnet_mask: 255.255.255.0 gateway: 192.168.1.1 config_addr_type: IPV4 platform: VNIOS enable_ha: true router_id: 150 node_info: - lan_ha_port_setting: - ha_ip_address: 192.168.1.70 mgmt_lan: 192.168.1.80 - lan_ha_port_setting: - ha_ip_address: 192.168.1.71 mgmt_lan: 192.168.1.81 comment: "Created by Ansible" state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Update the member with pre-provisioning details specified community.general.nios_member: name: member01.localdomain pre_provisioning: - hardware_info: - hwmodel: IB-VM-820 hwtype: IB-VNIOS licenses: - dns - dhcp - enterprise - vnios comment: "Updated by Ansible" state: present provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local - name: Remove the member community.general.nios_member: name: member01.localdomain state: absent provider: host: "{{ inventory_hostname_short }}" username: admin password: admin connection: local ``` Status ------ * This module will be removed in version 5.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Krishna Vasudevan (@krisvasudevan) ansible community.general.ipa_role – Manage FreeIPA role community.general.ipa\_role – Manage FreeIPA role ================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ipa_role`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Add, modify and delete a role within FreeIPA server using FreeIPA API. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **cn** string / required | | Role name. Can not be changed as it is the unique identifier. aliases: name | | **description** string | | A description of this role-group. | | **group** list / elements=string | | List of group names assign to this role. If an empty list is passed all assigned groups will be unassigned from the role. If option is omitted groups will not be checked or changed. If option is passed all assigned groups that are not passed will be unassigned from the role. | | **host** list / elements=string | | List of host names to assign. If an empty list is passed all assigned hosts will be unassigned from the role. If option is omitted hosts will not be checked or changed. If option is passed all assigned hosts that are not passed will be unassigned from the role. | | **hostgroup** list / elements=string | | List of host group names to assign. If an empty list is passed all assigned host groups will be removed from the role. If option is omitted host groups will not be checked or changed. If option is passed all assigned hostgroups that are not passed will be unassigned from the role. | | **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_prot** string | **Choices:*** http * **https** ← | Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. | | **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **privilege** list / elements=string | | List of privileges granted to the role. If an empty list is passed all assigned privileges will be removed. If option is omitted privileges will not be checked or changed. If option is passed all assigned privileges that are not passed will be removed. | | **service** list / elements=string | | List of service names to assign. If an empty list is passed all assigned services will be removed from the role. If option is omitted services will not be checked or changed. If option is passed all assigned services that are not passed will be removed from the role. | | **state** string | **Choices:*** absent * **present** ← | State to ensure. | | **user** list / elements=string | | List of user names to assign. If an empty list is passed all assigned users will be removed from the role. If option is omitted users will not be checked or changed. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | This only applies if `ipa_prot` is *https*. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Ensure role is present community.general.ipa_role: name: dba description: Database Administrators state: present user: - pinky - brain ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - name: Ensure role with certain details community.general.ipa_role: name: another-role description: Just another role group: - editors host: - host01.example.com hostgroup: - hostgroup01 privilege: - Group Administrators - User Administrators service: - service01 - name: Ensure role is absent community.general.ipa_role: name: dba state: absent ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **role** dictionary | always | Role as returned by IPA API. | ### Authors * Thomas Krahn (@Nosmoht)
programming_docs
ansible community.general.onepassword_raw – fetch an entire item from 1Password community.general.onepassword\_raw – fetch an entire item from 1Password ======================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.onepassword_raw`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * `onepassword_raw` wraps `op` command line utility to fetch an entire item from 1Password Requirements ------------ The below requirements are needed on the local controller node that executes this lookup. * `op` 1Password command line utility. See <https://support.1password.com/command-line/> Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **\_terms** string / required | | | identifier(s) (UUID, name, or domain; case-insensitive) of item(s) to retrieve. | | **master\_password** string | | | The password used to unlock the specified vault. aliases: vault\_password | | **secret\_key** string | | | The secret key used when performing an initial sign in. | | **section** string | | | Item section containing the field to retrieve (case-insensitive). If absent will return first match from any section. | | **subdomain** string | | | The 1Password subdomain to authenticate against. | | **username** string | | | The username used to sign in. | | **vault** string | | | Vault containing the item to retrieve (case-insensitive). If absent will search all vaults. | Notes ----- Note * This lookup will use an existing 1Password session if one exists. If not, and you have already performed an initial sign in (meaning `~/.op/config exists`), then only the `master_password` is required. You may optionally specify `subdomain` in this scenario, otherwise the last used subdomain will be used by `op`. * This lookup can perform an initial login by providing `subdomain`, `username`, `secret_key`, and `master_password`. * Due to the **very** sensitive nature of these credentials, it is **highly** recommended that you only pass in the minimal credentials needed at any given time. Also, store these credentials in an Ansible Vault using a key that is equal to or greater in strength to the 1Password master password. * This lookup stores potentially sensitive data from 1Password as Ansible facts. Facts are subject to caching if enabled, which means this data could be stored in clear text on disk or in a database. * Tested with `op` version 0.5.3 Examples -------- ``` - name: Retrieve all data about Wintermute ansible.builtin.debug: var: lookup('community.general.onepassword_raw', 'Wintermute') - name: Retrieve all data about Wintermute when not signed in to 1Password ansible.builtin.debug: var: lookup('community.general.onepassword_raw', 'Wintermute', subdomain='Turing', vault_password='DmbslfLvasjdl') ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **\_raw** list / elements=dictionary | success | field data requested | ### Authors * Scott Buchanan (@scottsb) * Andrew Zenk (@azenk) * Sam Doran (@samdoran) ansible community.general.irc – Send a message to an IRC channel or a nick community.general.irc – Send a message to an IRC channel or a nick ================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.irc`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Send a message to an IRC channel or a nick. This is a very simplistic implementation. Requirements ------------ The below requirements are needed on the host that executes this module. * socket Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **channel** string | | Channel name. One of nick\_to or channel needs to be set. When both are set, the message will be sent to both of them. | | **color** string | **Choices:*** **none** ← * white * black * blue * green * red * brown * purple * orange * yellow * light\_green * teal * light\_cyan * light\_blue * pink * gray * light\_gray | Text color for the message. ("none" is a valid option in 1.6 or later, in 1.6 and prior, the default color is black, not "none"). Added 11 more colors in version 2.0. aliases: colour | | **key** string | | Channel key | | **msg** string / required | | The message body. | | **nick** string | **Default:**"ansible" | Nickname to send the message from. May be shortened, depending on server's NICKLEN setting. | | **nick\_to** list / elements=string | | A list of nicknames to send the message to. One of nick\_to or channel needs to be set. When both are defined, the message will be sent to both of them. | | **part** boolean | **Choices:*** no * **yes** ← | Designates whether user should part from channel after sending message or not. Useful for when using a faux bot and not wanting join/parts between messages. | | **passwd** string | | Server password | | **port** integer | **Default:**6667 | IRC server port number | | **server** string | **Default:**"localhost" | IRC server name/address | | **style** string | **Choices:*** bold * underline * reverse * italic * **none** ← | Text style for the message. Note italic does not work on some clients | | **timeout** integer | **Default:**30 | Timeout to use while waiting for successful registration and join messages, this is to prevent an endless loop | | **topic** string | | Set the channel topic | | **use\_ssl** boolean | **Choices:*** **no** ← * yes | Designates whether TLS/SSL should be used when connecting to the IRC server | Examples -------- ``` - name: Send a message to an IRC channel from nick ansible community.general.irc: server: irc.example.net channel: #t1 msg: Hello world - name: Send a message to an IRC channel local_action: module: irc port: 6669 server: irc.example.net channel: #t1 msg: 'All finished at {{ ansible_date_time.iso8601 }}' color: red nick: ansibleIRC - name: Send a message to an IRC channel local_action: module: irc port: 6669 server: irc.example.net channel: #t1 nick_to: - nick1 - nick2 msg: 'All finished at {{ ansible_date_time.iso8601 }}' color: red nick: ansibleIRC ``` ### Authors * Jan-Piet Mens (@jpmens) * Matt Martz (@sivel) ansible community.general.utm_proxy_frontend – create, update or destroy reverse_proxy frontend entry in Sophos UTM community.general.utm\_proxy\_frontend – create, update or destroy reverse\_proxy frontend entry in Sophos UTM ============================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.utm_proxy_frontend`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Create, update or destroy a reverse\_proxy frontend entry in Sophos UTM. * This module needs to have the REST Ability of the UTM to be activated. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **add\_content\_type\_header** boolean | **Choices:*** **no** ← * yes | Whether to add the content type header or not | | **address** string | **Default:**"REF\_DefaultInternalAddress" | The reference name of the network/interface\_address object. | | **allowed\_networks** list / elements=string | **Default:**["REF\_NetworkAny"] | A list of reference names for the allowed networks. | | **certificate** string | **Default:**"" | The reference name of the ca/host\_key\_cert object. | | **comment** string | **Default:**"" | An optional comment to add to the object | | **disable\_compression** boolean | **Choices:*** **no** ← * yes | Whether to enable the compression | | **domain** list / elements=string | | A list of domain names for the frontend object | | **exceptions** list / elements=string | **Default:**[] | A list of exception ref names (reverse\_proxy/exception) | | **headers** dictionary | | A dictionary of additional headers to be sent to POST and PUT requests. Is needed for some modules | | **htmlrewrite** boolean | **Choices:*** **no** ← * yes | Whether to enable html rewrite or not | | **htmlrewrite\_cookies** boolean | **Choices:*** **no** ← * yes | Whether to enable html rewrite cookie or not | | **implicitredirect** boolean | **Choices:*** **no** ← * yes | Whether to enable implicit redirection or not | | **lbmethod** string | **Choices:*** * **bybusyness** ← * bytraffic * byrequests | Which loadbalancer method should be used | | **locations** list / elements=string | **Default:**[] | A list of location ref names (reverse\_proxy/location) | | **name** string / required | | The name of the object. Will be used to identify the entry | | **port** integer | **Default:**80 | The frontend http port | | **preservehost** boolean | **Choices:*** **no** ← * yes | Whether to preserve host header | | **profile** string | **Default:**"" | The reference string of the reverse\_proxy/profile | | **state** string | **Choices:*** absent * **present** ← | The desired state of the object. `present` will create or update an object `absent` will delete an object if it was present | | **status** boolean | **Choices:*** no * **yes** ← | Whether to activate the frontend entry or not | | **type** string | **Choices:*** **http** ← * https | Which protocol should be used | | **utm\_host** string / required | | The REST Endpoint of the Sophos UTM. | | **utm\_port** integer | **Default:**4444 | The port of the REST interface. | | **utm\_protocol** string | **Choices:*** http * **https** ← | The protocol of the REST Endpoint. | | **utm\_token** string / required | | The token used to identify at the REST-API. See <https://www.sophos.com/en-us/medialibrary/PDFs/documentation/UTMonAWS/Sophos-UTM-RESTful-API.pdf?la=en>, Chapter 2.4.2. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether the REST interface's ssl certificate should be verified or not. | | **xheaders** boolean | **Choices:*** **no** ← * yes | Whether to pass the host header or not | Examples -------- ``` - name: Create utm proxy_frontend community.general.utm_proxy_frontend: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestFrontendEntry host: REF_OBJECT_STRING state: present - name: Remove utm proxy_frontend community.general.utm_proxy_frontend: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestFrontendEntry state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **result** complex | success | The utm object that was created | | | **\_locked** boolean | success | Whether or not the object is currently locked | | | **\_ref** string | success | The reference name of the object | | | **\_type** string | success | The type of the object | | | **add\_content\_type\_header** boolean | success | Whether to add the content type header | | | **address** string | success | The reference name of the address | | | **allowed\_networks** list / elements=string | success | List of reference names of networks associated | | | **certificate** string | success | Reference name of certificate (ca/host\_key\_cert) | | | **comment** string | success | The comment string | | | **disable\_compression** boolean | success | State of compression support | | | **domain** list / elements=string | success | List of hostnames | | | **exceptions** list / elements=string | success | List of associated proxy exceptions | | | **htmlrewrite** boolean | success | State of html rewrite | | | **htmlrewrite\_cookies** boolean | success | Whether the html rewrite cookie will be set | | | **implicitredirect** boolean | success | Whether to use implicit redirection | | | **lbmethod** string | success | The method of loadbalancer to use | | | **locations** list / elements=string | success | The reference names of reverse\_proxy/locations associated with the object | | | **name** string | success | The name of the object | | | **port** integer | success | The port of the frontend connection | | | **preservehost** boolean | success | Preserve host header | | | **profile** string | success | The associated reverse\_proxy/profile | | | **status** boolean | success | Whether the frontend object is active or not | | | **type** string | success | The connection type | | | **xheaders** boolean | success | The xheaders state | ### Authors * Johannes Brunswicker (@MatrixCrawler) ansible community.general.vertica_user – Adds or removes Vertica database users and assigns roles. community.general.vertica\_user – Adds or removes Vertica database users and assigns roles. =========================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.vertica_user`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Adds or removes Vertica database user and, optionally, assigns roles. * A user will not be removed until all the dependencies have been dropped. * In such a situation, if the module tries to remove the user it will fail and only remove roles granted to the user. Requirements ------------ The below requirements are needed on the host that executes this module. * unixODBC * pyodbc Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **cluster** string | **Default:**"localhost" | Name of the Vertica cluster. | | **db** string | | Name of the Vertica database. | | **expired** boolean | **Choices:*** no * yes | Sets the user's password expiration. | | **ldap** boolean | **Choices:*** no * yes | Set to true if users are authenticated via LDAP. The user will be created with password expired and set to *$ldap$*. | | **login\_password** string | | The password used to authenticate with. | | **login\_user** string | **Default:**"dbadmin" | The username used to authenticate with. | | **password** string | | The user's password encrypted by the MD5 algorithm. The password must be generated with the format `"md5" + md5[password + username]`, resulting in a total of 35 characters. An easy way to do this is by querying the Vertica database with select 'md5'||md5('<user\_password><user\_name>'). | | **port** string | **Default:**5433 | Vertica cluster port to connect to. | | **profile** string | | Sets the user's profile. | | **resource\_pool** string | | Sets the user's resource pool. | | **roles** string | | Comma separated list of roles to assign to the user. aliases: role | | **state** string | **Choices:*** **present** ← * absent * locked | Whether to create `present`, drop `absent` or lock `locked` a user. | | **user** string / required | | Name of the user to add or remove. aliases: name | Notes ----- Note * The default authentication assumes that you are either logging in as or sudo’ing to the `dbadmin` account on the host. * This module uses `pyodbc`, a Python ODBC database adapter. You must ensure that `unixODBC` and `pyodbc` is installed on the host and properly configured. * Configuring `unixODBC` for Vertica requires `Driver = /opt/vertica/lib64/libverticaodbc.so` to be added to the `Vertica` section of either `/etc/odbcinst.ini` or `$HOME/.odbcinst.ini` and both `ErrorMessagesPath = /opt/vertica/lib64` and `DriverManagerEncoding = UTF-16` to be added to the `Driver` section of either `/etc/vertica.ini` or `$HOME/.vertica.ini`. Examples -------- ``` - name: Creating a new vertica user with password community.general.vertica_user: name=user_name password=md5<encrypted_password> db=db_name state=present - name: Creating a new vertica user authenticated via ldap with roles assigned community.general.vertica_user: name=user_name ldap=true db=db_name roles=schema_name_ro state=present ``` ### Authors * Dariusz Owczarek (@dareko) ansible community.general.pubnub_blocks – PubNub blocks management module. community.general.pubnub\_blocks – PubNub blocks management module. =================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pubnub_blocks`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module allows Ansible to interface with the PubNub BLOCKS infrastructure by providing the following operations: create / remove, start / stop and rename for blocks and create / modify / remove for event handlers Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * pubnub\_blocks\_client >= 1.0 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **account** string | | Name of PubNub account for from which `application` will be used to manage blocks. User's account will be used if value not set or empty. | | **application** string / required | | Name of target PubNub application for which blocks configuration on specific `keyset` will be done. | | **cache** dictionary | **Default:**{} | In case if single play use blocks management module few times it is preferred to enabled 'caching' by making previous module to share gathered artifacts and pass them to this parameter. | | **changes** dictionary | **Default:**{} | List of fields which should be changed by block itself (doesn't affect any event handlers). Possible options for change is: `name`. | | **description** string | | Short block description which will be later visible on admin.pubnub.com. Used only if block doesn't exists and won't change description for existing block. | | **email** string | | Email from account for which new session should be started. Not required if `cache` contains result of previous module call (in same play). | | **event\_handlers** list / elements=dictionary | **Default:**[] | List of event handlers which should be updated for specified block `name`. Each entry for new event handler should contain: `name`, `src`, `channels`, `event`. `name` used as event handler name which can be used later to make changes to it. `src` is full path to file with event handler code. `channels` is name of channel from which event handler is waiting for events. `event` is type of event which is able to trigger event handler: *js-before-publish*, *js-after-publish*, *js-after-presence*. Each entry for existing handlers should contain `name` (so target handler can be identified). Rest parameters (`src`, `channels` and `event`) can be added if changes required for them. It is possible to rename event handler by adding `changes` key to event handler payload and pass dictionary, which will contain single key `name`, where new name should be passed. To remove particular event handler it is possible to set `state` for it to `absent` and it will be removed. | | **keyset** string / required | | Name of application's keys set which is bound to managed blocks. | | **name** string / required | | Name of managed block which will be later visible on admin.pubnub.com. | | **password** string | | Password which match to account to which specified `email` belong. Not required if `cache` contains result of previous module call (in same play). | | **state** string | **Choices:*** started * stopped * **present** ← * absent | Intended block state after event handlers creation / update process will be completed. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | This key allow to try skip certificates check when performing REST API calls. Sometimes host may have issues with certificates on it and this will cause problems to call PubNub REST API. If check should be ignored `False` should be passed to this parameter. | Examples -------- ``` # Event handler create example. - name: Create single event handler community.general.pubnub_blocks: email: '{{ email }}' password: '{{ password }}' application: '{{ app_name }}' keyset: '{{ keyset_name }}' name: '{{ block_name }}' event_handlers: - src: '{{ path_to_handler_source }}' name: '{{ handler_name }}' event: 'js-before-publish' channels: '{{ handler_channel }}' # Change event handler trigger event type. - name: Change event handler 'event' community.general.pubnub_blocks: email: '{{ email }}' password: '{{ password }}' application: '{{ app_name }}' keyset: '{{ keyset_name }}' name: '{{ block_name }}' event_handlers: - name: '{{ handler_name }}' event: 'js-after-publish' # Stop block and event handlers. - name: Stopping block community.general.pubnub_blocks: email: '{{ email }}' password: '{{ password }}' application: '{{ app_name }}' keyset: '{{ keyset_name }}' name: '{{ block_name }}' state: stop # Multiple module calls with cached result passing - name: Create '{{ block_name }}' block register: module_cache community.general.pubnub_blocks: email: '{{ email }}' password: '{{ password }}' application: '{{ app_name }}' keyset: '{{ keyset_name }}' name: '{{ block_name }}' state: present - name: Add '{{ event_handler_1_name }}' handler to '{{ block_name }}' register: module_cache community.general.pubnub_blocks: cache: '{{ module_cache }}' application: '{{ app_name }}' keyset: '{{ keyset_name }}' name: '{{ block_name }}' state: present event_handlers: - src: '{{ path_to_handler_1_source }}' name: '{{ event_handler_1_name }}' channels: '{{ event_handler_1_channel }}' event: 'js-before-publish' - name: Add '{{ event_handler_2_name }}' handler to '{{ block_name }}' register: module_cache community.general.pubnub_blocks: cache: '{{ module_cache }}' application: '{{ app_name }}' keyset: '{{ keyset_name }}' name: '{{ block_name }}' state: present event_handlers: - src: '{{ path_to_handler_2_source }}' name: '{{ event_handler_2_name }}' channels: '{{ event_handler_2_channel }}' event: 'js-before-publish' - name: Start '{{ block_name }}' block register: module_cache community.general.pubnub_blocks: cache: '{{ module_cache }}' application: '{{ app_name }}' keyset: '{{ keyset_name }}' name: '{{ block_name }}' state: started ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **module\_cache** dictionary | always | Cached account information. In case if with single play module used few times it is better to pass cached data to next module calls to speed up process. | ### Authors * PubNub <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#a8dbddd8d8c7dadc8e8b9b9f938e8b9d9a938e8b9c9093d8ddcac6ddca8e8b9c9e93cbc7c5)> (@pubnub) * Sergey Mamontov <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#cebdabbca9abb7e8edfdf9f5e8edfbfcf5e8edfaf6f5bebbaca0bbace8edfaf8f5ada1a3)> (@parfeon)
programming_docs
ansible community.general.pingdom – Pause/unpause Pingdom alerts community.general.pingdom – Pause/unpause Pingdom alerts ======================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pingdom`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module will let you pause/unpause Pingdom alerts Requirements ------------ The below requirements are needed on the host that executes this module. * This pingdom python library: <https://github.com/mbabineau/pingdom-python> Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **checkid** string / required | | Pingdom ID of the check. | | **key** string / required | | Pingdom API key. | | **passwd** string / required | | Pingdom user password. | | **state** string / required | **Choices:*** running * paused * started * stopped | Define whether or not the check should be running or paused. | | **uid** string / required | | Pingdom user ID. | Notes ----- Note * This module does not yet have support to add/remove checks. Examples -------- ``` - name: Pause the check with the ID of 12345 community.general.pingdom: uid: [email protected] passwd: password123 key: apipassword123 checkid: 12345 state: paused - name: Unpause the check with the ID of 12345 community.general.pingdom: uid: [email protected] passwd: password123 key: apipassword123 checkid: 12345 state: running ``` ### Authors * Dylan Silva (@thaumos) * Justin Johns (!UNKNOWN) ansible community.general.xfconf – Edit XFCE4 Configurations community.general.xfconf – Edit XFCE4 Configurations ==================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.xfconf`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This module allows for the manipulation of Xfce 4 Configuration with the help of xfconf-query. Please see the xfconf-query(1) man pages for more details. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **channel** string / required | | A Xfconf preference channel is a top-level tree key, inside of the Xfconf repository that corresponds to the location for which all application properties/keys are stored. See man xfconf-query(1) | | **disable\_facts** boolean added in 2.1.0 of community.general | **Choices:*** **no** ← * yes | For backward compatibility, output results are also returned as `ansible_facts`, but this behaviour is deprecated and will be removed in community.general 4.0.0. This flag disables the output as facts and also disables the deprecation warning. | | **force\_array** boolean added in 1.0.0 of community.general | **Choices:*** **no** ← * yes | Force array even if only one element aliases: array | | **property** string / required | | A Xfce preference key is an element in the Xfconf repository that corresponds to an application preference. See man xfconf-query(1) | | **state** string | **Choices:*** get * **present** ← * absent | The action to take upon the property/value. | | **value** list / elements=raw | | Preference properties typically have simple values such as strings, integers, or lists of strings and integers. This is ignored if the state is "get". For array mode, use a list of values. See man xfconf-query(1) | | **value\_type** list / elements=string | **Choices:*** int * uint * bool * float * double * string | The type of value being set. This is ignored if the state is "get". For array mode, use a list of types. | Examples -------- ``` - name: Change the DPI to "192" xfconf: channel: "xsettings" property: "/Xft/DPI" value_type: "int" value: "192" - name: Set workspace names (4) xfconf: channel: xfwm4 property: /general/workspace_names value_type: string value: ['Main', 'Work1', 'Work2', 'Tmp'] - name: Set workspace names (1) xfconf: channel: xfwm4 property: /general/workspace_names value_type: string value: ['Main'] force_array: yes ``` ### Authors * Joseph Benden (@jbenden) * Alexei Znamensky (@russoz) There were some errors parsing the documentation for this plugin. Please file a bug with the collection. The errors were: * ``` Unable to normalize xfconf: return due to: 3 validation errors for PluginReturnSchema return -> previous_value -> type string does not match regex "^(any|bits|bool|bytes|complex|dict|float|int|json|jsonarg|list|path|sid|str|pathspec|pathlist)$" (type=value_error.str.regex; pattern=^(any|bits|bool|bytes|complex|dict|float|int|json|jsonarg|list|path|sid|str|pathspec|pathlist)$) return -> value -> type string does not match regex "^(any|bits|bool|bytes|complex|dict|float|int|json|jsonarg|list|path|sid|str|pathspec|pathlist)$" (type=value_error.str.regex; pattern=^(any|bits|bool|bytes|complex|dict|float|int|json|jsonarg|list|path|sid|str|pathspec|pathlist)$) return -> value_type -> type string does not match regex "^(any|bits|bool|bytes|complex|dict|float|int|json|jsonarg|list|path|sid|str|pathspec|pathlist)$" (type=value_error.str.regex; pattern=^(any|bits|bool|bytes|complex|dict|float|int|json|jsonarg|list|path|sid|str|pathspec|pathlist)$) ``` ansible community.general.jenkins_script – Executes a groovy script in the jenkins instance community.general.jenkins\_script – Executes a groovy script in the jenkins instance ==================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.jenkins_script`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * The `jenkins_script` module takes a script plus a dict of values to use within the script and returns the result of the script being run. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **args** dictionary | | A dict of key-value pairs used in formatting the script using string.Template (see https://docs.python.org/2/library/string.html#template-strings). | | **password** string | | The password to connect to the jenkins server with. | | **script** string / required | | The groovy script to be executed. This gets passed as a string Template if args is defined. | | **timeout** integer | **Default:**10 | The request timeout in seconds | | **url** string | **Default:**"http://localhost:8080" | The jenkins server to execute the script against. The default is a local jenkins instance that is not being proxied through a webserver. | | **user** string | | The username to connect to the jenkins server with. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates as it avoids verifying the source site. | Notes ----- Note * Since the script can do anything this does not report on changes. Knowing the script is being run it’s important to set changed\_when for the ansible output to be clear on any alterations made. Examples -------- ``` - name: Obtaining a list of plugins community.general.jenkins_script: script: 'println(Jenkins.instance.pluginManager.plugins)' user: admin password: admin - name: Setting master using a variable to hold a more complicate script ansible.builtin.set_fact: setmaster_mode: | import jenkins.model.* instance = Jenkins.getInstance() instance.setMode(${jenkins_mode}) instance.save() - name: Use the variable as the script community.general.jenkins_script: script: "{{ setmaster_mode }}" args: jenkins_mode: Node.Mode.EXCLUSIVE - name: Interacting with an untrusted HTTPS connection community.general.jenkins_script: script: "println(Jenkins.instance.pluginManager.plugins)" user: admin password: admin url: https://localhost validate_certs: no ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **output** string | success | Result of script **Sample:** Result: true | ### Authors * James Hogarth (@hogarthj) ansible community.general.nios_next_ip – Return the next available IP address for a network community.general.nios\_next\_ip – Return the next available IP address for a network ===================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nios_next_ip`. * [DEPRECATED](#deprecated) * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) * [Status](#status) DEPRECATED ---------- Removed in version 5.0.0 Why Please install the infoblox.nios\_modules collection and use the corresponding lookup from it. Alternative infoblox.nios\_modules.nios\_next\_ip Synopsis -------- * Uses the Infoblox WAPI API to return the next available IP addresses for a given network CIDR Requirements ------------ The below requirements are needed on the local controller node that executes this lookup. * infoblox-client Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **\_terms** string / required | | | The CIDR network to retrieve the next addresses from | | **exclude** string | | | List of IP's that need to be excluded from returned IP addresses | | **num** string | **Default:**1 | | The number of IP addresses to return | | **provider** dictionary | | | A dict object containing connection details. | | | **host** string | | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. | | | **http\_pool\_connections** integer | **Default:**10 | | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_pool\_maxsize** integer | **Default:**10 | | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **http\_request\_timeout** integer | **Default:**10 | | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. | | | **max\_results** integer | **Default:**1000 | | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. | | | **max\_retries** integer | **Default:**3 | | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. | | | **password** string | | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. | | | **silent\_ssl\_warnings** boolean | **Choices:*** no * **yes** ← | | Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. | | | **username** string | | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. | | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | | Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable. aliases: ssl\_verify | | | **wapi\_version** string | **Default:**"2.1" | | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 | Notes ----- Note * This module must be run locally, which can be achieved by specifying `connection: local`. * Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible. Examples -------- ``` - name: return next available IP address for network 192.168.10.0/24 ansible.builtin.set_fact: ipaddr: "{{ lookup('community.general.nios_next_ip', '192.168.10.0/24', provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}" - name: return the next 3 available IP addresses for network 192.168.10.0/24 ansible.builtin.set_fact: ipaddr: "{{ lookup('community.general.nios_next_ip', '192.168.10.0/24', num=3, provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}" - name: return the next 3 available IP addresses for network 192.168.10.0/24 excluding ip addresses - ['192.168.10.1', '192.168.10.2'] ansible.builtin.set_fact: ipaddr: "{{ lookup('community.general.nios_next_ip', '192.168.10.0/24', num=3, exclude=['192.168.10.1', '192.168.10.2'], provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **\_list** list / elements=string | success | The list of next IP addresses available | Status ------ * This lookup will be removed in version 5.0.0. *[deprecated]* * For more information see [DEPRECATED](#deprecated). ### Authors * Unknown (!UNKNOWN) ansible community.general.cgroup_memory_recap – Profiles maximum memory usage of tasks and full execution using cgroups community.general.cgroup\_memory\_recap – Profiles maximum memory usage of tasks and full execution using cgroups ================================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.cgroup_memory_recap`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) Synopsis -------- * This is an ansible callback plugin that profiles maximum memory usage of ansible and individual tasks, and displays a recap at the end using cgroups Requirements ------------ The below requirements are needed on the local controller node that executes this callback. * whitelist in configuration * cgroups Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **cur\_mem\_file** string / required | | ini entries: [callback\_cgroupmemrecap]cur\_mem\_file = None env:CGROUP\_CUR\_MEM\_FILE | Path to `memory.usage_in_bytes` file. Example `/sys/fs/cgroup/memory/ansible_profile/memory.usage_in_bytes` | | **max\_mem\_file** string / required | | ini entries: [callback\_cgroupmemrecap]max\_mem\_file = None env:CGROUP\_MAX\_MEM\_FILE | Path to cgroups `memory.max_usage_in_bytes` file. Example `/sys/fs/cgroup/memory/ansible_profile/memory.max_usage_in_bytes` | Notes ----- Note * Requires ansible to be run from within a cgroup, such as with `cgexec -g memory:ansible_profile ansible-playbook ...` * This cgroup should only be used by ansible to get accurate results * To create the cgroup, first use a command such as `sudo cgcreate -a ec2-user:ec2-user -t ec2-user:ec2-user -g memory:ansible_profile` ### Authors * Unknown (!UNKNOWN) ansible community.general.nmcli – Manage Networking community.general.nmcli – Manage Networking =========================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.nmcli`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manage the network devices. Create, modify and manage various connection and device type e.g., ethernet, teams, bonds, vlans etc. * On CentOS 8 and Fedora >=29 like systems, the requirements can be met by installing the following packages: NetworkManager. * On CentOS 7 and Fedora <=28 like systems, the requirements can be met by installing the following packages: NetworkManager-tui. * On Ubuntu and Debian like systems, the requirements can be met by installing the following packages: network-manager * On openSUSE, the requirements can be met by installing the following packages: NetworkManager. Requirements ------------ The below requirements are needed on the host that executes this module. * nmcli Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ageingtime** integer | **Default:**300 | This is only used with bridge - [ageing-time <0-1000000>] the Ethernet MAC address aging time, in seconds. | | **arp\_interval** integer | | This is only used with bond - ARP interval. | | **arp\_ip\_target** string | | This is only used with bond - ARP IP target. | | **autoconnect** boolean | **Choices:*** no * **yes** ← | Whether the connection should start on boot. Whether the connection profile can be automatically activated | | **conn\_name** string / required | | The name used to call the connection. Pattern is <type>[-<ifname>][-<num>]. | | **dhcp\_client\_id** string | | DHCP Client Identifier sent to the DHCP server. | | **dns4** list / elements=string | | A list of up to 3 dns servers. IPv4 format e.g. to add two IPv4 DNS server addresses, use `192.0.2.53 198.51.100.53`. | | **dns4\_ignore\_auto** boolean added in 3.2.0 of community.general | **Choices:*** **no** ← * yes | Ignore automatically configured IPv4 name servers. | | **dns4\_search** list / elements=string | | A list of DNS search domains. | | **dns6** list / elements=string | | A list of up to 3 dns servers. IPv6 format e.g. to add two IPv6 DNS server addresses, use `2001:4860:4860::8888 2001:4860:4860::8844`. | | **dns6\_ignore\_auto** boolean added in 3.2.0 of community.general | **Choices:*** **no** ← * yes | Ignore automatically configured IPv6 name servers. | | **dns6\_search** list / elements=string | | A list of DNS search domains. | | **downdelay** integer | | This is only used with bond - downdelay. | | **egress** string | | This is only used with VLAN - VLAN egress priority mapping. | | **flags** string | | This is only used with VLAN - flags. | | **forwarddelay** integer | **Default:**15 | This is only used with bridge - [forward-delay <2-30>] STP forwarding delay, in seconds. | | **gsm** dictionary added in 3.7.0 of community.general | | The configuration of the GSM connection. Note the list of suboption attributes may vary depending on which version of NetworkManager/nmcli is installed on the host. An up-to-date list of supported attributes can be found here: <https://networkmanager.dev/docs/api/latest/settings-gsm.html>. For instance to use apn, pin, username and password: `{apn: provider.apn, pin: 1234, username: apn.username, password: apn.password}`. | | | **apn** string | | The GPRS Access Point Name specifying the APN used when establishing a data session with the GSM-based network. The APN often determines how the user will be billed for their network usage and whether the user has access to the Internet or just a provider-specific walled-garden, so it is important to use the correct APN for the user's mobile broadband plan. The APN may only be composed of the characters a-z, 0-9, ., and - per GSM 03.60 Section 14.9. | | | **auto-config** boolean | **Choices:*** **no** ← * yes | When `true`, the settings such as *gsm.apn*, *gsm.username*, or *gsm.password* will default to values that match the network the modem will register to in the Mobile Broadband Provider database. | | | **device-id** string | | The device unique identifier (as given by the `WWAN` management service) which this connection applies to. If given, the connection will only apply to the specified device. | | | **home-only** boolean | **Choices:*** **no** ← * yes | When `true`, only connections to the home network will be allowed. Connections to roaming networks will not be made. | | | **mtu** integer | **Default:**0 | If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames. | | | **network-id** string | | The Network ID (GSM LAI format, ie MCC-MNC) to force specific network registration. If the Network ID is specified, NetworkManager will attempt to force the device to register only on the specified network. This can be used to ensure that the device does not roam when direct roaming control of the device is not otherwise possible. | | | **number** string | | Legacy setting that used to help establishing PPP data sessions for GSM-based modems. | | | **password** string | | The password used to authenticate with the network, if required. Many providers do not require a password, or accept any password. But if a password is required, it is specified here. | | | **password-flags** integer | **Choices:*** 0 * 1 * 2 * 4 **Default:**0 | NMSettingSecretFlags indicating how to handle the *password* property. Following choices are allowed: `0` **NONE**: The system is responsible for providing and storing this secret (default), `1` **AGENT\_OWNED**: A user secret agent is responsible for providing and storing this secret; when it is required agents will be asked to retrieve it `2` **NOT\_SAVED**: This secret should not be saved, but should be requested from the user each time it is needed `4` **NOT\_REQUIRED**: In situations where it cannot be automatically determined that the secret is required (some VPNs and PPP providers do not require all secrets) this flag indicates that the specific secret is not required. | | | **pin** string | | If the SIM is locked with a PIN it must be unlocked before any other operations are requested. Specify the PIN here to allow operation of the device. | | | **pin-flags** integer | **Choices:*** 0 * 1 * 2 * 4 **Default:**0 | NMSettingSecretFlags indicating how to handle the *gsm.pin* property. See *gsm.password-flags* for NMSettingSecretFlags choices. | | | **sim-id** string | | The SIM card unique identifier (as given by the `WWAN` management service) which this connection applies to. If given, the connection will apply to any device also allowed by *gsm.device-id* which contains a SIM card matching the given identifier. | | | **sim-operator-id** string | | A MCC/MNC string like `310260` or `21601I` identifying the specific mobile network operator which this connection applies to. If given, the connection will apply to any device also allowed by *gsm.device-id* and *gsm.sim-id* which contains a SIM card provisioned by the given operator. | | | **username** string | | The username used to authenticate with the network, if required. Many providers do not require a username, or accept any username. But if a username is required, it is specified here. | | **gw4** string | | The IPv4 gateway for this interface. Use the format `192.0.2.1`. This parameter is mutually\_exclusive with never\_default4 parameter. | | **gw4\_ignore\_auto** boolean added in 3.2.0 of community.general | **Choices:*** **no** ← * yes | Ignore automatically configured IPv4 routes. | | **gw6** string | | The IPv6 gateway for this interface. Use the format `2001:db8::1`. | | **gw6\_ignore\_auto** boolean added in 3.2.0 of community.general | **Choices:*** **no** ← * yes | Ignore automatically configured IPv6 routes. | | **hairpin** boolean | **Choices:*** no * **yes** ← | This is only used with 'bridge-slave' - 'hairpin mode' for the slave, which allows frames to be sent back out through the slave the frame was received on. | | **hellotime** integer | **Default:**2 | This is only used with bridge - [hello-time <1-10>] STP hello time, in seconds. | | **ifname** string | | The interface to bind the connection to. The connection will only be applicable to this interface name. A special value of `'*'` can be used for interface-independent connections. The ifname argument is mandatory for all connection types except bond, team, bridge and vlan. This parameter defaults to `conn_name` when left unset. | | **ignore\_unsupported\_suboptions** boolean added in 3.6.0 of community.general | **Choices:*** **no** ← * yes | Ignore suboptions which are invalid or unsupported by the version of NetworkManager/nmcli installed on the host. Only *wifi* and *wifi\_sec* options are currently affected. | | **ingress** string | | This is only used with VLAN - VLAN ingress priority mapping. | | **ip4** string | | The IPv4 address to this interface. Use the format `192.0.2.24/24`. If defined and *method4* is not specified, automatically set `ipv4.method` to `manual`. | | **ip6** string | | The IPv6 address to this interface. Use the format `abbe::cafe`. If defined and *method6* is not specified, automatically set `ipv6.method` to `manual`. | | **ip\_tunnel\_dev** string | | This is used with GRE/IPIP/SIT - parent device this GRE/IPIP/SIT tunnel, can use ifname. | | **ip\_tunnel\_input\_key** string added in 3.6.0 of community.general | | The key used for tunnel input packets. Only used when *type=gre*. | | **ip\_tunnel\_local** string | | This is used with GRE/IPIP/SIT - GRE/IPIP/SIT local IP address. | | **ip\_tunnel\_output\_key** string added in 3.6.0 of community.general | | The key used for tunnel output packets. Only used when *type=gre*. | | **ip\_tunnel\_remote** string | | This is used with GRE/IPIP/SIT - GRE/IPIP/SIT destination IP address. | | **mac** string | | MAC address of the connection. Note this requires a recent kernel feature, originally introduced in 3.15 upstream kernel. | | **master** string | | Master <master (ifname, or connection UUID or conn\_name) of bridge, team, bond master connection profile. | | **maxage** integer | **Default:**20 | This is only used with bridge - [max-age <6-42>] STP maximum message age, in seconds. | | **may\_fail4** boolean added in 3.3.0 of community.general | **Choices:*** no * **yes** ← | If you need *ip4* configured before `network-online.target` is reached, set this option to `false`. | | **method4** string added in 2.2.0 of community.general | **Choices:*** auto * link-local * manual * shared * disabled | Configuration method to be used for IPv4. If *ip4* is set, `ipv4.method` is automatically set to `manual` and this parameter is not needed. | | **method6** string added in 2.2.0 of community.general | **Choices:*** ignore * auto * dhcp * link-local * manual * shared * disabled | Configuration method to be used for IPv6 If *ip6* is set, `ipv6.method` is automatically set to `manual` and this parameter is not needed. `disabled` was added in community.general 3.3.0. | | **miimon** integer | | This is only used with bond - miimon. This parameter defaults to `100` when unset. | | **mode** string | **Choices:*** 802.3ad * active-backup * balance-alb * **balance-rr** ← * balance-tlb * balance-xor * broadcast | This is the type of device or network connection that you wish to create for a bond or bridge. | | **mtu** integer | | The connection MTU, e.g. 9000. This can't be applied when creating the interface and is done once the interface has been created. Can be used when modifying Team, VLAN, Ethernet (Future plans to implement wifi, gsm, pppoe, infiniband) This parameter defaults to `1500` when unset. | | **never\_default4** boolean added in 2.0.0 of community.general | **Choices:*** **no** ← * yes | Set as default route. This parameter is mutually\_exclusive with gw4 parameter. | | **path\_cost** integer | **Default:**100 | This is only used with 'bridge-slave' - [<1-65535>] - STP port cost for destinations via this slave. | | **primary** string | | This is only used with bond and is the primary interface name (for "active-backup" mode), this is the usually the 'ifname'. | | **priority** integer | **Default:**128 | This is only used with 'bridge' - sets STP priority. | | **route\_metric4** integer added in 2.0.0 of community.general | | Set metric level of ipv4 routes configured on interface. | | **routes4** list / elements=string added in 2.0.0 of community.general | | The list of ipv4 routes. Use the format '192.0.3.0/24 192.0.2.1' | | **routing\_rules4** list / elements=string added in 3.3.0 of community.general | | Is the same as in an `ip route add` command, except always requires specifying a priority. | | **runner** string added in 3.4.0 of community.general | **Choices:*** broadcast * **roundrobin** ← * activebackup * loadbalance * lacp | This is the type of device or network connection that you wish to create for a team. | | **runner\_hwaddr\_policy** string added in 3.4.0 of community.general | **Choices:*** same\_all * by\_active * only\_active | This defines the policy of how hardware addresses of team device and port devices should be set during the team lifetime. | | **slavepriority** integer | **Default:**32 | This is only used with 'bridge-slave' - [<0-63>] - STP priority of this slave. | | **ssid** string added in 3.0.0 of community.general | | Name of the Wireless router or the access point. | | **state** string / required | **Choices:*** absent * present | Whether the device should exist or not, taking action if the state is different from what is stated. | | **stp** boolean | **Choices:*** no * **yes** ← | This is only used with bridge and controls whether Spanning Tree Protocol (STP) is enabled for this bridge. | | **type** string | **Choices:*** bond * bond-slave * bridge * bridge-slave * dummy * ethernet * generic * gre * infiniband * ipip * sit * team * team-slave * vlan * vxlan * wifi * gsm | This is the type of device or network connection that you wish to create or modify. Type `dummy` is added in community.general 3.5.0. Type `generic` is added in Ansible 2.5. Type `infiniband` is added in community.general 2.0.0. Type `gsm` is added in community.general 3.7.0. | | **updelay** integer | | This is only used with bond - updelay. | | **vlandev** string | | This is only used with VLAN - parent device this VLAN is on, can use ifname. | | **vlanid** integer | | This is only used with VLAN - VLAN ID in range <0-4095>. | | **vxlan\_id** integer | | This is only used with VXLAN - VXLAN ID. | | **vxlan\_local** string | | This is only used with VXLAN - VXLAN local IP address. | | **vxlan\_remote** string | | This is only used with VXLAN - VXLAN destination IP address. | | **wifi** dictionary added in 3.5.0 of community.general | | The configuration of the WiFi connection. Note the list of suboption attributes may vary depending on which version of NetworkManager/nmcli is installed on the host. An up-to-date list of supported attributes can be found here: <https://networkmanager.dev/docs/api/latest/settings-802-11-wireless.html>. For instance to create a hidden AP mode WiFi connection: `{hidden: true, mode: ap}`. | | | **ap-isolation** integer | **Choices:*** -1 * 0 * 1 **Default:**-1 | Configures AP isolation, which prevents communication between wireless devices connected to this AP. This property can be set to a value different from `-1` only when the interface is configured in AP mode. If set to `1`, devices are not able to communicate with each other. This increases security because it protects devices against attacks from other clients in the network. At the same time, it prevents devices to access resources on the same wireless networks as file shares, printers, etc. If set to `0`, devices can talk to each other. When set to `-1`, the global default is used; in case the global default is unspecified it is assumed to be `0`. | | | **assigned-mac-address** string | | The new field for the cloned MAC address. It can be either a hardware address in ASCII representation, or one of the special values `preserve`, `permanent`, `random` or `stable`. This field replaces the deprecated *cloned-mac-address* on D-Bus, which can only contain explicit hardware addresses. Note that this property only exists in D-Bus API. libnm and nmcli continue to call this property *cloned-mac-address*. | | | **band** string | **Choices:*** a * bg | 802.11 frequency band of the network. One of `a` for 5GHz 802.11a or `bg` for 2.4GHz 802.11. This will lock associations to the Wi-Fi network to the specific band, so for example, if `a` is specified, the device will not associate with the same network in the 2.4GHz band even if the network's settings are compatible. This setting depends on specific driver capability and may not work with all drivers. | | | **bssid** string | | If specified, directs the device to only associate with the given access point. This capability is highly driver dependent and not supported by all devices. Note this property does not control the BSSID used when creating an Ad-Hoc network and is unlikely to in the future. | | | **channel** integer | **Default:**0 | Wireless channel to use for the Wi-Fi connection. The device will only join (or create for Ad-Hoc networks) a Wi-Fi network on the specified channel. Because channel numbers overlap between bands, this property also requires the *band* property to be set. | | | **cloned-mac-address** string | | This D-Bus field is deprecated in favor of *assigned-mac-address* which is more flexible and allows specifying special variants like `random`. For libnm and nmcli, this field is called *cloned-mac-address*. | | | **generate-mac-address-mask** string | | With *cloned-mac-address* setting `random` or `stable`, by default all bits of the MAC address are scrambled and a locally-administered, unicast MAC address is created. This property allows to specify that certain bits are fixed. Note that the least significant bit of the first MAC address will always be unset to create a unicast MAC address. If the property is `null`, it is eligible to be overwritten by a default connection setting. If the value is still c(null) or an empty string, the default is to create a locally-administered, unicast MAC address. If the value contains one MAC address, this address is used as mask. The set bits of the mask are to be filled with the current MAC address of the device, while the unset bits are subject to randomization. Setting `FE:FF:FF:00:00:00` means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the `random` or `stable` algorithm. If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the bits that shall not be randomized. For example, a value of `FE:FF:FF:00:00:00 68:F7:28:00:00:00` will set the OUI of the MAC address to 68:F7:28, while the lower bits are randomized. A value of `02:00:00:00:00:00 00:00:00:00:00:00` will create a fully scrambled globally-administered, burned-in MAC address. If the value contains more than one additional MAC addresses, one of them is chosen randomly. For example, `02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00` will create a fully scrambled MAC address, randomly locally or globally administered. | | | **hidden** boolean | **Choices:*** **no** ← * yes | If `true`, indicates that the network is a non-broadcasting network that hides its SSID. This works both in infrastructure and AP mode. In infrastructure mode, various workarounds are used for a more reliable discovery of hidden networks, such as probe-scanning the SSID. However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used with caution. In AP mode, the created network does not broadcast its SSID. Note that marking the network as hidden may be a privacy issue for you (in infrastructure mode) or client stations (in AP mode), as the explicit probe-scans are distinctly recognizable on the air. | | | **mac-address** string | | If specified, this connection will only apply to the Wi-Fi device whose permanent MAC address matches. This property does not change the MAC address of the device (for example for MAC spoofing). | | | **mac-address-blacklist** list / elements=string | | A list of permanent MAC addresses of Wi-Fi devices to which this connection should never apply. Each MAC address should be given in the standard hex-digits-and-colons notation (for example, `00:11:22:33:44:55`). | | | **mac-address-randomization** integer | **Choices:*** 0 * 1 * 2 **Default:**0 | One of `0` (never randomize unless the user has set a global default to randomize and the supplicant supports randomization), `1` (never randomize the MAC address), or `2` (always randomize the MAC address). This property is deprecated for *cloned-mac-address*. | | | **mode** string | **Choices:*** **infrastructure** ← * mesh * adhoc * ap | Wi-Fi network mode. If blank, `infrastructure` is assumed. | | | **mtu** integer | **Default:**0 | If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames. | | | **powersave** integer | **Choices:*** 0 * 1 * 2 * 3 **Default:**0 | One of `2` (disable Wi-Fi power saving), `3` (enable Wi-Fi power saving), `1` (don't touch currently configure setting) or `0` (use the globally configured value). All other values are reserved. | | | **rate** integer | **Default:**0 | If non-zero, directs the device to only use the specified bitrate for communication with the access point. Units are in Kb/s, so for example `5500` = 5.5 Mbit/s. This property is highly driver dependent and not all devices support setting a static bitrate. | | | **tx-power** integer | **Default:**0 | If non-zero, directs the device to use the specified transmit power. Units are dBm. This property is highly driver dependent and not all devices support setting a static transmit power. | | | **wake-on-wlan** integer | **Default:**1 | The NMSettingWirelessWakeOnWLan options to enable. Not all devices support all options. May be any combination of `NM_SETTING_WIRELESS_WAKE_ON_WLAN_ANY` (`0x2`), `NM_SETTING_WIRELESS_WAKE_ON_WLAN_DISCONNECT` (`0x4`), `NM_SETTING_WIRELESS_WAKE_ON_WLAN_MAGIC` (`0x8`), `NM_SETTING_WIRELESS_WAKE_ON_WLAN_GTK_REKEY_FAILURE` (`0x10`), `NM_SETTING_WIRELESS_WAKE_ON_WLAN_EAP_IDENTITY_REQUEST` (`0x20`), `NM_SETTING_WIRELESS_WAKE_ON_WLAN_4WAY_HANDSHAKE` (`0x40`), `NM_SETTING_WIRELESS_WAKE_ON_WLAN_RFKILL_RELEASE` (`0x80`), `NM_SETTING_WIRELESS_WAKE_ON_WLAN_TCP` (`0x100`) or the special values `0x1` (to use global settings) and `0x8000` (to disable management of Wake-on-LAN in NetworkManager). Note the option values' sum must be specified in order to combine multiple options. | | **wifi\_sec** dictionary added in 3.0.0 of community.general | | The security configuration of the WiFi connection. Note the list of suboption attributes may vary depending on which version of NetworkManager/nmcli is installed on the host. An up-to-date list of supported attributes can be found here: <https://networkmanager.dev/docs/api/latest/settings-802-11-wireless-security.html>. For instance to use common WPA-PSK auth with a password: `{key-mgmt: wpa-psk, psk: my_password}`. | | | **auth-alg** string | **Choices:*** open * shared * leap | When WEP is used (that is, if *key-mgmt* = `none` or `ieee8021x`) indicate the 802.11 authentication algorithm required by the AP here. One of `open` for Open System, `shared` for Shared Key, or `leap` for Cisco LEAP. When using Cisco LEAP (that is, if *key-mgmt=ieee8021x* and *auth-alg=leap*) the *leap-username* and *leap-password* properties must be specified. | | | **fils** integer | **Choices:*** 0 * 1 * 2 * 3 **Default:**0 | Indicates whether Fast Initial Link Setup (802.11ai) must be enabled for the connection. One of `0` (use global default value), `1` (disable FILS), `2` (enable FILS if the supplicant and the access point support it) or `3` (enable FILS and fail if not supported). When set to `0` and no global default is set, FILS will be optionally enabled. | | | **group** list / elements=string | **Choices:*** wep40 * wep104 * tkip * ccmp | A list of group/broadcast encryption algorithms which prevents connections to Wi-Fi networks that do not utilize one of the algorithms in the list. For maximum compatibility leave this property empty. | | | **key-mgmt** string | **Choices:*** none * ieee8021x * owe * wpa-psk * sae * wpa-eap * wpa-eap-suite-b-192 | Key management used for the connection. One of `none` (WEP or no password protection), `ieee8021x` (Dynamic WEP), `owe` (Opportunistic Wireless Encryption), `wpa-psk` (WPA2 + WPA3 personal), `sae` (WPA3 personal only), `wpa-eap` (WPA2 + WPA3 enterprise) or `wpa-eap-suite-b-192` (WPA3 enterprise only). This property must be set for any Wi-Fi connection that uses security. | | | **leap-password** string | | The login password for legacy LEAP connections (that is, if *key-mgmt=ieee8021x* and *auth-alg=leap*). | | | **leap-password-flags** list / elements=integer | | Flags indicating how to handle the *leap-password* property. | | | **leap-username** string | | The login username for legacy LEAP connections (that is, if *key-mgmt=ieee8021x* and *auth-alg=leap*). | | | **pairwise** list / elements=string | **Choices:*** tkip * ccmp | A list of pairwise encryption algorithms which prevents connections to Wi-Fi networks that do not utilize one of the algorithms in the list. For maximum compatibility leave this property empty. | | | **pmf** integer | **Choices:*** 0 * 1 * 2 * 3 **Default:**0 | Indicates whether Protected Management Frames (802.11w) must be enabled for the connection. One of `0` (use global default value), `1` (disable PMF), `2` (enable PMF if the supplicant and the access point support it) or `3` (enable PMF and fail if not supported). When set to `0` and no global default is set, PMF will be optionally enabled. | | | **proto** list / elements=string | **Choices:*** wpa * rsn | List of strings specifying the allowed WPA protocol versions to use. Each element may be `wpa` (allow WPA) or `rsn` (allow WPA2/RSN). If not specified, both WPA and RSN connections are allowed. | | | **psk** string | | Pre-Shared-Key for WPA networks. For WPA-PSK, it is either an ASCII passphrase of 8 to 63 characters that is (as specified in the 802.11i standard) hashed to derive the actual key, or the key in form of 64 hexadecimal character. The WPA3-Personal networks use a passphrase of any length for SAE authentication. | | | **psk-flags** list / elements=integer | | Flags indicating how to handle the *psk* property. | | | **wep-key-flags** list / elements=integer | | Flags indicating how to handle the *wep-key0*, *wep-key1*, *wep-key2*, and *wep-key3* properties. | | | **wep-key-type** integer | **Choices:*** 1 * 2 | Controls the interpretation of WEP keys. Allowed values are `1`, in which case the key is either a 10- or 26-character hexadecimal string, or a 5- or 13-character ASCII password; or `2`, in which case the passphrase is provided as a string and will be hashed using the de-facto MD5 method to derive the actual WEP key. | | | **wep-key0** string | | Index 0 WEP key. This is the WEP key used in most networks. See the *wep-key-type* property for a description of how this key is interpreted. | | | **wep-key1** string | | Index 1 WEP key. This WEP index is not used by most networks. See the *wep-key-type* property for a description of how this key is interpreted. | | | **wep-key2** string | | Index 2 WEP key. This WEP index is not used by most networks. See the *wep-key-type* property for a description of how this key is interpreted. | | | **wep-key3** string | | Index 3 WEP key. This WEP index is not used by most networks. See the *wep-key-type* property for a description of how this key is interpreted. | | | **wep-tx-keyidx** integer | **Choices:*** 0 * 1 * 2 * 3 **Default:**0 | When static WEP is used (that is, if *key-mgmt=none*) and a non-default WEP key index is used by the AP, put that WEP key index here. Valid values are `0` (default key) through `3`. Note that some consumer access points (like the Linksys WRT54G) number the keys `1` - `4`. | | | **wps-method** integer | **Default:**0 | Flags indicating which mode of WPS is to be used if any. There is little point in changing the default setting as NetworkManager will automatically determine whether it is feasible to start WPS enrollment from the Access Point capabilities. WPS can be disabled by setting this property to a value of `1`. | | **zone** string added in 2.0.0 of community.general | | The trust level of the connection. When updating this property on a currently activated connection, the change takes effect immediately. | Examples -------- ``` # These examples are using the following inventory: # # ## Directory layout: # # |_/inventory/cloud-hosts # | /group_vars/openstack-stage.yml # | /host_vars/controller-01.openstack.host.com # | /host_vars/controller-02.openstack.host.com # |_/playbook/library/nmcli.py # | /playbook-add.yml # | /playbook-del.yml # ``` # # ## inventory examples # ### groups_vars # ```yml # --- # #devops_os_define_network # storage_gw: "192.0.2.254" # external_gw: "198.51.100.254" # tenant_gw: "203.0.113.254" # # #Team vars # nmcli_team: # - conn_name: tenant # ip4: '{{ tenant_ip }}' # gw4: '{{ tenant_gw }}' # - conn_name: external # ip4: '{{ external_ip }}' # gw4: '{{ external_gw }}' # - conn_name: storage # ip4: '{{ storage_ip }}' # gw4: '{{ storage_gw }}' # nmcli_team_slave: # - conn_name: em1 # ifname: em1 # master: tenant # - conn_name: em2 # ifname: em2 # master: tenant # - conn_name: p2p1 # ifname: p2p1 # master: storage # - conn_name: p2p2 # ifname: p2p2 # master: external # # #bond vars # nmcli_bond: # - conn_name: tenant # ip4: '{{ tenant_ip }}' # gw4: '' # mode: balance-rr # - conn_name: external # ip4: '{{ external_ip }}' # gw4: '' # mode: balance-rr # - conn_name: storage # ip4: '{{ storage_ip }}' # gw4: '{{ storage_gw }}' # mode: balance-rr # nmcli_bond_slave: # - conn_name: em1 # ifname: em1 # master: tenant # - conn_name: em2 # ifname: em2 # master: tenant # - conn_name: p2p1 # ifname: p2p1 # master: storage # - conn_name: p2p2 # ifname: p2p2 # master: external # # #ethernet vars # nmcli_ethernet: # - conn_name: em1 # ifname: em1 # ip4: '{{ tenant_ip }}' # gw4: '{{ tenant_gw }}' # - conn_name: em2 # ifname: em2 # ip4: '{{ tenant_ip1 }}' # gw4: '{{ tenant_gw }}' # - conn_name: p2p1 # ifname: p2p1 # ip4: '{{ storage_ip }}' # gw4: '{{ storage_gw }}' # - conn_name: p2p2 # ifname: p2p2 # ip4: '{{ external_ip }}' # gw4: '{{ external_gw }}' # ``` # # ### host_vars # ```yml # --- # storage_ip: "192.0.2.91/23" # external_ip: "198.51.100.23/21" # tenant_ip: "203.0.113.77/23" # ``` ## playbook-add.yml example --- - hosts: openstack-stage remote_user: root tasks: - name: Install needed network manager libs ansible.builtin.package: name: - NetworkManager-libnm - nm-connection-editor - libsemanage-python - policycoreutils-python state: present ##### Working with all cloud nodes - Teaming - name: Try nmcli add team - conn_name only & ip4 gw4 community.general.nmcli: type: team conn_name: '{{ item.conn_name }}' ip4: '{{ item.ip4 }}' gw4: '{{ item.gw4 }}' state: present with_items: - '{{ nmcli_team }}' - name: Try nmcli add teams-slave community.general.nmcli: type: team-slave conn_name: '{{ item.conn_name }}' ifname: '{{ item.ifname }}' master: '{{ item.master }}' state: present with_items: - '{{ nmcli_team_slave }}' ###### Working with all cloud nodes - Bonding - name: Try nmcli add bond - conn_name only & ip4 gw4 mode community.general.nmcli: type: bond conn_name: '{{ item.conn_name }}' ip4: '{{ item.ip4 }}' gw4: '{{ item.gw4 }}' mode: '{{ item.mode }}' state: present with_items: - '{{ nmcli_bond }}' - name: Try nmcli add bond-slave community.general.nmcli: type: bond-slave conn_name: '{{ item.conn_name }}' ifname: '{{ item.ifname }}' master: '{{ item.master }}' state: present with_items: - '{{ nmcli_bond_slave }}' ##### Working with all cloud nodes - Ethernet - name: Try nmcli add Ethernet - conn_name only & ip4 gw4 community.general.nmcli: type: ethernet conn_name: '{{ item.conn_name }}' ip4: '{{ item.ip4 }}' gw4: '{{ item.gw4 }}' state: present with_items: - '{{ nmcli_ethernet }}' ## playbook-del.yml example - hosts: openstack-stage remote_user: root tasks: - name: Try nmcli del team - multiple community.general.nmcli: conn_name: '{{ item.conn_name }}' state: absent with_items: - conn_name: em1 - conn_name: em2 - conn_name: p1p1 - conn_name: p1p2 - conn_name: p2p1 - conn_name: p2p2 - conn_name: tenant - conn_name: storage - conn_name: external - conn_name: team-em1 - conn_name: team-em2 - conn_name: team-p1p1 - conn_name: team-p1p2 - conn_name: team-p2p1 - conn_name: team-p2p2 - name: Add an Ethernet connection with static IP configuration community.general.nmcli: conn_name: my-eth1 ifname: eth1 type: ethernet ip4: 192.0.2.100/24 gw4: 192.0.2.1 state: present - name: Add an Team connection with static IP configuration community.general.nmcli: conn_name: my-team1 ifname: my-team1 type: team ip4: 192.0.2.100/24 gw4: 192.0.2.1 state: present autoconnect: yes - name: Optionally, at the same time specify IPv6 addresses for the device community.general.nmcli: conn_name: my-eth1 ifname: eth1 type: ethernet ip4: 192.0.2.100/24 gw4: 192.0.2.1 ip6: 2001:db8::cafe gw6: 2001:db8::1 state: present - name: Add two IPv4 DNS server addresses community.general.nmcli: conn_name: my-eth1 type: ethernet dns4: - 192.0.2.53 - 198.51.100.53 state: present - name: Make a profile usable for all compatible Ethernet interfaces community.general.nmcli: ctype: ethernet name: my-eth1 ifname: '*' state: present - name: Change the property of a setting e.g. MTU community.general.nmcli: conn_name: my-eth1 mtu: 9000 type: ethernet state: present - name: Add VxLan community.general.nmcli: type: vxlan conn_name: vxlan_test1 vxlan_id: 16 vxlan_local: 192.168.1.2 vxlan_remote: 192.168.1.5 - name: Add gre community.general.nmcli: type: gre conn_name: gre_test1 ip_tunnel_dev: eth0 ip_tunnel_local: 192.168.1.2 ip_tunnel_remote: 192.168.1.5 - name: Add ipip community.general.nmcli: type: ipip conn_name: ipip_test1 ip_tunnel_dev: eth0 ip_tunnel_local: 192.168.1.2 ip_tunnel_remote: 192.168.1.5 - name: Add sit community.general.nmcli: type: sit conn_name: sit_test1 ip_tunnel_dev: eth0 ip_tunnel_local: 192.168.1.2 ip_tunnel_remote: 192.168.1.5 - name: Add zone community.general.nmcli: type: ethernet conn_name: my-eth1 zone: external state: present # nmcli exits with status 0 if it succeeds and exits with a status greater # than zero when there is a failure. The following list of status codes may be # returned: # # - 0 Success - indicates the operation succeeded # - 1 Unknown or unspecified error # - 2 Invalid user input, wrong nmcli invocation # - 3 Timeout expired (see --wait option) # - 4 Connection activation failed # - 5 Connection deactivation failed # - 6 Disconnecting device failed # - 7 Connection deletion failed # - 8 NetworkManager is not running # - 9 nmcli and NetworkManager versions mismatch # - 10 Connection, device, or access point does not exist. - name: Create the wifi connection community.general.nmcli: type: wifi conn_name: Brittany ifname: wlp4s0 ssid: Brittany wifi_sec: key-mgmt: wpa-psk psk: my_password autoconnect: true state: present - name: Create a hidden AP mode wifi connection community.general.nmcli: type: wifi conn_name: ChocoMaster ifname: wlo1 ssid: ChocoMaster wifi: hidden: true mode: ap autoconnect: true state: present - name: Create a gsm connection community.general.nmcli: type: gsm conn_name: my-gsm-provider ifname: cdc-wdm0 gsm: apn: my.provider.apn username: my-provider-username password: my-provider-password pin: my-sim-pin autoconnect: true state: present ``` ### Authors * Chris Long (@alcamie101)
programming_docs
ansible community.general.icinga2 – Icinga2 inventory source community.general.icinga2 – Icinga2 inventory source ==================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.icinga2`. New in version 3.7.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Get inventory hosts from the Icinga2 API. * Uses a configuration file as an inventory source, it must end in `.icinga2.yml` or `.icinga2.yaml`. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **host\_filter** string | | | An Icinga2 API valid host filter. | | **password** string / required | | | Password to query the API. | | **plugin** string / required | **Choices:*** community.general.icinga2 | | Name of the plugin. | | **url** string / required | | | Root URL of Icinga2 API. | | **user** string / required | | | Username to query the API. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | | Enables or disables SSL certificate verification. | Examples -------- ``` # my.icinga2.yml plugin: community.general.icinga2 url: http://localhost:5665 user: ansible password: secure host_filter: \"linux-servers\" in host.groups validate_certs: false ``` ### Authors * Cliff Hults (@BongoEADGC6) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#a4c7c8cdc2c2828790929fccd1c8d0d7828797939f828791969f8287909c9fc3c9c5cdc8828790929fc7cbc9)> ansible community.general.vexata_volume – Manage volumes on Vexata VX100 storage arrays community.general.vexata\_volume – Manage volumes on Vexata VX100 storage arrays ================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.vexata_volume`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Create, deletes or extend volumes on a Vexata VX100 array. Requirements ------------ The below requirements are needed on the host that executes this module. * Vexata VX100 storage array with VXOS >= v3.5.0 on storage array * vexatapi >= 0.0.1 * python >= 2.7 * VEXATA\_USER and VEXATA\_PASSWORD environment variables must be set if user and password arguments are not passed to the module directly. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **array** string / required | | Vexata VX100 array hostname or IPv4 Address. | | **name** string / required | | Volume name. | | **password** string | | Vexata API user password. | | **size** string | | Volume size in M, G, T units. M=2^20, G=2^30, T=2^40 bytes. | | **state** string | **Choices:*** **present** ← * absent | Creates/Modifies volume when present or removes when absent. | | **user** string | | Vexata API user with administrative privileges. | | **validate\_certs** boolean | **Choices:*** **no** ← * yes | Allows connection when SSL certificates are not valid. Set to `false` when certificates are not trusted. If set to `yes`, please make sure Python >= 2.7.9 is installed on the given machine. | Examples -------- ``` - name: Create new 2 TiB volume named foo community.general.vexata_volume: name: foo size: 2T state: present array: vx100_ultra.test.com user: admin password: secret - name: Expand volume named foo to 4 TiB community.general.vexata_volume: name: foo size: 4T state: present array: vx100_ultra.test.com user: admin password: secret - name: Delete volume named foo community.general.vexata_volume: name: foo state: absent array: vx100_ultra.test.com user: admin password: secret ``` ### Authors * Sandeep Kasargod (@vexata) ansible community.general.scaleway_lb – Scaleway load-balancer management module community.general.scaleway\_lb – Scaleway load-balancer management module ========================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.scaleway_lb`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module manages load-balancers on Scaleway. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_timeout** integer | **Default:**30 | HTTP timeout to Scaleway API in seconds. aliases: timeout | | **api\_token** string / required | | Scaleway OAuth token. aliases: oauth\_token | | **api\_url** string | **Default:**"https://api.scaleway.com" | Scaleway API URL. aliases: base\_url | | **description** string / required | | Description of the load-balancer | | **name** string / required | | Name of the load-balancer | | **organization\_id** string / required | | Organization identifier | | **query\_parameters** dictionary | **Default:**{} | List of parameters passed to the query string. | | **region** string / required | **Choices:*** nl-ams * fr-par * pl-waw | Scaleway zone | | **state** string | **Choices:*** **present** ← * absent | Indicate desired state of the instance. | | **tags** list / elements=string | | List of tags to apply to the load-balancer | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Validate SSL certs of the Scaleway API. | | **wait** boolean | **Choices:*** **no** ← * yes | Wait for the load-balancer to reach its desired state before returning. | | **wait\_sleep\_time** integer | **Default:**3 | Time to wait before every attempt to check the state of the load-balancer | | **wait\_timeout** integer | **Default:**300 | Time to wait for the load-balancer to reach the expected state | Notes ----- Note * Also see the API documentation on <https://developer.scaleway.com/> * If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `SCW_TOKEN`, `SCW_API_KEY`, `SCW_OAUTH_TOKEN` or `SCW_API_TOKEN`. * If one wants to use a different `api_url` one can also set the `SCW_API_URL` environment variable. Examples -------- ``` - name: Create a load-balancer community.general.scaleway_lb: name: foobar state: present organization_id: 951df375-e094-4d26-97c1-ba548eeb9c42 region: fr-par tags: - hello - name: Delete a load-balancer community.general.scaleway_lb: name: foobar state: absent organization_id: 951df375-e094-4d26-97c1-ba548eeb9c42 region: fr-par ``` ### Authors * Remy Leone (@sieben) ansible community.general.oneview_ethernet_network – Manage OneView Ethernet Network resources community.general.oneview\_ethernet\_network – Manage OneView Ethernet Network resources ======================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneview_ethernet_network`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Provides an interface to manage Ethernet Network resources. Can create, update, or delete. Requirements ------------ The below requirements are needed on the host that executes this module. * hpOneView >= 3.1.0 * python >= 2.7.9 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_version** integer | | OneView API Version. | | **config** path | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional and when used should be present in the host running the ansible commands. If the file path is not provided, the configuration will be loaded from environment variables. For links to example configuration files or how to use the environment variables verify the notes section. | | **data** dictionary / required | | List with Ethernet Network properties. | | **hostname** string | | IP address or hostname for the appliance. | | **image\_streamer\_hostname** string | | IP address or hostname for the HPE Image Streamer REST API. | | **password** string | | Password for API authentication. | | **state** string | **Choices:*** **present** ← * absent * default\_bandwidth\_reset | Indicates the desired state for the Ethernet Network resource. - `present` will ensure data properties are compliant with OneView. - `absent` will remove the resource from OneView, if it exists. - `default_bandwidth_reset` will reset the network connection template to the default. | | **username** string | | Username for API authentication. | | **validate\_etag** boolean | **Choices:*** no * **yes** ← | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. | Notes ----- Note * A sample configuration file for the config parameter can be found at: <https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json> * Check how to use environment variables for configuration at: <https://github.com/HewlettPackard/oneview-ansible#environment-variables> * Additional Playbooks for the HPE OneView Ansible modules can be found at: <https://github.com/HewlettPackard/oneview-ansible/tree/master/examples> * The OneView API version used will directly affect returned and expected fields in resources. Information on setting the desired API version and can be found at: <https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version> Examples -------- ``` - name: Ensure that the Ethernet Network is present using the default configuration community.general.oneview_ethernet_network: config: '/etc/oneview/oneview_config.json' state: present data: name: 'Test Ethernet Network' vlanId: '201' delegate_to: localhost - name: Update the Ethernet Network changing bandwidth and purpose community.general.oneview_ethernet_network: config: '/etc/oneview/oneview_config.json' state: present data: name: 'Test Ethernet Network' purpose: Management bandwidth: maximumBandwidth: 3000 typicalBandwidth: 2000 delegate_to: localhost - name: Ensure that the Ethernet Network is present with name 'Renamed Ethernet Network' community.general.oneview_ethernet_network: config: '/etc/oneview/oneview_config.json' state: present data: name: 'Test Ethernet Network' newName: 'Renamed Ethernet Network' delegate_to: localhost - name: Ensure that the Ethernet Network is absent community.general.oneview_ethernet_network: config: '/etc/oneview/oneview_config.json' state: absent data: name: 'New Ethernet Network' delegate_to: localhost - name: Create Ethernet networks in bulk community.general.oneview_ethernet_network: config: '/etc/oneview/oneview_config.json' state: present data: vlanIdRange: '1-10,15,17' purpose: General namePrefix: TestNetwork smartLink: false privateNetwork: false bandwidth: maximumBandwidth: 10000 typicalBandwidth: 2000 delegate_to: localhost - name: Reset to the default network connection template community.general.oneview_ethernet_network: config: '/etc/oneview/oneview_config.json' state: default_bandwidth_reset data: name: 'Test Ethernet Network' delegate_to: localhost ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **ethernet\_network** dictionary | On state 'present'. Can be null. | Has the facts about the Ethernet Networks. | | **ethernet\_network\_bulk** dictionary | When 'vlanIdRange' attribute is in data argument. Can be null. | Has the facts about the Ethernet Networks affected by the bulk insert. | | **ethernet\_network\_connection\_template** dictionary | On state 'default\_bandwidth\_reset'. Can be null. | Has the facts about the Ethernet Network Connection Template. | ### Authors * Felipe Bulsoni (@fgbulsoni) * Thiago Miotto (@tmiotto) * Adriane Cardozo (@adriane-cardozo) ansible community.general.memset_zone_domain – Create and delete domains in Memset DNS zones. community.general.memset\_zone\_domain – Create and delete domains in Memset DNS zones. ======================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.memset_zone_domain`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage DNS zone domains in a Memset account. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string / required | | The API key obtained from the Memset control panel. | | **domain** string / required | | The zone domain name. Ensure this value has at most 250 characters. aliases: name | | **state** string | **Choices:*** absent * **present** ← | Indicates desired state of resource. | | **zone** string / required | | The zone to add the domain to (this must already exist). | Notes ----- Note * Zone domains can be thought of as a collection of domains, all of which share the same DNS records (i.e. they point to the same IP). An API key generated via the Memset customer control panel is needed with the following minimum scope - *dns.zone\_domain\_create*, *dns.zone\_domain\_delete*, *dns.zone\_domain\_list*. * Currently this module can only create one domain at a time. Multiple domains should be created using `with_items`. Examples -------- ``` # Create the zone domain 'test.com' - name: Create zone domain community.general.memset_zone_domain: domain: test.com zone: testzone state: present api_key: 5eb86c9196ab03919abcf03857163741 delegate_to: localhost ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **memset\_api** complex | when changed or state == present | Domain info from the Memset API | | | **domain** string | always | Domain name **Sample:** example.com | | | **id** string | always | Domain ID **Sample:** b0bb1ce851aeea6feeb2dc32fe83bf9c | ### Authors * Simon Weald (@glitchcrab) ansible community.general.statsd – Send metrics to StatsD community.general.statsd – Send metrics to StatsD ================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.statsd`. New in version 2.1.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * The `statsd` module sends metrics to StatsD. * For more information, see <https://statsd-metrics.readthedocs.io/en/latest/>. * Supported metric types are `counter` and `gauge`. Currently unupported metric types are `timer`, `set`, and `gaugedelta`. Requirements ------------ The below requirements are needed on the host that executes this module. * statsd Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **delta** boolean | **Choices:*** **no** ← * yes | If the metric is of type `gauge`, change the value by `delta`. | | **host** string | **Default:**"localhost" | StatsD host (hostname or IP) to send metrics to. | | **metric** string / required | | The name of the metric. | | **metric\_prefix** string | | The prefix to add to the metric. | | **metric\_type** string / required | **Choices:*** counter * gauge | The type of metric. | | **port** integer | **Default:**8125 | The port on `host` which StatsD is listening on. | | **protocol** string | **Choices:*** **udp** ← * tcp | The transport protocol to send metrics over. | | **state** string | **Choices:*** **present** ← | State of the check, only `present` makes sense. | | **timeout** float | **Default:**1.0 | Sender timeout, only applicable if `protocol` is `tcp`. | | **value** integer / required | | The value of the metric. | Examples -------- ``` - name: Increment the metric my_counter by 1 community.general.statsd: host: localhost port: 9125 protocol: tcp metric: my_counter metric_type: counter value: 1 - name: Set the gauge my_gauge to 7 community.general.statsd: host: localhost port: 9125 protocol: tcp metric: my_gauge metric_type: gauge value: 7 ``` ### Authors * Mark Mercado (@mamercad) ansible community.general.datadog_event – Posts events to Datadog service community.general.datadog\_event – Posts events to Datadog service ================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.datadog_event`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Allows to post events to Datadog (www.datadoghq.com) service. * Uses <http://docs.datadoghq.com/api/#events> API. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **aggregation\_key** string | | An arbitrary string to use for aggregation. | | **alert\_type** string | **Choices:*** error * warning * **info** ← * success | Type of alert. | | **api\_host** string added in 3.3.0 of community.general | | DataDog API endpoint URL. | | **api\_key** string / required | | Your DataDog API key. | | **app\_key** string / required | | Your DataDog app key. | | **date\_happened** integer | | POSIX timestamp of the event. Default value is now. | | **host** string | | Host name to associate with the event. If not specified, it defaults to the remote system's hostname. | | **priority** string | **Choices:*** **normal** ← * low | The priority of the event. | | **tags** list / elements=string | | Comma separated list of tags to apply to the event. | | **text** string / required | | The body of the event. | | **title** string / required | | The event title. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Post an event with low priority community.general.datadog_event: title: Testing from ansible text: Test priority: low api_key: 9775a026f1ca7d1c6c5af9d94d9595a4 app_key: j4JyCYfefWHhgFgiZUqRm63AXHNZQyPGBfJtAzmN - name: Post an event with several tags community.general.datadog_event: title: Testing from ansible text: Test api_key: 9775a026f1ca7d1c6c5af9d94d9595a4 app_key: j4JyCYfefWHhgFgiZUqRm63AXHNZQyPGBfJtAzmN tags: 'aa,bb,#host:{{ inventory_hostname }}' - name: Post an event with several tags to another endpoint community.general.datadog_event: title: Testing from ansible text: Test api_key: 9775a026f1ca7d1c6c5af9d94d9595a4 app_key: j4JyCYfefWHhgFgiZUqRm63AXHNZQyPGBfJtAzmN api_host: 'https://example.datadoghq.eu' tags: - aa - b - '#host:{{ inventory_hostname }}' ``` ### Authors * Artūras `arturaz` Šlajus (@arturaz) * Naoya Nakazawa (@n0ts)
programming_docs
ansible community.general.github_repo – Manage your repositories on Github community.general.github\_repo – Manage your repositories on Github =================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.github_repo`. New in version 2.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages Github repositories using PyGithub library. * Authentication can be done with *access\_token* or with *username* and *password*. Requirements ------------ The below requirements are needed on the host that executes this module. * PyGithub>=1.54 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **access\_token** string | | Token parameter for authentication. This is only needed when not using *username* and *password*. | | **api\_url** string added in 3.5.0 of community.general | **Default:**"https://api.github.com" | URL to the GitHub API if not using github.com but you own instance. | | **description** string | **Default:**"" | Description for the repository. This is only used when *state* is `present`. | | **name** string / required | | Repository name. | | **organization** string | | Organization for the repository. When *state* is `present`, the repository will be created in the current user profile. | | **password** string | | Password used for authentication. This is only needed when not using *access\_token*. | | **private** boolean | **Choices:*** **no** ← * yes | Whether the new repository should be private or not. This is only used when *state* is `present`. | | **state** string | **Choices:*** absent * **present** ← | Whether the repository should exist or not. | | **username** string | | Username used for authentication. This is only needed when not using *access\_token*. | Notes ----- Note * For Python 3, PyGithub>=1.54 should be used. * For Python 3.5, PyGithub==1.54 should be used. More information: <https://pygithub.readthedocs.io/en/latest/changes.html#version-1-54-november-30-2020>. * For Python 2.7, PyGithub==1.45 should be used. More information: <https://pygithub.readthedocs.io/en/latest/changes.html#version-1-45-december-29-2019>. * Supports `check_mode`. Examples -------- ``` - name: Create a Github repository community.general.github_repo: access_token: mytoken organization: MyOrganization name: myrepo description: "Just for fun" private: yes state: present register: result - name: Delete the repository community.general.github_repo: username: octocat password: password organization: MyOrganization name: myrepo state: absent register: result ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **repo** dictionary | success and *state* is `present` | Repository information as JSON. See <https://docs.github.com/en/rest/reference/repos#get-a-repository>. | ### Authors * Álvaro Torres Cogollo (@atorrescogollo) ansible community.general.jboss – Deploy applications to JBoss community.general.jboss – Deploy applications to JBoss ====================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.jboss`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) Synopsis -------- * Deploy applications to JBoss standalone using the filesystem. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **deploy\_path** path | **Default:**"/var/lib/jbossas/standalone/deployments" | The location in the filesystem where the deployment scanner listens. | | **deployment** string / required | | The name of the deployment. | | **src** path | | The remote path of the application ear or war to deploy. Required when *state=present*. Ignored when *state=absent*. | | **state** string | **Choices:*** **present** ← * absent | Whether the application should be deployed or undeployed. | Notes ----- Note * The JBoss standalone deployment-scanner has to be enabled in standalone.xml * The module can wait until *deployment* file is deployed/undeployed by deployment-scanner. Duration of waiting time depends on scan-interval parameter from standalone.xml. * Ensure no identically named application is deployed through the JBoss CLI See Also -------- See also [WildFly reference](https://docs.wildfly.org) Complete reference of the WildFly documentation. Examples -------- ``` - name: Deploy a hello world application to the default deploy_path community.general.jboss: src: /tmp/hello-1.0-SNAPSHOT.war deployment: hello.war state: present - name: Update the hello world application to the non-default deploy_path community.general.jboss: src: /tmp/hello-1.1-SNAPSHOT.war deploy_path: /opt/wildfly/deployment deployment: hello.war state: present - name: Undeploy the hello world application from the default deploy_path community.general.jboss: deployment: hello.war state: absent ``` ### Authors * Jeroen Hoekx (@jhoekx) ansible community.general.oneview_enclosure_info – Retrieve information about one or more Enclosures community.general.oneview\_enclosure\_info – Retrieve information about one or more Enclosures ============================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneview_enclosure_info`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Retrieve information about one or more of the Enclosures from OneView. * This module was called `oneview_enclosure_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [community.general.oneview\_enclosure\_info](#ansible-collections-community-general-oneview-enclosure-info-module) module no longer returns `ansible_facts`! Requirements ------------ The below requirements are needed on the host that executes this module. * hpOneView >= 2.0.1 * python >= 2.7.9 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_version** integer | | OneView API Version. | | **config** path | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional and when used should be present in the host running the ansible commands. If the file path is not provided, the configuration will be loaded from environment variables. For links to example configuration files or how to use the environment variables verify the notes section. | | **hostname** string | | IP address or hostname for the appliance. | | **image\_streamer\_hostname** string | | IP address or hostname for the HPE Image Streamer REST API. | | **name** string | | Enclosure name. | | **options** list / elements=raw | | List with options to gather additional information about an Enclosure and related resources. Options allowed: `script`, `environmentalConfiguration`, and `utilization`. For the option `utilization`, you can provide specific parameters. | | **params** dictionary | | List of params to delimit, filter and sort the list of resources. params allowed: - `start`: The first item to return, using 0-based indexing. - `count`: The number of resources to return. - `filter`: A general filter/query string to narrow the list of items returned. - `sort`: The sort order of the returned data set. | | **password** string | | Password for API authentication. | | **username** string | | Username for API authentication. | Notes ----- Note * A sample configuration file for the config parameter can be found at: <https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json> * Check how to use environment variables for configuration at: <https://github.com/HewlettPackard/oneview-ansible#environment-variables> * Additional Playbooks for the HPE OneView Ansible modules can be found at: <https://github.com/HewlettPackard/oneview-ansible/tree/master/examples> * The OneView API version used will directly affect returned and expected fields in resources. Information on setting the desired API version and can be found at: <https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version> Examples -------- ``` - name: Gather information about all Enclosures community.general.oneview_enclosure_info: hostname: 172.16.101.48 username: administrator password: my_password api_version: 500 no_log: true delegate_to: localhost register: result - name: Print fetched information about Enclosures ansible.builtin.debug: msg: "{{ result.enclosures }}" - name: Gather paginated, filtered and sorted information about Enclosures community.general.oneview_enclosure_info: params: start: 0 count: 3 sort: name:descending filter: status=OK hostname: 172.16.101.48 username: administrator password: my_password api_version: 500 no_log: true delegate_to: localhost register: result - name: Print fetched information about paginated, filtered ans sorted list of Enclosures ansible.builtin.debug: msg: "{{ result.enclosures }}" - name: Gather information about an Enclosure by name community.general.oneview_enclosure_info: name: Enclosure-Name hostname: 172.16.101.48 username: administrator password: my_password api_version: 500 no_log: true delegate_to: localhost register: result - name: Print fetched information about Enclosure found by name ansible.builtin.debug: msg: "{{ result.enclosures }}" - name: Gather information about an Enclosure by name with options community.general.oneview_enclosure_info: name: Test-Enclosure options: - script # optional - environmentalConfiguration # optional - utilization # optional hostname: 172.16.101.48 username: administrator password: my_password api_version: 500 no_log: true delegate_to: localhost register: result - name: Print fetched information about Enclosure found by name ansible.builtin.debug: msg: "{{ result.enclosures }}" - name: Print fetched information about Enclosure Script ansible.builtin.debug: msg: "{{ result.enclosure_script }}" - name: Print fetched information about Enclosure Environmental Configuration ansible.builtin.debug: msg: "{{ result.enclosure_environmental_configuration }}" - name: Print fetched information about Enclosure Utilization ansible.builtin.debug: msg: "{{ result.enclosure_utilization }}" - name: "Gather information about an Enclosure with temperature data at a resolution of one sample per day, between two specified dates" community.general.oneview_enclosure_info: name: Test-Enclosure options: - utilization: # optional fields: AmbientTemperature filter: - startDate=2016-07-01T14:29:42.000Z - endDate=2017-07-01T03:29:42.000Z view: day refresh: false hostname: 172.16.101.48 username: administrator password: my_password api_version: 500 no_log: true delegate_to: localhost register: result - name: Print fetched information about Enclosure found by name ansible.builtin.debug: msg: "{{ result.enclosures }}" - name: Print fetched information about Enclosure Utilization ansible.builtin.debug: msg: "{{ result.enclosure_utilization }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **enclosure\_environmental\_configuration** dictionary | When requested, but can be null. | Has all the OneView information about the environmental configuration of an Enclosure. | | **enclosure\_script** string | When requested, but can be null. | Has all the OneView information about the script of an Enclosure. | | **enclosure\_utilization** dictionary | When requested, but can be null. | Has all the OneView information about the utilization of an Enclosure. | | **enclosures** dictionary | Always, but can be null. | Has all the OneView information about the Enclosures. | ### Authors * Felipe Bulsoni (@fgbulsoni) * Thiago Miotto (@tmiotto) * Adriane Cardozo (@adriane-cardozo) ansible community.general.logentries – Module for tracking logs via logentries.com community.general.logentries – Module for tracking logs via logentries.com ========================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.logentries`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Sends logs to LogEntries in realtime Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **logtype** string | | type of the log aliases: type | | **name** string | | name of the log | | **path** string / required | | path to a log file | | **state** string | **Choices:*** **present** ← * absent * followed * unfollowed | following state of the log | Notes ----- Note * Requires the LogEntries agent which can be installed following the instructions at logentries.com Examples -------- ``` - name: Track nginx logs community.general.logentries: path: /var/log/nginx/access.log state: present name: nginx-access-log - name: Stop tracking nginx logs community.general.logentries: path: /var/log/nginx/error.log state: absent ``` ### Authors * Ivan Vanderbyl (@ivanvanderbyl) ansible community.general.iso_extract – Extract files from an ISO image community.general.iso\_extract – Extract files from an ISO image ================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.iso_extract`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module has two possible ways of operation. * If 7zip is installed on the system, this module extracts files from an ISO into a temporary directory and copies files to a given destination, if needed. * If the user has mount-capabilities (CAP\_SYS\_ADMIN on Linux) this module mounts the ISO image to a temporary location, and copies files to a given destination, if needed. Requirements ------------ The below requirements are needed on the host that executes this module. * Either 7z (from *7zip* or *p7zip* package) * Or mount capabilities (root-access, or CAP\_SYS\_ADMIN capability on Linux) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **dest** path / required | | The destination directory to extract files to. | | **executable** path | | The path to the `7z` executable to use for extracting files from the ISO. If not provided, it will assume the value `7z`. | | **files** list / elements=string / required | | A list of files to extract from the image. Extracting directories does not work. | | **force** boolean | **Choices:*** no * **yes** ← | If `yes`, which will replace the remote file when contents are different than the source. If `no`, the file will only be extracted and copied if the destination does not already exist. | | **image** path / required | | The ISO image to extract files from. aliases: path, src | Notes ----- Note * Only the file checksum (content) is taken into account when extracting files from the ISO image. If `force=no`, only checks the presence of the file. * In Ansible 2.3 this module was using `mount` and `umount` commands only, requiring root access. This is no longer needed with the introduction of 7zip for extraction. Examples -------- ``` - name: Extract kernel and ramdisk from a LiveCD community.general.iso_extract: image: /tmp/rear-test.iso dest: /tmp/virt-rear/ files: - isolinux/kernel - isolinux/initrd.cgz ``` ### Authors * Jeroen Hoekx (@jhoekx) * Matt Robinson (@ribbons) * Dag Wieers (@dagwieers) ansible community.general.oneview_san_manager – Manage OneView SAN Manager resources community.general.oneview\_san\_manager – Manage OneView SAN Manager resources ============================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneview_san_manager`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Provides an interface to manage SAN Manager resources. Can create, update, or delete. Requirements ------------ The below requirements are needed on the host that executes this module. * hpOneView >= 3.1.1 * python >= 2.7.9 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_version** integer | | OneView API Version. | | **config** path | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional and when used should be present in the host running the ansible commands. If the file path is not provided, the configuration will be loaded from environment variables. For links to example configuration files or how to use the environment variables verify the notes section. | | **data** dictionary / required | | List with SAN Manager properties. | | **hostname** string | | IP address or hostname for the appliance. | | **image\_streamer\_hostname** string | | IP address or hostname for the HPE Image Streamer REST API. | | **password** string | | Password for API authentication. | | **state** string | **Choices:*** **present** ← * absent * connection\_information\_set | Indicates the desired state for the Uplink Set resource. - `present` ensures data properties are compliant with OneView. - `absent` removes the resource from OneView, if it exists. - `connection_information_set` updates the connection information for the SAN Manager. This operation is non-idempotent. | | **username** string | | Username for API authentication. | | **validate\_etag** boolean | **Choices:*** no * **yes** ← | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. | Notes ----- Note * A sample configuration file for the config parameter can be found at: <https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json> * Check how to use environment variables for configuration at: <https://github.com/HewlettPackard/oneview-ansible#environment-variables> * Additional Playbooks for the HPE OneView Ansible modules can be found at: <https://github.com/HewlettPackard/oneview-ansible/tree/master/examples> * The OneView API version used will directly affect returned and expected fields in resources. Information on setting the desired API version and can be found at: <https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version> Examples -------- ``` - name: Creates a Device Manager for the Brocade SAN provider with the given hostname and credentials community.general.oneview_san_manager: config: /etc/oneview/oneview_config.json state: present data: providerDisplayName: Brocade Network Advisor connectionInfo: - name: Host value: 172.18.15.1 - name: Port value: 5989 - name: Username value: username - name: Password value: password - name: UseSsl value: true delegate_to: localhost - name: Ensure a Device Manager for the Cisco SAN Provider is present community.general.oneview_san_manager: config: /etc/oneview/oneview_config.json state: present data: name: 172.18.20.1 providerDisplayName: Cisco connectionInfo: - name: Host value: 172.18.20.1 - name: SnmpPort value: 161 - name: SnmpUserName value: admin - name: SnmpAuthLevel value: authnopriv - name: SnmpAuthProtocol value: sha - name: SnmpAuthString value: password delegate_to: localhost - name: Sets the SAN Manager connection information community.general.oneview_san_manager: config: /etc/oneview/oneview_config.json state: connection_information_set data: connectionInfo: - name: Host value: '172.18.15.1' - name: Port value: '5989' - name: Username value: 'username' - name: Password value: 'password' - name: UseSsl value: true delegate_to: localhost - name: Refreshes the SAN Manager community.general.oneview_san_manager: config: /etc/oneview/oneview_config.json state: present data: name: 172.18.15.1 refreshState: RefreshPending delegate_to: localhost - name: Delete the SAN Manager recently created community.general.oneview_san_manager: config: /etc/oneview/oneview_config.json state: absent data: name: '172.18.15.1' delegate_to: localhost ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **san\_manager** dictionary | On state 'present'. Can be null. | Has the OneView facts about the SAN Manager. | ### Authors * Felipe Bulsoni (@fgbulsoni) * Thiago Miotto (@tmiotto) * Adriane Cardozo (@adriane-cardozo)
programming_docs
ansible community.general.gitlab_project – Creates/updates/deletes GitLab Projects community.general.gitlab\_project – Creates/updates/deletes GitLab Projects =========================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.gitlab_project`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * When the project does not exist in GitLab, it will be created. * When the project does exists and *state=absent*, the project will be deleted. * When changes are made to the project, the project will be updated. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * python-gitlab python module Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **allow\_merge\_on\_skipped\_pipeline** boolean added in 3.4.0 of community.general | **Choices:*** no * yes | Allow merge when skipped pipelines exist. | | **api\_password** string | | The password to use for authentication against the API | | **api\_token** string | | GitLab token for logging in. | | **api\_url** string | | The resolvable endpoint for the API | | **api\_username** string | | The username to use for authentication against the API | | **ci\_config\_path** string added in 3.7.0 of community.general | | Custom path to the CI configuration file for this project. | | **description** string | | An description for the project. | | **group** string | | Id or the full path of the group of which this projects belongs to. | | **import\_url** string | | Git repository which will be imported into gitlab. GitLab server needs read access to this git repository. | | **issues\_enabled** boolean | **Choices:*** no * **yes** ← | Whether you want to create issues or not. Possible values are true and false. | | **lfs\_enabled** boolean added in 2.0.0 of community.general | **Choices:*** **no** ← * yes | Enable Git large file systems to manages large files such as audio, video, and graphics files. | | **merge\_method** string added in 1.0.0 of community.general | **Choices:*** ff * **merge** ← * rebase\_merge | What requirements are placed upon merges. Possible values are `merge`, `rebase_merge` merge commit with semi-linear history, `ff` fast-forward merges only. | | **merge\_requests\_enabled** boolean | **Choices:*** no * **yes** ← | If merge requests can be made or not. Possible values are true and false. | | **name** string / required | | The name of the project. | | **only\_allow\_merge\_if\_all\_discussions\_are\_resolved** boolean added in 3.4.0 of community.general | **Choices:*** no * yes | All discussions on a merge request (MR) have to be resolved. | | **only\_allow\_merge\_if\_pipeline\_succeeds** boolean added in 3.4.0 of community.general | **Choices:*** no * yes | Only allow merges if pipeline succeeded. | | **packages\_enabled** boolean added in 3.4.0 of community.general | **Choices:*** no * yes | Enable GitLab package repository. | | **path** string | | The path of the project you want to create, this will be server\_url/<group>/path. If not supplied, name will be used. | | **remove\_source\_branch\_after\_merge** boolean added in 3.4.0 of community.general | **Choices:*** no * yes | Remove the source branch after merge. | | **shared\_runners\_enabled** boolean added in 3.7.0 of community.general | **Choices:*** no * yes | Enable shared runners for this project. | | **snippets\_enabled** boolean | **Choices:*** no * **yes** ← | If creating snippets should be available or not. | | **squash\_option** string added in 3.4.0 of community.general | **Choices:*** never * always * default\_off * default\_on | Squash commits when merging. | | **state** string | **Choices:*** **present** ← * absent | Create or delete project. Possible values are present and absent. | | **username** string added in 3.3.0 of community.general | | Used to create a personal project under a user's name. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether or not to validate SSL certs when supplying a https endpoint. | | **visibility** string | **Choices:*** **private** ← * internal * public | `private` Project access must be granted explicitly for each user. `internal` The project can be cloned by any logged in user. `public` The project can be cloned without any authentication. aliases: visibility\_level | | **wiki\_enabled** boolean | **Choices:*** no * **yes** ← | If an wiki for this project should be available or not. | Examples -------- ``` - name: Create GitLab Project community.general.gitlab_project: api_url: https://gitlab.example.com/ api_token: "{{ api_token }}" name: my_first_project group: "10481470" - name: Delete GitLab Project community.general.gitlab_project: api_url: https://gitlab.example.com/ api_token: "{{ access_token }}" validate_certs: False name: my_first_project state: absent delegate_to: localhost - name: Create GitLab Project in group Ansible community.general.gitlab_project: api_url: https://gitlab.example.com/ validate_certs: True api_username: dj-wasabi api_password: "MySecretPassword" name: my_first_project group: ansible issues_enabled: False merge_method: rebase_merge wiki_enabled: True snippets_enabled: True import_url: http://git.example.com/example/lab.git state: present delegate_to: localhost ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **error** string | failed | the error message returned by the GitLab API. **Sample:** 400: path is already in use | | **msg** string | always | Success or failure message. **Sample:** Success | | **project** dictionary | always | API object. | | **result** dictionary | always | json parsed response from the server. | ### Authors * Werner Dijkerman (@dj-wasabi) * Guillaume Martinez (@Lunik) ansible community.general.opennebula – OpenNebula inventory source community.general.opennebula – OpenNebula inventory source ========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.opennebula`. New in version 3.8.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Get inventory hosts from OpenNebula cloud. * Uses an YAML configuration file ending with either *opennebula.yml* or *opennebula.yaml* to set parameter values. * Uses *api\_authfile*, `~/.one/one_auth`, or `ONE_AUTH` pointing to a OpenNebula credentials file. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **api\_authfile** string | | env:ONE\_AUTH | If both *api\_username* or *api\_password* are not set, then it will try authenticate with ONE auth file. Default path is `~/.one/one_auth`. Set environment variable `ONE_AUTH` to override this path. | | **api\_password** string | | env:ONE\_PASSWORD | Password or a token of the user to login into OpenNebula RPC server. If not set, the value of the `ONE_PASSWORD` environment variable is used. | | **api\_url** string / required | | env:ONE\_URL | URL of the OpenNebula RPC server. It is recommended to use HTTPS so that the username/password are not transferred over the network unencrypted. If not set then the value of the `ONE_URL` environment variable is used. | | **api\_username** string | | env:ONE\_USERNAME | Name of the user to login into the OpenNebula RPC server. If not set then the value of the `ONE_USERNAME` environment variable is used. | | **compose** dictionary | **Default:**{} | | Create vars from jinja2 expressions. | | **filter\_by\_label** string | | | Only return servers filtered by this label. | | **group\_by\_labels** boolean | **Choices:*** no * **yes** ← | | Create host groups by vm labels | | **groups** dictionary | **Default:**{} | | Add hosts to group based on Jinja2 conditionals. | | **hostname** string | **Choices:*** **v4\_first\_ip** ← * v6\_first\_ip * name | | Field to match the hostname. Note `v4_first_ip` corresponds to the first IPv4 found on VM. | | **keyed\_groups** list / elements=string | **Default:**[] | | Add hosts to group based on the values of a variable. | | **leading\_separator** boolean added in 2.11 of ansible.builtin | **Choices:*** no * **yes** ← | | Use in conjunction with keyed\_groups. By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. This is because the default prefix is "" and the default separator is "\_". Set this option to False to omit the leading underscore (or other separator) if no prefix is given. If the group name is derived from a mapping the separator is still used to concatenate the items. To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. | | **plugin** string / required | **Choices:*** community.general.opennebula | | Token that ensures this is a source file for the 'opennebula' plugin. | | **strict** boolean | **Choices:*** **no** ← * yes | | If `yes` make invalid entries a fatal error, otherwise skip and continue. Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. | | **use\_extra\_vars** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** ← * yes | ini entries: [inventory\_plugins]use\_extra\_vars = no env:ANSIBLE\_INVENTORY\_USE\_EXTRA\_VARS | Merge extra vars into the available variables for composition (highest precedence). | Examples -------- ``` # inventory_opennebula.yml file in YAML format # Example command line: ansible-inventory --list -i inventory_opennebula.yml # Pass a label filter to the API plugin: community.general.opennebula api_url: https://opennebula:2633/RPC2 filter_by_label: Cache ``` ### Authors * Kristian Feldsam (@feldsam) ansible community.general.ipwcli_dns – Manage DNS Records for Ericsson IPWorks via ipwcli community.general.ipwcli\_dns – Manage DNS Records for Ericsson IPWorks via ipwcli ================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ipwcli_dns`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage DNS records for the Ericsson IPWorks DNS server. The module will use the ipwcli to deploy the DNS records. Requirements ------------ The below requirements are needed on the host that executes this module. * ipwcli (installed on Ericsson IPWorks) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **address** string | | The IP address for the A or AAAA record. Required for `type=A` or `type=AAAA` | | **container** string / required | | Sets the container zone for the record. | | **dnsname** string / required | | Name of the record. | | **flags** string | **Choices:*** S * A * U * P | Sets one of the possible flags of NAPTR record. Required for `type=NAPTR` | | **order** integer | | Sets the order of the NAPTR record. Required for `type=NAPTR` | | **password** string / required | | Password to login on ipwcli. | | **port** integer | | Sets the port of the SRV record. Required for `type=SRV` | | **preference** integer | | Sets the preference of the NAPTR record. Required for `type=NAPTR` | | **priority** integer | **Default:**10 | Sets the priority of the SRV record. | | **replacement** string | | Sets the replacement of the NAPTR record. Required for `type=NAPTR` | | **service** string | | Sets the service of the NAPTR record. Required for `type=NAPTR` | | **state** string | **Choices:*** absent * **present** ← | Whether the record should exist or not. | | **target** string | | Sets the target of the SRV record. Required for `type=SRV` | | **ttl** integer | **Default:**3600 | Sets the TTL of the record. | | **type** string / required | **Choices:*** NAPTR * SRV * A * AAAA | Type of the record. | | **username** string / required | | Username to login on ipwcli. | | **weight** integer | **Default:**10 | Sets the weight of the SRV record. | Notes ----- Note * To make the DNS record changes effective, you need to run `update dnsserver` on the ipwcli. Examples -------- ``` - name: Create A record community.general.ipwcli_dns: dnsname: example.com type: A container: ZoneOne address: 127.0.0.1 - name: Remove SRV record if exists community.general.ipwcli_dns: dnsname: _sip._tcp.test.example.com type: SRV container: ZoneOne ttl: 100 state: absent target: example.com port: 5060 - name: Create NAPTR record community.general.ipwcli_dns: dnsname: test.example.com type: NAPTR preference: 10 container: ZoneOne ttl: 100 order: 10 service: 'SIP+D2T' replacement: '_sip._tcp.test.example.com.' flags: S ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **record** string | always | The created record from the input params | ### Authors * Christian Wollinger (@cwollinger) ansible community.general.mail – Send an email community.general.mail – Send an email ====================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.mail`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This module is useful for sending emails from playbooks. * One may wonder why automate sending emails? In complex environments there are from time to time processes that cannot be automated, either because you lack the authority to make it so, or because not everyone agrees to a common approach. * If you cannot automate a specific step, but the step is non-blocking, sending out an email to the responsible party to make them perform their part of the bargain is an elegant way to put the responsibility in someone else’s lap. * Of course sending out a mail can be equally useful as a way to notify one or more people in a team that a specific action has been (successfully) taken. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **attach** list / elements=path | **Default:**[] | A list of pathnames of files to attach to the message. Attached files will have their content-type set to `application/octet-stream`. | | **bcc** list / elements=string | | The email-address(es) the mail is being 'blind' copied to. This is a list, which may contain address and phrase portions. | | **body** string | | The body of the email being sent. | | **cc** list / elements=string | | The email-address(es) the mail is being copied to. This is a list, which may contain address and phrase portions. | | **charset** string | **Default:**"utf-8" | The character set of email being sent. | | **ehlohost** string added in 3.8.0 of community.general | | Allows for manual specification of host for EHLO. | | **headers** list / elements=string | **Default:**[] | A list of headers which should be added to the message. Each individual header is specified as `header=value` (see example below). | | **host** string | **Default:**"localhost" | The mail server. | | **password** string | | If SMTP requires password. | | **port** integer | **Default:**25 | The mail server port. This must be a valid integer between 1 and 65534 | | **secure** string | **Choices:*** always * never * starttls * **try** ← | If `always`, the connection will only send email if the connection is Encrypted. If the server doesn't accept the encrypted connection it will fail. If `try`, the connection will attempt to setup a secure SSL/TLS session, before trying to send. If `never`, the connection will not attempt to setup a secure SSL/TLS session, before sending If `starttls`, the connection will try to upgrade to a secure SSL/TLS connection, before sending. If it is unable to do so it will fail. | | **sender** string | **Default:**"root" | The email-address the mail is sent from. May contain address and phrase. aliases: from | | **subject** string / required | | The subject of the email being sent. aliases: msg | | **subtype** string | **Choices:*** html * **plain** ← | The minor mime type, can be either `plain` or `html`. The major type is always `text`. | | **timeout** integer | **Default:**20 | Sets the timeout in seconds for connection attempts. | | **to** list / elements=string | **Default:**"root" | The email-address(es) the mail is being sent to. This is a list, which may contain address and phrase portions. aliases: recipients | | **username** string | | If SMTP requires username. | Examples -------- ``` - name: Example playbook sending mail to root community.general.mail: subject: System {{ ansible_hostname }} has been successfully provisioned. delegate_to: localhost - name: Sending an e-mail using Gmail SMTP servers community.general.mail: host: smtp.gmail.com port: 587 username: [email protected] password: mysecret to: John Smith <[email protected]> subject: Ansible-report body: System {{ ansible_hostname }} has been successfully provisioned. delegate_to: localhost - name: Send e-mail to a bunch of users, attaching files community.general.mail: host: 127.0.0.1 port: 2025 subject: Ansible-report body: Hello, this is an e-mail. I hope you like it ;-) from: [email protected] (Jane Jolie) to: - John Doe <[email protected]> - Suzie Something <[email protected]> cc: Charlie Root <root@localhost> attach: - /etc/group - /tmp/avatar2.png headers: - [email protected] - X-Special="Something or other" charset: us-ascii delegate_to: localhost - name: Sending an e-mail using the remote machine, not the Ansible controller node community.general.mail: host: localhost port: 25 to: John Smith <[email protected]> subject: Ansible-report body: System {{ ansible_hostname }} has been successfully provisioned. - name: Sending an e-mail using Legacy SSL to the remote machine community.general.mail: host: localhost port: 25 to: John Smith <[email protected]> subject: Ansible-report body: System {{ ansible_hostname }} has been successfully provisioned. secure: always - name: Sending an e-mail using StartTLS to the remote machine community.general.mail: host: localhost port: 25 to: John Smith <[email protected]> subject: Ansible-report body: System {{ ansible_hostname }} has been successfully provisioned. secure: starttls - name: Sending an e-mail using StartTLS, remote server, custom EHLO community.general.mail: host: some.smtp.host.tld port: 25 ehlohost: my-resolvable-hostname.tld to: John Smith <[email protected]> subject: Ansible-report body: System {{ ansible_hostname }} has been successfully provisioned. secure: starttls ``` ### Authors * Dag Wieers (@dagwieers)
programming_docs
ansible community.general.seport – Manages SELinux network port type definitions community.general.seport – Manages SELinux network port type definitions ======================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.seport`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manages SELinux network port type definitions. Requirements ------------ The below requirements are needed on the host that executes this module. * libselinux-python * policycoreutils-python Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ignore\_selinux\_state** boolean | **Choices:*** **no** ← * yes | Run independent of selinux runtime state | | **ports** list / elements=string / required | | Ports or port ranges. Can be a list (since 2.6) or comma separated string. | | **proto** string / required | **Choices:*** tcp * udp | Protocol for the specified port. | | **reload** boolean | **Choices:*** no * **yes** ← | Reload SELinux policy after commit. | | **setype** string / required | | SELinux type for the specified port. | | **state** string | **Choices:*** absent * **present** ← | Desired boolean value. | Notes ----- Note * The changes are persistent across reboots. * Not tested on any debian based system. Examples -------- ``` - name: Allow Apache to listen on tcp port 8888 community.general.seport: ports: 8888 proto: tcp setype: http_port_t state: present - name: Allow sshd to listen on tcp port 8991 community.general.seport: ports: 8991 proto: tcp setype: ssh_port_t state: present - name: Allow memcached to listen on tcp ports 10000-10100 and 10112 community.general.seport: ports: 10000-10100,10112 proto: tcp setype: memcache_port_t state: present - name: Allow memcached to listen on tcp ports 10000-10100 and 10112 community.general.seport: ports: - 10000-10100 - 10112 proto: tcp setype: memcache_port_t state: present ``` ### Authors * Dan Keder (@dankeder) ansible community.general.pkg5_publisher – Manages Solaris 11 Image Packaging System publishers community.general.pkg5\_publisher – Manages Solaris 11 Image Packaging System publishers ======================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pkg5_publisher`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * IPS packages are the native packages in Solaris 11 and higher. * This modules will configure which publishers a client will download IPS packages from. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **enabled** boolean | **Choices:*** no * yes | Is the repository enabled or disabled? | | **mirror** list / elements=string | | A path or URL to the repository mirror. Multiple values may be provided. | | **name** string / required | | The publisher's name. aliases: publisher | | **origin** list / elements=string | | A path or URL to the repository. Multiple values may be provided. | | **state** string | **Choices:*** **present** ← * absent | Whether to ensure that a publisher is present or absent. | | **sticky** boolean | **Choices:*** no * yes | Packages installed from a sticky repository can only receive updates from that repository. | Examples -------- ``` - name: Fetch packages for the solaris publisher direct from Oracle community.general.pkg5_publisher: name: solaris sticky: true origin: https://pkg.oracle.com/solaris/support/ - name: Configure a publisher for locally-produced packages community.general.pkg5_publisher: name: site origin: 'https://pkg.example.com/site/' ``` ### Authors * Peter Oliver (@mavit) ansible community.general.locale_gen – Creates or removes locales community.general.locale\_gen – Creates or removes locales ========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.locale_gen`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manages locales by editing /etc/locale.gen and invoking locale-gen. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **name** string / required | | Name and encoding of the locale, such as "en\_GB.UTF-8". | | **state** string | **Choices:*** absent * **present** ← | Whether the locale shall be present. | Examples -------- ``` - name: Ensure a locale exists community.general.locale_gen: name: de_CH.UTF-8 state: present ``` ### Authors * Augustus Kling (@AugustusKling) ansible community.general.kernel_blacklist – Blacklist kernel modules community.general.kernel\_blacklist – Blacklist kernel modules ============================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.kernel_blacklist`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Add or remove kernel modules from blacklist. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **blacklist\_file** string | **Default:**"/etc/modprobe.d/blacklist-ansible.conf" | If specified, use this blacklist file instead of `/etc/modprobe.d/blacklist-ansible.conf`. | | **name** string / required | | Name of kernel module to black- or whitelist. | | **state** string | **Choices:*** absent * **present** ← | Whether the module should be present in the blacklist or absent. | Examples -------- ``` - name: Blacklist the nouveau driver module community.general.kernel_blacklist: name: nouveau state: present ``` ### Authors * Matthias Vogelgesang (@matze) ansible community.general.scaleway_ip_info – Gather information about the Scaleway ips available. community.general.scaleway\_ip\_info – Gather information about the Scaleway ips available. =========================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.scaleway_ip_info`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Gather information about the Scaleway ips available. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_timeout** integer | **Default:**30 | HTTP timeout to Scaleway API in seconds. aliases: timeout | | **api\_token** string / required | | Scaleway OAuth token. aliases: oauth\_token | | **api\_url** string | **Default:**"https://api.scaleway.com" | Scaleway API URL. aliases: base\_url | | **query\_parameters** dictionary | **Default:**{} | List of parameters passed to the query string. | | **region** string / required | **Choices:*** ams1 * EMEA-NL-EVS * par1 * EMEA-FR-PAR1 * par2 * EMEA-FR-PAR2 * waw1 * EMEA-PL-WAW1 | Scaleway region to use (for example `par1`). | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Validate SSL certs of the Scaleway API. | Notes ----- Note * Also see the API documentation on <https://developer.scaleway.com/> * If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `SCW_TOKEN`, `SCW_API_KEY`, `SCW_OAUTH_TOKEN` or `SCW_API_TOKEN`. * If one wants to use a different `api_url` one can also set the `SCW_API_URL` environment variable. Examples -------- ``` - name: Gather Scaleway ips information community.general.scaleway_ip_info: region: par1 register: result - ansible.builtin.debug: msg: "{{ result.scaleway_ip_info }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **scaleway\_ip\_info** list / elements=dictionary | success | Response from Scaleway API. For more details please refer to: <https://developers.scaleway.com/en/products/instance/api/>. **Sample:** {'scaleway\_ip\_info': [{'address': '163.172.170.243', 'id': 'ea081794-a581-8899-8451-386ddaf0a451', 'organization': '3f709602-5e6c-4619-b80c-e324324324af', 'reverse': None, 'server': {'id': '12f19bc7-109c-4517-954c-e6b3d0311363', 'name': 'scw-e0d158'}}]} | ### Authors * Yanis Guenane (@Spredzy) * Remy Leone (@sieben) ansible community.general.cobbler_system – Manage system objects in Cobbler community.general.cobbler\_system – Manage system objects in Cobbler ==================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.cobbler_system`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Add, modify or remove systems in Cobbler Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **host** string | **Default:**"127.0.0.1" | The name or IP address of the Cobbler system. | | **interfaces** dictionary | | A list of dictionaries containing interface options. | | **name** string | | The system name to manage. | | **password** string | | The password to log in to Cobbler. | | **port** integer | | Port number to be used for REST connection. The default value depends on parameter `use_ssl`. | | **properties** dictionary | | A dictionary with system properties. | | **state** string | **Choices:*** absent * **present** ← * query | Whether the system should be present, absent or a query is made. | | **sync** boolean | **Choices:*** **no** ← * yes | Sync on changes. Concurrently syncing Cobbler is bound to fail. | | **use\_ssl** boolean | **Choices:*** no * **yes** ← | If `no`, an HTTP connection will be used instead of the default HTTPS connection. | | **username** string | **Default:**"cobbler" | The username to log in to Cobbler. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If `no`, SSL certificates will not be validated. This should only set to `no` when used on personally controlled sites using self-signed certificates. | Notes ----- Note * Concurrently syncing Cobbler is bound to fail with weird errors. * On python 2.7.8 and older (i.e. on RHEL7) you may need to tweak the python behaviour to disable certificate validation. More information at [Certificate verification in Python standard library HTTP clients](https://access.redhat.com/articles/2039753). Examples -------- ``` - name: Ensure the system exists in Cobbler community.general.cobbler_system: host: cobbler01 username: cobbler password: MySuperSecureP4sswOrd name: myhost properties: profile: CentOS6-x86_64 name_servers: [ 2.3.4.5, 3.4.5.6 ] name_servers_search: foo.com, bar.com interfaces: eth0: macaddress: 00:01:02:03:04:05 ipaddress: 1.2.3.4 delegate_to: localhost - name: Enable network boot in Cobbler community.general.cobbler_system: host: bdsol-aci-cobbler-01 username: cobbler password: ins3965! name: bdsol-aci51-apic1.cisco.com properties: netboot_enabled: yes state: present delegate_to: localhost - name: Query all systems in Cobbler community.general.cobbler_system: host: cobbler01 username: cobbler password: MySuperSecureP4sswOrd state: query register: cobbler_systems delegate_to: localhost - name: Query a specific system in Cobbler community.general.cobbler_system: host: cobbler01 username: cobbler password: MySuperSecureP4sswOrd name: '{{ inventory_hostname }}' state: query register: cobbler_properties delegate_to: localhost - name: Ensure the system does not exist in Cobbler community.general.cobbler_system: host: cobbler01 username: cobbler password: MySuperSecureP4sswOrd name: myhost state: absent delegate_to: localhost ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **system** dictionary | when `name` is provided | (Resulting) information about the system we are working with | | **systems** list / elements=string | `state=query` and `name` is not provided | List of systems | ### Authors * Dag Wieers (@dagwieers) ansible community.general.sorcery – Package manager for Source Mage GNU/Linux community.general.sorcery – Package manager for Source Mage GNU/Linux ===================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.sorcery`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manages “spells” on Source Mage GNU/Linux using *sorcery* toolchain Requirements ------------ The below requirements are needed on the host that executes this module. * bash Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **cache\_valid\_time** integer | | Time in seconds to invalidate grimoire collection on update especially useful for SCM and rsync grimoires makes sense only in pair with `update_cache` | | **depends** string | | Comma-separated list of \_optional\_ dependencies to build a spell (or make sure it is built) with; use +/- in front of dependency to turn it on/off ('+' is optional though) this option is ignored if `name` parameter is equal to '\*' or contains more than one spell providers must be supplied in the form recognized by Sorcery, e.g. 'openssl(SSL)' | | **name** list / elements=string | | Name of the spell multiple names can be given, separated by commas special value '\*' in conjunction with states `latest` or `rebuild` will update or rebuild the whole system respectively aliases: spell | | **state** string | **Choices:*** **present** ← * latest * absent * cast * dispelled * rebuild | Whether to cast, dispel or rebuild a package state `cast` is an equivalent of `present`, not `latest` state `latest` always triggers `update_cache=yes` state `rebuild` implies cast of all specified spells, not only those existed before | | **update** boolean | **Choices:*** **no** ← * yes | Whether or not to update sorcery scripts at the very first stage | | **update\_cache** boolean | **Choices:*** **no** ← * yes | Whether or not to update grimoire collection before casting spells aliases: update\_codex | Notes ----- Note * When all three components are selected, the update goes by the sequence – Sorcery -> Grimoire(s) -> Spell(s); you cannot override it. * grimoire handling (i.e. add/remove, including SCM/rsync versions) is not yet supported. Examples -------- ``` - name: Make sure spell foo is installed community.general.sorcery: spell: foo state: present - name: Make sure spells foo, bar and baz are removed community.general.sorcery: spell: foo,bar,baz state: absent - name: Make sure spell foo with dependencies bar and baz is installed community.general.sorcery: spell: foo depends: bar,baz state: present - name: Make sure spell foo with bar and without baz dependencies is installed community.general.sorcery: spell: foo depends: +bar,-baz state: present - name: Make sure spell foo with libressl (providing SSL) dependency is installed community.general.sorcery: spell: foo depends: libressl(SSL) state: present - name: Make sure spells with/without required dependencies (if any) are installed community.general.sorcery: name: "{{ item.spell }}" depends: "{{ item.depends | default(None) }}" state: present loop: - { spell: 'vifm', depends: '+file,-gtk+2' } - { spell: 'fwknop', depends: 'gpgme' } - { spell: 'pv,tnftp,tor' } - name: Install the latest version of spell foo using regular glossary community.general.sorcery: name: foo state: latest - name: Rebuild spell foo community.general.sorcery: spell: foo state: rebuild - name: Rebuild the whole system, but update Sorcery and Codex first community.general.sorcery: spell: '*' state: rebuild update: yes update_cache: yes - name: Refresh the grimoire collection if it is 1 day old using native sorcerous alias community.general.sorcery: update_codex: yes cache_valid_time: 86400 - name: Update only Sorcery itself community.general.sorcery: update: yes ``` ### Authors * Vlad Glagolev (@vaygr) ansible community.general.modprobe – Load or unload kernel modules community.general.modprobe – Load or unload kernel modules ========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.modprobe`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Load or unload kernel modules. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **name** string / required | | Name of kernel module to manage. | | **params** string | **Default:**"" | Modules parameters. | | **state** string | **Choices:*** absent * **present** ← | Whether the module should be present or absent. | Examples -------- ``` - name: Add the 802.1q module community.general.modprobe: name: 8021q state: present - name: Add the dummy module community.general.modprobe: name: dummy state: present params: 'numdummies=2' ``` ### Authors * David Stygstra (@stygstra) * Julien Dauphant (@jdauphant) * Matt Jeffery (@mattjeffery)
programming_docs
ansible community.general.scaleway_compute – Scaleway compute management module community.general.scaleway\_compute – Scaleway compute management module ======================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.scaleway_compute`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module manages compute instances on Scaleway. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_timeout** integer | **Default:**30 | HTTP timeout to Scaleway API in seconds. aliases: timeout | | **api\_token** string / required | | Scaleway OAuth token. aliases: oauth\_token | | **api\_url** string | **Default:**"https://api.scaleway.com" | Scaleway API URL. aliases: base\_url | | **commercial\_type** string / required | | Commercial name of the compute node | | **enable\_ipv6** boolean | **Choices:*** **no** ← * yes | Enable public IPv6 connectivity on the instance | | **image** string / required | | Image identifier used to start the instance with | | **name** string | | Name of the instance | | **organization** string / required | | Organization identifier | | **public\_ip** string | **Default:**"absent" | Manage public IP on a Scaleway server Could be Scaleway IP address UUID `dynamic` Means that IP is destroyed at the same time the host is destroyed `absent` Means no public IP at all | | **query\_parameters** dictionary | **Default:**{} | List of parameters passed to the query string. | | **region** string / required | **Choices:*** ams1 * EMEA-NL-EVS * par1 * EMEA-FR-PAR1 * par2 * EMEA-FR-PAR2 * waw1 * EMEA-PL-WAW1 | Scaleway compute zone | | **security\_group** string | | Security group unique identifier If no value provided, the default security group or current security group will be used | | **state** string | **Choices:*** **present** ← * absent * running * restarted * stopped | Indicate desired state of the instance. | | **tags** list / elements=string | **Default:**[] | List of tags to apply to the instance (5 max) | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Validate SSL certs of the Scaleway API. | | **wait** boolean | **Choices:*** **no** ← * yes | Wait for the instance to reach its desired state before returning. | | **wait\_sleep\_time** integer | **Default:**3 | Time to wait before every attempt to check the state of the server | | **wait\_timeout** integer | **Default:**300 | Time to wait for the server to reach the expected state | Notes ----- Note * Also see the API documentation on <https://developer.scaleway.com/> * If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `SCW_TOKEN`, `SCW_API_KEY`, `SCW_OAUTH_TOKEN` or `SCW_API_TOKEN`. * If one wants to use a different `api_url` one can also set the `SCW_API_URL` environment variable. Examples -------- ``` - name: Create a server community.general.scaleway_compute: name: foobar state: present image: 89ee4018-f8c3-4dc4-a6b5-bca14f985ebe organization: 951df375-e094-4d26-97c1-ba548eeb9c42 region: ams1 commercial_type: VC1S tags: - test - www - name: Create a server attached to a security group community.general.scaleway_compute: name: foobar state: present image: 89ee4018-f8c3-4dc4-a6b5-bca14f985ebe organization: 951df375-e094-4d26-97c1-ba548eeb9c42 region: ams1 commercial_type: VC1S security_group: 4a31b633-118e-4900-bd52-facf1085fc8d tags: - test - www - name: Destroy it right after community.general.scaleway_compute: name: foobar state: absent image: 89ee4018-f8c3-4dc4-a6b5-bca14f985ebe organization: 951df375-e094-4d26-97c1-ba548eeb9c42 region: ams1 commercial_type: VC1S ``` ### Authors * Remy Leone (@sieben) ansible community.general.pacman – Manage packages with pacman community.general.pacman – Manage packages with pacman ====================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pacman`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage packages with the *pacman* package manager, which is used by Arch Linux and its variants. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **executable** string added in 3.1.0 of community.general | **Default:**"pacman" | Name of binary to use. This can either be `pacman` or a pacman compatible AUR helper. Beware that AUR helpers might behave unexpectedly and are therefore not recommended. | | **extra\_args** string | | Additional option to pass to pacman when enforcing `state`. | | **force** boolean | **Choices:*** **no** ← * yes | When removing package, force remove package, without any checks. Same as `extra\_args="--nodeps --nodeps"`. When update\_cache, force redownload repo databases. Same as `update\_cache\_extra\_args="--refresh --refresh"`. | | **name** list / elements=string | | Name or list of names of the package(s) or file(s) to install, upgrade, or remove. Can't be used in combination with `upgrade`. aliases: package, pkg | | **state** string | **Choices:*** absent * installed * latest * **present** ← * removed | Whether to install (`present` or `installed`, `latest`), or remove (`absent` or `removed`) a package. `present` and `installed` will simply ensure that a desired package is installed. `latest` will update the specified package if it is not of the latest available version. `absent` and `removed` will remove the specified package. | | **update\_cache** boolean | **Choices:*** **no** ← * yes | Whether or not to refresh the master package lists. This can be run as part of a package installation or as a separate step. Alias `update-cache` has been deprecated and will be removed in community.general 5.0.0. aliases: update-cache | | **update\_cache\_extra\_args** string | | Additional option to pass to pacman when enforcing `update_cache`. | | **upgrade** boolean | **Choices:*** **no** ← * yes | Whether or not to upgrade the whole system. Can't be used in combination with `name`. | | **upgrade\_extra\_args** string | | Additional option to pass to pacman when enforcing `upgrade`. | Notes ----- Note * When used with a `loop:` each package will be processed individually, it is much more efficient to pass the list directly to the *name* option. * To use an AUR helper (*executable* option), a few extra setup steps might be required beforehand. For example, a dedicated build user with permissions to install packages could be necessary. Examples -------- ``` - name: Install package foo from repo community.general.pacman: name: foo state: present - name: Install package bar from file community.general.pacman: name: ~/bar-1.0-1-any.pkg.tar.xz state: present - name: Install package foo from repo and bar from file community.general.pacman: name: - foo - ~/bar-1.0-1-any.pkg.tar.xz state: present - name: Install package from AUR using a Pacman compatible AUR helper community.general.pacman: name: foo state: present executable: yay extra_args: --builddir /var/cache/yay - name: Upgrade package foo community.general.pacman: name: foo state: latest update_cache: yes - name: Remove packages foo and bar community.general.pacman: name: - foo - bar state: absent - name: Recursively remove package baz community.general.pacman: name: baz state: absent extra_args: --recursive - name: Run the equivalent of "pacman -Sy" as a separate step community.general.pacman: update_cache: yes - name: Run the equivalent of "pacman -Su" as a separate step community.general.pacman: upgrade: yes - name: Run the equivalent of "pacman -Syu" as a separate step community.general.pacman: update_cache: yes upgrade: yes - name: Run the equivalent of "pacman -Rdd", force remove package baz community.general.pacman: name: baz state: absent force: yes ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **packages** list / elements=string | when upgrade is set to yes | a list of packages that have been changed **Sample:** ['package', 'other-package'] | ### Authors * Indrajit Raychaudhuri (@indrajitr) * Aaron Bull Schaefer (@elasticdog) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#f899998a9796dedbcbcfc3dedbcdcac3dedbccc0c39d94998b8c919b9c979fdedbcccec39b9795)> * Maxime de Roucy (@tchernomax) ansible community.general.rhsm_repository – Manage RHSM repositories using the subscription-manager command community.general.rhsm\_repository – Manage RHSM repositories using the subscription-manager command ==================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rhsm_repository`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage (Enable/Disable) RHSM repositories to the Red Hat Subscription Management entitlement platform using the `subscription-manager` command. Requirements ------------ The below requirements are needed on the host that executes this module. * subscription-manager Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **name** list / elements=string / required | | The ID of repositories to enable. To operate on several repositories this can accept a comma separated list or a YAML list. | | **purge** boolean | **Choices:*** **no** ← * yes | Disable all currently enabled repositories that are not not specified in `name`. Only set this to `True` if passing in a list of repositories to the `name` field. Using this with `loop` will most likely not have the desired result. | | **state** string | **Choices:*** present * **enabled** ← * absent * disabled | If state is equal to present or disabled, indicates the desired repository state. | Notes ----- Note * In order to manage RHSM repositories the system must be already registered to RHSM manually or using the Ansible `redhat_subscription` module. Examples -------- ``` - name: Enable a RHSM repository community.general.rhsm_repository: name: rhel-7-server-rpms - name: Disable all RHSM repositories community.general.rhsm_repository: name: '*' state: disabled - name: Enable all repositories starting with rhel-6-server community.general.rhsm_repository: name: rhel-6-server* state: enabled - name: Disable all repositories except rhel-7-server-rpms community.general.rhsm_repository: name: rhel-7-server-rpms purge: True ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **repositories** list / elements=string | success | The list of RHSM repositories with their states. When this module is used to change the repository states, this list contains the updated states after the changes. | ### Authors * Giovanni Sciortino (@giovannisciortino) ansible community.general.vmadm – Manage SmartOS virtual machines and zones. community.general.vmadm – Manage SmartOS virtual machines and zones. ==================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.vmadm`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage SmartOS virtual machines through vmadm(1M). Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **archive\_on\_delete** boolean | **Choices:*** no * yes | When enabled, the zone dataset will be mounted on `/zones/archive` upon removal. | | **autoboot** boolean | **Choices:*** no * yes | Whether or not a VM is booted when the system is rebooted. | | **boot** string | | Set the boot order for KVM VMs. | | **brand** string | **Choices:*** **joyent** ← * joyent-minimal * lx * kvm * bhyve | Type of virtual machine. The `bhyve` option was added in community.general 0.2.0. | | **cpu\_cap** integer | | Sets a limit on the amount of CPU time that can be used by a VM. Use `0` for no cap. | | **cpu\_shares** integer | | Sets a limit on the number of fair share scheduler (FSS) CPU shares for a VM. This limit is relative to all other VMs on the system. | | **cpu\_type** string | **Choices:*** **qemu64** ← * host | Control the type of virtual CPU exposed to KVM VMs. | | **customer\_metadata** dictionary | | Metadata to be set and associated with this VM, this contain customer modifiable keys. | | **delegate\_dataset** boolean | **Choices:*** no * yes | Whether to delegate a ZFS dataset to an OS VM. | | **disk\_driver** string | | Default value for a virtual disk model for KVM guests. | | **disks** list / elements=dictionary | | A list of disks to add, valid properties are documented in vmadm(1M). | | **dns\_domain** string | | Domain value for `/etc/hosts`. | | **docker** boolean | **Choices:*** no * yes | Docker images need this flag enabled along with the *brand* set to `lx`. | | **filesystems** list / elements=dictionary | | Mount additional filesystems into an OS VM. | | **firewall\_enabled** boolean | **Choices:*** no * yes | Enables the firewall, allowing fwadm(1M) rules to be applied. | | **force** boolean | **Choices:*** no * yes | Force a particular action (i.e. stop or delete a VM). | | **fs\_allowed** string | | Comma separated list of filesystem types this zone is allowed to mount. | | **hostname** string | | Zone/VM hostname. | | **image\_uuid** string | | Image UUID. | | **indestructible\_delegated** boolean | **Choices:*** no * yes | Adds an `@indestructible` snapshot to delegated datasets. | | **indestructible\_zoneroot** boolean | **Choices:*** no * yes | Adds an `@indestructible` snapshot to zoneroot. | | **internal\_metadata** dictionary | | Metadata to be set and associated with this VM, this contains operator generated keys. | | **internal\_metadata\_namespace** string | | List of namespaces to be set as *internal\_metadata-only*; these namespaces will come from *internal\_metadata* rather than *customer\_metadata*. | | **kernel\_version** string | | Kernel version to emulate for LX VMs. | | **limit\_priv** string | | Set (comma separated) list of privileges the zone is allowed to use. | | **maintain\_resolvers** boolean | **Choices:*** no * yes | Resolvers in `/etc/resolv.conf` will be updated when updating the *resolvers* property. | | **max\_locked\_memory** integer | | Total amount of memory (in MiBs) on the host that can be locked by this VM. | | **max\_lwps** integer | | Maximum number of lightweight processes this VM is allowed to have running. | | **max\_physical\_memory** integer | | Maximum amount of memory (in MiBs) on the host that the VM is allowed to use. | | **max\_swap** integer | | Maximum amount of virtual memory (in MiBs) the VM is allowed to use. | | **mdata\_exec\_timeout** integer | | Timeout in seconds (or 0 to disable) for the `svc:/smartdc/mdata:execute` service that runs user-scripts in the zone. | | **name** string | | Name of the VM. vmadm(1M) uses this as an optional name. aliases: alias | | **nic\_driver** string | | Default value for a virtual NIC model for KVM guests. | | **nics** list / elements=dictionary | | A list of nics to add, valid properties are documented in vmadm(1M). | | **nowait** boolean | **Choices:*** no * yes | Consider the provisioning complete when the VM first starts, rather than when the VM has rebooted. | | **qemu\_extra\_opts** string | | Additional qemu cmdline arguments for KVM guests. | | **qemu\_opts** string | | Additional qemu arguments for KVM guests. This overwrites the default arguments provided by vmadm(1M) and should only be used for debugging. | | **quota** integer | | Quota on zone filesystems (in MiBs). | | **ram** integer | | Amount of virtual RAM for a KVM guest (in MiBs). | | **resolvers** list / elements=string | | List of resolvers to be put into `/etc/resolv.conf`. | | **routes** dictionary | | Dictionary that maps destinations to gateways, these will be set as static routes in the VM. | | **spice\_opts** string | | Addition options for SPICE-enabled KVM VMs. | | **spice\_password** string | | Password required to connect to SPICE. By default no password is set. Please note this can be read from the Global Zone. | | **state** string | **Choices:*** present * **running** ← * absent * deleted * stopped * created * restarted * rebooted | States for the VM to be in. Please note that `present`, `stopped` and `restarted` operate on a VM that is currently provisioned. `present` means that the VM will be created if it was absent, and that it will be in a running state. `absent` will shutdown the zone before removing it. `stopped` means the zone will be created if it doesn't exist already, before shutting it down. | | **tmpfs** integer | | Amount of memory (in MiBs) that will be available in the VM for the `/tmp` filesystem. | | **uuid** string | | UUID of the VM. Can either be a full UUID or `*` for all VMs. | | **vcpus** integer | | Number of virtual CPUs for a KVM guest. | | **vga** string | | Specify VGA emulation used by KVM VMs. | | **virtio\_txburst** integer | | Number of packets that can be sent in a single flush of the tx queue of virtio NICs. | | **virtio\_txtimer** integer | | Timeout (in nanoseconds) for the TX timer of virtio NICs. | | **vnc\_password** string | | Password required to connect to VNC. By default no password is set. Please note this can be read from the Global Zone. | | **vnc\_port** integer | | TCP port to listen of the VNC server. Or set `0` for random, or `-1` to disable. | | **zfs\_data\_compression** string | | Specifies compression algorithm used for this VMs data dataset. This option only has effect on delegated datasets. | | **zfs\_data\_recsize** integer | | Suggested block size (power of 2) for files in the delegated dataset's filesystem. | | **zfs\_filesystem\_limit** integer | | Maximum number of filesystems the VM can have. | | **zfs\_io\_priority** integer | | IO throttle priority value relative to other VMs. | | **zfs\_root\_compression** string | | Specifies compression algorithm used for this VMs root dataset. This option only has effect on the zoneroot dataset. | | **zfs\_root\_recsize** integer | | Suggested block size (power of 2) for files in the zoneroot dataset's filesystem. | | **zfs\_snapshot\_limit** integer | | Number of snapshots the VM can have. | | **zpool** string | | ZFS pool the VM's zone dataset will be created in. | Examples -------- ``` - name: Create SmartOS zone community.general.vmadm: brand: joyent state: present alias: fw_zone image_uuid: 95f265b8-96b2-11e6-9597-972f3af4b6d5 firewall_enabled: yes indestructible_zoneroot: yes nics: - nic_tag: admin ip: dhcp primary: true internal_metadata: root_pw: 'secret' quota: 1 - name: Delete a zone community.general.vmadm: alias: test_zone state: deleted - name: Stop all zones community.general.vmadm: uuid: '*' state: stopped ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **alias** string | When addressing a VM by alias. | Alias of the managed VM. **Sample:** dns-zone | | **state** string | success | State of the target, after execution. **Sample:** running | | **uuid** string | always | UUID of the managed VM. **Sample:** b217ab0b-cf57-efd8-cd85-958d0b80be33 | ### Authors * Jasper Lievisse Adriaanse (@jasperla)
programming_docs
ansible community.general.passwordstore – manage passwords with passwordstore.org’s pass utility community.general.passwordstore – manage passwords with passwordstore.org’s pass utility ======================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.passwordstore`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Enables Ansible to retrieve, create or update passwords from the passwordstore.org pass utility. It also retrieves YAML style keys stored as multilines in the passwordfile. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **\_terms** string / required | | | query key. | | **backup** boolean | **Choices:*** **no** ← * yes | | Used with `overwrite=yes`. Backup the previous password in a subkey. | | **create** boolean | **Choices:*** **no** ← * yes | | Create the password if it does not already exist. Takes precedence over `missing`. | | **directory** string | | env:PASSWORD\_STORE\_DIR | The directory of the password store. | | **length** integer | **Default:**16 | | The length of the generated password. | | **missing** string added in 3.1.0 of community.general | **Choices:*** **error** ← * warn * empty * create | | List of preference about what to do if the password file is missing. If *create=true*, the value for this option is ignored and assumed to be `create`. If set to `error`, the lookup will error out if the passname does not exist. If set to `create`, the passname will be created with the provided length *length* if it does not exist. If set to `empty` or `warn`, will return a `none` in case the passname does not exist. When using `lookup` and not `query`, this will be translated to an empty string. | | **nosymbols** boolean | **Choices:*** **no** ← * yes | | use alphanumeric characters. | | **overwrite** boolean | **Choices:*** **no** ← * yes | | Overwrite the password if it does already exist. | | **passwordstore** string | **Default:**"~/.password-store" | | location of the password store. | | **returnall** boolean | **Choices:*** **no** ← * yes | | Return all the content of the password, not only the first line. | | **subkey** string | **Default:**"password" | | Return a specific subkey of the password. When set to `password`, always returns the first line. | | **umask** string added in 1.3.0 of community.general | | env:PASSWORD\_STORE\_UMASK | Sets the umask for the created .gpg files. The first octed must be greater than 3 (user readable). Note pass' default value is `'077'`. | | **userpass** string | | | Specify a password to save, instead of a generated one. | Examples -------- ``` # Debug is used for examples, BAD IDEA to show passwords on screen - name: Basic lookup. Fails if example/test doesn't exist ansible.builtin.debug: msg: "{{ lookup('community.general.passwordstore', 'example/test')}}" - name: Basic lookup. Warns if example/test does not exist and returns empty string ansible.builtin.debug: msg: "{{ lookup('community.general.passwordstore', 'example/test missing=warn')}}" - name: Create pass with random 16 character password. If password exists just give the password ansible.builtin.debug: var: mypassword vars: mypassword: "{{ lookup('community.general.passwordstore', 'example/test create=true')}}" - name: Create pass with random 16 character password. If password exists just give the password ansible.builtin.debug: var: mypassword vars: mypassword: "{{ lookup('community.general.passwordstore', 'example/test missing=create')}}" - name: Prints 'abc' if example/test does not exist, just give the password otherwise ansible.builtin.debug: var: mypassword vars: mypassword: "{{ lookup('community.general.passwordstore', 'example/test missing=empty') | default('abc', true) }}" - name: Different size password ansible.builtin.debug: msg: "{{ lookup('community.general.passwordstore', 'example/test create=true length=42')}}" - name: Create password and overwrite the password if it exists. As a bonus, this module includes the old password inside the pass file ansible.builtin.debug: msg: "{{ lookup('community.general.passwordstore', 'example/test create=true overwrite=true')}}" - name: Create an alphanumeric password ansible.builtin.debug: msg: "{{ lookup('community.general.passwordstore', 'example/test create=true nosymbols=true') }}" - name: Return the value for user in the KV pair user, username ansible.builtin.debug: msg: "{{ lookup('community.general.passwordstore', 'example/test subkey=user')}}" - name: Return the entire password file content ansible.builtin.set_fact: passfilecontent: "{{ lookup('community.general.passwordstore', 'example/test returnall=true')}}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **\_raw** list / elements=string | success | a password | ### Authors * Patrick Deelman (!UNKNOWN) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#4838293c3a212b236e6b7b7f736e6b7d7a736e6b7c707338293c3a212b232c2d2d242529266e6b7c7e732624)> ansible community.general.ovh_ip_failover – Manage OVH IP failover address community.general.ovh\_ip\_failover – Manage OVH IP failover address ==================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ovh_ip_failover`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage OVH (French European hosting provider) IP Failover Address. For now, this module can only be used to move an ip failover (or failover block) between services Requirements ------------ The below requirements are needed on the host that executes this module. * ovh >= 0.4.8 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **application\_key** string / required | | The applicationKey to use | | **application\_secret** string / required | | The application secret to use | | **consumer\_key** string / required | | The consumer key to use | | **endpoint** string / required | | The endpoint to use ( for instance ovh-eu) | | **name** string / required | | The IP address to manage (can be a single IP like 1.1.1.1 or a block like 1.1.1.1/28 ) | | **service** string / required | | The name of the OVH service this IP address should be routed | | **timeout** integer | **Default:**120 | The timeout in seconds used to wait for a task to be completed. Default is 120 seconds. | | **wait\_completion** boolean | **Choices:*** no * **yes** ← | If true, the module will wait for the IP address to be moved. If false, exit without waiting. The taskId will be returned in module output | | **wait\_task\_completion** integer | **Default:**0 | If not 0, the module will wait for this task id to be completed. Use wait\_task\_completion if you want to wait for completion of a previously executed task with wait\_completion=false. You can execute this module repeatedly on a list of failover IPs using wait\_completion=false (see examples) | Notes ----- Note * Uses the python OVH Api <https://github.com/ovh/python-ovh>. You have to create an application (a key and secret) with a consummer key as described into <https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/> Examples -------- ``` # Route an IP address 1.1.1.1 to the service ns666.ovh.net - community.general.ovh_ip_failover: name: 1.1.1.1 service: ns666.ovh.net endpoint: ovh-eu application_key: yourkey application_secret: yoursecret consumer_key: yourconsumerkey - community.general.ovh_ip_failover: name: 1.1.1.1 service: ns666.ovh.net endpoint: ovh-eu wait_completion: false application_key: yourkey application_secret: yoursecret consumer_key: yourconsumerkey register: moved - community.general.ovh_ip_failover: name: 1.1.1.1 service: ns666.ovh.net endpoint: ovh-eu wait_task_completion: "{{moved.taskId}}" application_key: yourkey application_secret: yoursecret consumer_key: yourconsumerkey ``` ### Authors * Pascal HERAUD (@pascalheraud) ansible community.general.swdepot – Manage packages with swdepot package manager (HP-UX) community.general.swdepot – Manage packages with swdepot package manager (HP-UX) ================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.swdepot`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Will install, upgrade and remove packages with swdepot package manager (HP-UX) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **depot** string | | The source repository from which install or upgrade a package. | | **name** string / required | | package name. aliases: pkg | | **state** string / required | **Choices:*** present * latest * absent | whether to install (`present`, `latest`), or remove (`absent`) a package. | Examples -------- ``` - name: Install a package community.general.swdepot: name: unzip-6.0 state: present depot: 'repository:/path' - name: Install the latest version of a package community.general.swdepot: name: unzip state: latest depot: 'repository:/path' - name: Remove a package community.general.swdepot: name: unzip state: absent ``` ### Authors * Raul Melo (@melodous) ansible community.general.say – notify using software speech synthesizer community.general.say – notify using software speech synthesizer ================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.say`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Notes](#notes) Synopsis -------- * This plugin will use the ‘say’ or ‘espeak’ program to “speak” about play events. Requirements ------------ The below requirements are needed on the local controller node that executes this callback. * whitelisting in configuration * the ‘/usr/bin/say’ command line program (standard on macOS) or ‘espeak’ command line program Notes ----- Note * In 2.8, this callback has been renamed from `osx_say` into [community.general.say](say_module#ansible-collections-community-general-say-module). ### Authors * Unknown (!UNKNOWN) ansible community.general.one_vm – Creates or terminates OpenNebula instances community.general.one\_vm – Creates or terminates OpenNebula instances ====================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.one_vm`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manages OpenNebula instances Requirements ------------ The below requirements are needed on the host that executes this module. * pyone Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_password** string | | Password of the user to login into OpenNebula RPC server. If not set then the value of the `ONE_PASSWORD` environment variable is used. if both *api\_username* or *api\_password* are not set, then it will try authenticate with ONE auth file. Default path is "~/.one/one\_auth". Set environment variable `ONE_AUTH` to override this path. | | **api\_url** string | | URL of the OpenNebula RPC server. It is recommended to use HTTPS so that the username/password are not transferred over the network unencrypted. If not set then the value of the `ONE_URL` environment variable is used. | | **api\_username** string | | Name of the user to login into the OpenNebula RPC server. If not set then the value of the `ONE_USERNAME` environment variable is used. | | **attributes** dictionary | **Default:**{} | A dictionary of key/value attributes to add to new instances, or for setting `state` of instances with these attributes. Keys are case insensitive and OpenNebula automatically converts them to upper case. Be aware `NAME` is a special attribute which sets the name of the VM when it's deployed. `#` character(s) can be appended to the `NAME` and the module will automatically add indexes to the names of VMs. For example':' `NAME':' foo-###` would create VMs with names `foo-000`, `foo-001`,... When used with `count_attributes` and `exact_count` the module will match the base name without the index part. | | **count** integer | **Default:**1 | Number of instances to launch | | **count\_attributes** dictionary | | A dictionary of key/value attributes that can only be used with `exact_count` to determine how many nodes based on a specific attributes criteria should be deployed. This can be expressed in multiple ways and is shown in the EXAMPLES section. | | **count\_labels** list / elements=string | | A list of labels that can only be used with `exact_count` to determine how many nodes based on a specific labels criteria should be deployed. This can be expressed in multiple ways and is shown in the EXAMPLES section. | | **cpu** float | | Percentage of CPU divided by 100 required for the new instance. Half a processor is written 0.5. | | **datastore\_id** integer added in 0.2.0 of community.general | | Name of Datastore to use to create a new instace | | **datastore\_name** string added in 0.2.0 of community.general | | Name of Datastore to use to create a new instace | | **disk\_saveas** dictionary | | Creates an image from a VM disk. It is a dictionary where you have to specify `name` of the new image. Optionally you can specify `disk_id` of the disk you want to save. By default `disk_id` is 0. *NOTE*':' This operation will only be performed on the first VM (if more than one VM ID is passed) and the VM has to be in the `poweredoff` state. Also this operation will fail if an image with specified `name` already exists. | | **disk\_size** list / elements=string | | The size of the disk created for new instances (in MB, GB, TB,...). NOTE':' If The Template hats Multiple Disks the Order of the Sizes is matched against the order specified in `template_id`/`template_name`. | | **exact\_count** integer | | Indicates how many instances that match `count_attributes` and `count_labels` parameters should be deployed. Instances are either created or terminated based on this value. NOTE':' Instances with the least IDs will be terminated first. | | **group\_id** integer | | ID of the group which will be set as the group of the instance | | **hard** boolean | **Choices:*** **no** ← * yes | Reboot, power-off or terminate instances `hard` | | **instance\_ids** list / elements=integer | | A list of instance ids used for states':' `absent`, `running`, `rebooted`, `poweredoff` aliases: ids | | **labels** list / elements=string | **Default:**[] | A list of labels to associate with new instances, or for setting `state` of instances with these labels. | | **memory** string | | The size of the memory for new instances (in MB, GB, ...) | | **mode** string | | Set permission mode of the instance in octet format, e.g. `600` to give owner `use` and `manage` and nothing to group and others. | | **networks** list / elements=dictionary | **Default:**[] | A list of dictionaries with network parameters. See examples for more details. | | **owner\_id** integer | | ID of the user which will be set as the owner of the instance | | **persistent** boolean added in 0.2.0 of community.general | **Choices:*** **no** ← * yes | Create a private persistent copy of the template plus any image defined in DISK, and instantiate that copy. | | **state** string | **Choices:*** **present** ← * absent * running * rebooted * poweredoff | `present` - create instances from a template specified with `template_id`/`template_name`. `running` - run instances `poweredoff` - power-off instances `rebooted` - reboot instances `absent` - terminate instances | | **template\_id** integer | | ID of a VM template to use to create a new instance | | **template\_name** string | | Name of VM template to use to create a new instace | | **vcpu** integer | | Number of CPUs (cores) new VM will have. | | **vm\_start\_on\_hold** boolean | **Choices:*** **no** ← * yes | Set to true to put vm on hold while creating | | **wait** boolean | **Choices:*** no * **yes** ← | Wait for the instance to reach its desired state before returning. Keep in mind if you are waiting for instance to be in running state it doesn't mean that you will be able to SSH on that machine only that boot process have started on that instance, see 'wait\_for' example for details. | | **wait\_timeout** integer | **Default:**300 | How long before wait gives up, in seconds | Examples -------- ``` - name: Create a new instance community.general.one_vm: template_id: 90 register: result - name: Print VM properties ansible.builtin.debug: msg: result - name: Deploy a new VM on hold community.general.one_vm: template_name: 'app1_template' vm_start_on_hold: 'True' - name: Deploy a new VM and set its name to 'foo' community.general.one_vm: template_name: 'app1_template' attributes: name: foo - name: Deploy a new VM and set its group_id and mode community.general.one_vm: template_id: 90 group_id: 16 mode: 660 - name: Deploy a new VM as persistent community.general.one_vm: template_id: 90 persistent: yes - name: Change VM's permissions to 640 community.general.one_vm: instance_ids: 5 mode: 640 - name: Deploy 2 new instances and set memory, vcpu, disk_size and 3 networks community.general.one_vm: template_id: 15 disk_size: 35.2 GB memory: 4 GB vcpu: 4 count: 2 networks: - NETWORK_ID: 27 - NETWORK: "default-network" NETWORK_UNAME: "app-user" SECURITY_GROUPS: "120,124" - NETWORK_ID: 27 SECURITY_GROUPS: "10" - name: Deploy a new instance which uses a Template with two Disks community.general.one_vm: template_id: 42 disk_size: - 35.2 GB - 50 GB memory: 4 GB vcpu: 4 count: 1 networks: - NETWORK_ID: 27 - name: "Deploy an new instance with attribute 'bar: bar1' and set its name to 'foo'" community.general.one_vm: template_id: 53 attributes: name: foo bar: bar1 - name: "Enforce that 2 instances with attributes 'foo1: app1' and 'foo2: app2' are deployed" community.general.one_vm: template_id: 53 attributes: foo1: app1 foo2: app2 exact_count: 2 count_attributes: foo1: app1 foo2: app2 - name: Enforce that 4 instances with an attribute 'bar' are deployed community.general.one_vm: template_id: 53 attributes: name: app bar: bar2 exact_count: 4 count_attributes: bar: # Deploy 2 new instances with attribute 'foo: bar' and labels 'app1' and 'app2' and names in format 'fooapp-##' # Names will be: fooapp-00 and fooapp-01 - name: Deploy 2 new instances community.general.one_vm: template_id: 53 attributes: name: fooapp-## foo: bar labels: - app1 - app2 count: 2 # Deploy 2 new instances with attribute 'app: app1' and names in format 'fooapp-###' # Names will be: fooapp-002 and fooapp-003 - name: Deploy 2 new instances community.general.one_vm: template_id: 53 attributes: name: fooapp-### app: app1 count: 2 # Reboot all instances with name in format 'fooapp-#' # Instances 'fooapp-00', 'fooapp-01', 'fooapp-002' and 'fooapp-003' will be rebooted - name: Reboot all instances with names in a certain format community.general.one_vm: attributes: name: fooapp-# state: rebooted # Enforce that only 1 instance with name in format 'fooapp-#' is deployed # The task will delete oldest instances, so only the 'fooapp-003' will remain - name: Enforce that only 1 instance with name in a certain format is deployed community.general.one_vm: template_id: 53 exact_count: 1 count_attributes: name: fooapp-# - name: Deploy an new instance with a network community.general.one_vm: template_id: 53 networks: - NETWORK_ID: 27 register: vm - name: Wait for SSH to come up ansible.builtin.wait_for_connection: delegate_to: '{{ vm.instances[0].networks[0].ip }}' - name: Terminate VMs by ids community.general.one_vm: instance_ids: - 153 - 160 state: absent - name: Reboot all VMs that have labels 'foo' and 'app1' community.general.one_vm: labels: - foo - app1 state: rebooted - name: "Fetch all VMs that have name 'foo' and attribute 'app: bar'" community.general.one_vm: attributes: name: foo app: bar register: results - name: Deploy 2 new instances with labels 'foo1' and 'foo2' community.general.one_vm: template_name: app_template labels: - foo1 - foo2 count: 2 - name: Enforce that only 1 instance with label 'foo1' will be running community.general.one_vm: template_name: app_template labels: - foo1 exact_count: 1 count_labels: - foo1 - name: Terminate all instances that have attribute foo community.general.one_vm: template_id: 53 exact_count: 0 count_attributes: foo: - name: "Power-off the VM and save VM's disk with id=0 to the image with name 'foo-image'" community.general.one_vm: instance_ids: 351 state: poweredoff disk_saveas: name: foo-image - name: "Save VM's disk with id=1 to the image with name 'bar-image'" community.general.one_vm: instance_ids: 351 disk_saveas: name: bar-image disk_id: 1 ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **instances** complex | success | a list of instances info whose state is changed or which are fetched with `instance_ids` option. | | | **attributes** dictionary | success | A dictionary of key/values attributes that are associated with the instance **Sample:** {'HYPERVISOR': 'kvm', 'LOGO': 'images/logos/centos.png', 'TE\_GALAXY': 'bar', 'USER\_INPUTS': None} | | | **cpu** float | success | Percentage of CPU divided by 100 **Sample:** 0.2 | | | **disk\_size** string | success | The size of the disk in MB **Sample:** 20480 MB | | | **group\_id** integer | success | vm's group id **Sample:** 1 | | | **group\_name** string | success | vm's group name **Sample:** one-users | | | **labels** list / elements=string | success | A list of string labels that are associated with the instance **Sample:** ['foo', 'spec-label'] | | | **lcm\_state** string | success | lcm state of an instance that is only relevant when the state is ACTIVE **Sample:** RUNNING | | | **memory** string | success | The size of the memory in MB **Sample:** 4096 MB | | | **mode** string | success | vm's mode **Sample:** 660 | | | **networks** list / elements=string | success | a list of dictionaries with info about IP, NAME, MAC, SECURITY\_GROUPS for each NIC **Sample:** [{'ip': '10.120.5.33', 'mac': '02:00:0a:78:05:21', 'name': 'default-test-private', 'security\_groups': '0,10'}, {'ip': '10.120.5.34', 'mac': '02:00:0a:78:05:22', 'name': 'default-test-private', 'security\_groups': '0'}] | | | **owner\_id** integer | success | vm's owner id **Sample:** 143 | | | **owner\_name** string | success | vm's owner name **Sample:** app-user | | | **state** string | success | state of an instance **Sample:** ACTIVE | | | **template\_id** integer | success | vm's template id **Sample:** 153 | | | **uptime\_h** integer | success | Uptime of the instance in hours **Sample:** 35 | | | **vcpu** integer | success | Number of CPUs (cores) **Sample:** 2 | | | **vm\_id** integer | success | vm id **Sample:** 153 | | | **vm\_name** string | success | vm name **Sample:** foo | | **instances\_ids** list / elements=string | success | a list of instances ids whose state is changed or which are fetched with `instance_ids` option. **Sample:** [1234, 1235] | | **tagged\_instances** complex | success | A list of instances info based on a specific attributes and/or labels that are specified with `count_attributes` and `count_labels` options. | | | **attributes** dictionary | success | A dictionary of key/values attributes that are associated with the instance **Sample:** {'HYPERVISOR': 'kvm', 'LOGO': 'images/logos/centos.png', 'TE\_GALAXY': 'bar', 'USER\_INPUTS': None} | | | **cpu** float | success | Percentage of CPU divided by 100 **Sample:** 0.2 | | | **disk\_size** list / elements=string | success | The size of the disk in MB **Sample:** ['20480 MB', '10240 MB'] | | | **group\_id** integer | success | vm's group id **Sample:** 1 | | | **group\_name** string | success | vm's group name **Sample:** one-users | | | **labels** list / elements=string | success | A list of string labels that are associated with the instance **Sample:** ['foo', 'spec-label'] | | | **lcm\_state** string | success | lcm state of an instance that is only relevant when the state is ACTIVE **Sample:** RUNNING | | | **memory** string | success | The size of the memory in MB **Sample:** 4096 MB | | | **mode** string | success | vm's mode **Sample:** 660 | | | **networks** list / elements=string | success | a list of dictionaries with info about IP, NAME, MAC, SECURITY\_GROUPS for each NIC **Sample:** [{'ip': '10.120.5.33', 'mac': '02:00:0a:78:05:21', 'name': 'default-test-private', 'security\_groups': '0,10'}, {'ip': '10.120.5.34', 'mac': '02:00:0a:78:05:22', 'name': 'default-test-private', 'security\_groups': '0'}] | | | **owner\_id** integer | success | vm's user id **Sample:** 143 | | | **owner\_name** string | success | vm's user name **Sample:** app-user | | | **state** string | success | state of an instance **Sample:** ACTIVE | | | **template\_id** integer | success | vm's template id **Sample:** 153 | | | **uptime\_h** integer | success | Uptime of the instance in hours **Sample:** 35 | | | **vcpu** integer | success | Number of CPUs (cores) **Sample:** 2 | | | **vm\_id** integer | success | vm id **Sample:** 153 | | | **vm\_name** string | success | vm name **Sample:** foo | ### Authors * Milan Ilic (@ilicmilan) * Jan Meerkamp (@meerkampdvv)
programming_docs
ansible community.general.hpilo_info – Gather information through an HP iLO interface community.general.hpilo\_info – Gather information through an HP iLO interface ============================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.hpilo_info`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module gathers information on a specific system using its HP iLO interface. These information includes hardware and network related information useful for provisioning (e.g. macaddress, uuid). * This module requires the `hpilo` python module. * This module was called `hpilo_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [community.general.hpilo\_info](#ansible-collections-community-general-hpilo-info-module) module no longer returns `ansible_facts`! Requirements ------------ The below requirements are needed on the host that executes this module. * hpilo Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **host** string / required | | The HP iLO hostname/address that is linked to the physical system. | | **login** string | **Default:**"Administrator" | The login name to authenticate to the HP iLO interface. | | **password** string | **Default:**"admin" | The password to authenticate to the HP iLO interface. | | **ssl\_version** string | **Choices:*** SSLv3 * SSLv23 * **TLSv1** ← * TLSv1\_1 * TLSv1\_2 | Change the ssl\_version used. | Notes ----- Note * This module ought to be run from a system that can access the HP iLO interface directly, either by using `local_action` or using `delegate_to`. Examples -------- ``` - name: Gather facts from a HP iLO interface only if the system is an HP server community.general.hpilo_info: host: YOUR_ILO_ADDRESS login: YOUR_ILO_LOGIN password: YOUR_ILO_PASSWORD when: cmdb_hwmodel.startswith('HP ') delegate_to: localhost register: results - ansible.builtin.fail: msg: 'CMDB serial ({{ cmdb_serialno }}) does not match hardware serial ({{ results.hw_system_serial }}) !' when: cmdb_serialno != results.hw_system_serial ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **host\_power\_status** string added in 3.5.0 of community.general | always | Power status of host. Will be one of `ON`, `OFF` and `UNKNOWN`. **Sample:** True | | **hw\_bios\_date** string | always | BIOS date **Sample:** 05/05/2011 | | **hw\_bios\_version** string | always | BIOS version **Sample:** P68 | | **hw\_eth\_ilo** dictionary | always | Interface information (for the iLO network interface) **Sample:** [{'macaddress': '00:11:22:33:44:BA'}, {'macaddress\_dash': '00-11-22-33-44-BA'}] | | **hw\_ethX** dictionary | always | Interface information (for each interface) **Sample:** [{'macaddress': '00:11:22:33:44:55', 'macaddress\_dash': '00-11-22-33-44-55'}] | | **hw\_product\_name** string | always | Product name **Sample:** ProLiant DL360 G7 | | **hw\_product\_uuid** string | always | Product UUID **Sample:** ef50bac8-2845-40ff-81d9-675315501dac | | **hw\_system\_serial** string | always | System serial number **Sample:** ABC12345D6 | | **hw\_uuid** string | always | Hardware UUID **Sample:** 123456ABC78901D2 | ### Authors * Dag Wieers (@dagwieers) ansible community.general.webfaction_mailbox – Add or remove mailboxes on Webfaction community.general.webfaction\_mailbox – Add or remove mailboxes on Webfaction ============================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.webfaction_mailbox`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Add or remove mailboxes on a Webfaction account. Further documentation at <https://github.com/quentinsf/ansible-webfaction>. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **login\_name** string / required | | The webfaction account to use | | **login\_password** string / required | | The webfaction password to use | | **mailbox\_name** string / required | | The name of the mailbox | | **mailbox\_password** string / required | | The password for the mailbox | | **state** string | **Choices:*** **present** ← * absent | Whether the mailbox should exist | Notes ----- Note * You can run playbooks that use this on a local machine, or on a Webfaction host, or elsewhere, since the scripts use the remote webfaction API. The location is not important. However, running them on multiple hosts *simultaneously* is best avoided. If you don’t specify *localhost* as your host, you may want to add `serial: 1` to the plays. * See [the webfaction API](https://docs.webfaction.com/xmlrpc-api/) for more info. Examples -------- ``` - name: Create a mailbox community.general.webfaction_mailbox: mailbox_name="mybox" mailbox_password="myboxpw" state=present login_name={{webfaction_user}} login_password={{webfaction_passwd}} ``` ### Authors * Quentin Stafford-Fraser (@quentinsf) ansible community.general.chef_databag – fetches data from a Chef Databag community.general.chef\_databag – fetches data from a Chef Databag ================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.chef_databag`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This is a lookup plugin to provide access to chef data bags using the pychef package. It interfaces with the chef server api using the same methods to find a knife or chef-client config file to load parameters from, starting from either the given base path or the current working directory. The lookup order mirrors the one from Chef, all folders in the base path are walked back looking for the following configuration file in order : .chef/knife.rb, ~/.chef/knife.rb, /etc/chef/client.rb Requirements ------------ The below requirements are needed on the local controller node that executes this lookup. * pychef (python library <https://pychef.readthedocs.io> `pip install pychef`) Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **item** string / required | | | Item to fetch | | **name** string / required | | | Name of the databag | Examples -------- ``` - ansible.builtin.debug: msg: "{{ lookup('community.general.chef_databag', 'name=data_bag_name item=data_bag_item') }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **\_raw** list / elements=dictionary | success | The value from the databag. | ### Authors * Unknown (!UNKNOWN) ansible community.general.mas – Manage Mac App Store applications with mas-cli community.general.mas – Manage Mac App Store applications with mas-cli ====================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.mas`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Installs, uninstalls and updates macOS applications from the Mac App Store using the `mas-cli`. Requirements ------------ The below requirements are needed on the host that executes this module. * macOS 10.11+ * mas-cli (<https://github.com/mas-cli/mas>) 1.5.0+ available as `mas` in the bin path * The Apple ID to use already needs to be signed in to the Mac App Store (check with `mas account`). Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **id** list / elements=integer | | The Mac App Store identifier of the app(s) you want to manage. This can be found by running `mas search APP_NAME` on your machine. | | **state** string | **Choices:*** absent * latest * **present** ← | Desired state of the app installation. The `absent` value requires root permissions, also see the examples. | | **upgrade\_all** boolean | **Choices:*** **no** ← * yes | Upgrade all installed Mac App Store apps. aliases: upgrade | Notes ----- Note * This module supports `check_mode`. Examples -------- ``` - name: Install Keynote community.general.mas: id: 409183694 state: present - name: Install Divvy with command mas installed in /usr/local/bin community.general.mas: id: 413857545 state: present environment: PATH: /usr/local/bin:{{ ansible_facts.env.PATH }} - name: Install a list of apps community.general.mas: id: - 409183694 # Keynote - 413857545 # Divvy state: present - name: Ensure the latest Keynote version is installed community.general.mas: id: 409183694 state: latest - name: Upgrade all installed Mac App Store apps community.general.mas: upgrade_all: yes - name: Install specific apps and also upgrade all others community.general.mas: id: - 409183694 # Keynote - 413857545 # Divvy state: present upgrade_all: yes - name: Uninstall Divvy community.general.mas: id: 413857545 state: absent become: yes # Uninstallation requires root permissions ``` ### Authors * Michael Heap (@mheap) * Lukas Bestle (@lukasbestle) ansible community.general.pam_limits – Modify Linux PAM limits community.general.pam\_limits – Modify Linux PAM limits ======================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pam_limits`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * The `pam_limits` module modifies PAM limits. * The default file is `/etc/security/limits.conf`. * For the full documentation, see `man 5 limits.conf`. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **backup** boolean | **Choices:*** **no** ← * yes | Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. | | **comment** string | **Default:**"" | Comment associated with the limit. | | **dest** string | **Default:**"/etc/security/limits.conf" | Modify the limits.conf path. | | **domain** string / required | | A username, @groupname, wildcard, UID/GID range. | | **limit\_item** string / required | **Choices:*** core * data * fsize * memlock * nofile * rss * stack * cpu * nproc * as * maxlogins * maxsyslogins * priority * locks * sigpending * msgqueue * nice * rtprio * chroot | The limit to be set. | | **limit\_type** string / required | **Choices:*** hard * soft * - | Limit type, see `man 5 limits.conf` for an explanation. | | **use\_max** boolean | **Choices:*** **no** ← * yes | If set to `yes`, the maximal value will be used or conserved. If the specified value is superior to the value in the file, file content is replaced with the new value, else content is not modified. | | **use\_min** boolean | **Choices:*** **no** ← * yes | If set to `yes`, the minimal value will be used or conserved. If the specified value is inferior to the value in the file, file content is replaced with the new value, else content is not modified. | | **value** string / required | | The value of the limit. Value must either be `unlimited`, `infinity` or `-1`, all of which indicate no limit, or a limit of 0 or larger. Value must be a number in the range -20 to 19 inclusive, if *limit\_item* is set to `nice` or `priority`. Refer to the `man 5 limits.conf` manual pages for more details. | Notes ----- Note * If *dest* file does not exist, it is created. Examples -------- ``` - name: Add or modify nofile soft limit for the user joe community.general.pam_limits: domain: joe limit_type: soft limit_item: nofile value: 64000 - name: Add or modify fsize hard limit for the user smith. Keep or set the maximal value community.general.pam_limits: domain: smith limit_type: hard limit_item: fsize value: 1000000 use_max: yes - name: Add or modify memlock, both soft and hard, limit for the user james with a comment community.general.pam_limits: domain: james limit_type: '-' limit_item: memlock value: unlimited comment: unlimited memory lock for james - name: Add or modify hard nofile limits for wildcard domain community.general.pam_limits: domain: '*' limit_type: hard limit_item: nofile value: 39693561 ``` ### Authors * Sebastien Rohaut (@usawa) ansible community.general.gem – Manage Ruby gems community.general.gem – Manage Ruby gems ======================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.gem`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manage installation and uninstallation of Ruby gems. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **bindir** path added in 3.3.0 of community.general | | Install executables into a specific directory. | | **build\_flags** string | | Allow adding build flags for gem compilation | | **env\_shebang** boolean | **Choices:*** **no** ← * yes | Rewrite the shebang line on installed scripts to use /usr/bin/env. | | **executable** path | | Override the path to the gem executable | | **force** boolean | **Choices:*** **no** ← * yes | Force gem to install, bypassing dependency checks. | | **gem\_source** path | | The path to a local gem used as installation source. | | **include\_dependencies** boolean | **Choices:*** no * **yes** ← | Whether to include dependencies or not. | | **include\_doc** boolean | **Choices:*** **no** ← * yes | Install with or without docs. | | **install\_dir** path | | Install the gems into a specific directory. These gems will be independent from the global installed ones. Specifying this requires user\_install to be false. | | **name** string / required | | The name of the gem to be managed. | | **norc** boolean added in 3.3.0 of community.general | **Choices:*** **no** ← * yes | Avoid loading any `.gemrc` file. Ignored for RubyGems prior to 2.5.2. The current default value will be deprecated in community.general 4.0.0: if the value is not explicitly specified, a deprecation message will be shown. From community.general 5.0.0 on, the default will be changed to `true`. | | **pre\_release** boolean | **Choices:*** **no** ← * yes | Allow installation of pre-release versions of the gem. | | **repository** string | | The repository from which the gem will be installed aliases: source | | **state** string | **Choices:*** **present** ← * absent * latest | The desired state of the gem. `latest` ensures that the latest version is installed. | | **user\_install** boolean | **Choices:*** no * **yes** ← | Install gem in user's local gems cache or for all users | | **version** string | | Version of the gem to be installed/removed. | Examples -------- ``` - name: Install version 1.0 of vagrant community.general.gem: name: vagrant version: 1.0 state: present - name: Install latest available version of rake community.general.gem: name: rake state: latest - name: Install rake version 1.0 from a local gem on disk community.general.gem: name: rake gem_source: /path/to/gems/rake-1.0.gem state: present ``` ### Authors * Ansible Core Team * Johan Wiren (@johanwiren) ansible community.general.github_key – Manage GitHub access keys. community.general.github\_key – Manage GitHub access keys. ========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.github_key`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Creates, removes, or updates GitHub access keys. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **force** boolean | **Choices:*** no * **yes** ← | The default is `yes`, which will replace the existing remote key if it's different than `pubkey`. If `no`, the key will only be set if no key with the given `name` exists. | | **name** string / required | | SSH key name | | **pubkey** string | | SSH public key value. Required when `state=present`. | | **state** string | **Choices:*** **present** ← * absent | Whether to remove a key, ensure that it exists, or update its value. | | **token** string / required | | GitHub Access Token with permission to list and create public keys. | Examples -------- ``` - name: Read SSH public key to authorize ansible.builtin.shell: cat /home/foo/.ssh/id_rsa.pub register: ssh_pub_key - name: Authorize key with GitHub local_action: module: github_key name: Access Key for Some Machine token: '{{ github_access_token }}' pubkey: '{{ ssh_pub_key.stdout }}' ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **deleted\_keys** list / elements=string | When state=absent | An array of key objects that were deleted. Only present on state=absent **Sample:** [{'created\_at': 'YYYY-MM-DDTHH:MM:SZ', 'id': 0, 'key': 'BASE64 encoded key', 'read\_only': False, 'url': 'http://example.com/github key'}] | | **key** dictionary | success | Metadata about the key just created. Only present on state=present **Sample:** {'created\_at': 'YYYY-MM-DDTHH:MM:SZ', 'id': 0, 'key': 'BASE64 encoded key', 'read\_only': False, 'url': 'http://example.com/github key'} | | **matching\_keys** list / elements=string | When state=present | An array of keys matching the specified name. Only present on state=present **Sample:** [{'created\_at': 'YYYY-MM-DDTHH:MM:SZ', 'id': 0, 'key': 'BASE64 encoded key', 'read\_only': False, 'url': 'http://example.com/github key'}] | ### Authors * Robert Estelle (@erydo)
programming_docs
ansible community.general.oneview_logical_interconnect_group – Manage OneView Logical Interconnect Group resources community.general.oneview\_logical\_interconnect\_group – Manage OneView Logical Interconnect Group resources ============================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneview_logical_interconnect_group`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Provides an interface to manage Logical Interconnect Group resources. Can create, update, or delete. Requirements ------------ The below requirements are needed on the host that executes this module. * hpOneView >= 4.0.0 * python >= 2.7.9 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_version** integer | | OneView API Version. | | **config** path | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional and when used should be present in the host running the ansible commands. If the file path is not provided, the configuration will be loaded from environment variables. For links to example configuration files or how to use the environment variables verify the notes section. | | **data** dictionary / required | | List with the Logical Interconnect Group properties. | | **hostname** string | | IP address or hostname for the appliance. | | **image\_streamer\_hostname** string | | IP address or hostname for the HPE Image Streamer REST API. | | **password** string | | Password for API authentication. | | **state** string | **Choices:*** absent * **present** ← | Indicates the desired state for the Logical Interconnect Group resource. `absent` will remove the resource from OneView, if it exists. `present` will ensure data properties are compliant with OneView. | | **username** string | | Username for API authentication. | | **validate\_etag** boolean | **Choices:*** no * **yes** ← | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. | Notes ----- Note * A sample configuration file for the config parameter can be found at: <https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json> * Check how to use environment variables for configuration at: <https://github.com/HewlettPackard/oneview-ansible#environment-variables> * Additional Playbooks for the HPE OneView Ansible modules can be found at: <https://github.com/HewlettPackard/oneview-ansible/tree/master/examples> * The OneView API version used will directly affect returned and expected fields in resources. Information on setting the desired API version and can be found at: <https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version> Examples -------- ``` - name: Ensure that the Logical Interconnect Group is present community.general.oneview_logical_interconnect_group: config: /etc/oneview/oneview_config.json state: present data: name: Test Logical Interconnect Group uplinkSets: [] enclosureType: C7000 interconnectMapTemplate: interconnectMapEntryTemplates: - logicalDownlinkUri: ~ logicalLocation: locationEntries: - relativeValue: 1 type: Bay - relativeValue: 1 type: Enclosure permittedInterconnectTypeName: HP VC Flex-10/10D Module # Alternatively you can inform permittedInterconnectTypeUri delegate_to: localhost - name: Ensure that the Logical Interconnect Group has the specified scopes community.general.oneview_logical_interconnect_group: config: /etc/oneview/oneview_config.json state: present data: name: Test Logical Interconnect Group scopeUris: - /rest/scopes/00SC123456 - /rest/scopes/01SC123456 delegate_to: localhost - name: Ensure that the Logical Interconnect Group is present with name 'Test' community.general.oneview_logical_interconnect_group: config: /etc/oneview/oneview_config.json state: present data: name: New Logical Interconnect Group newName: Test delegate_to: localhost - name: Ensure that the Logical Interconnect Group is absent community.general.oneview_logical_interconnect_group: config: /etc/oneview/oneview_config.json state: absent data: name: New Logical Interconnect Group delegate_to: localhost ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **logical\_interconnect\_group** dictionary | On state 'present'. Can be null. | Has the facts about the OneView Logical Interconnect Group. | ### Authors * Felipe Bulsoni (@fgbulsoni) * Thiago Miotto (@tmiotto) * Adriane Cardozo (@adriane-cardozo) ansible community.general.profitbricks_volume – Create or destroy a volume. community.general.profitbricks\_volume – Create or destroy a volume. ==================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.profitbricks_volume`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Allows you to create or remove a volume from a ProfitBricks datacenter. This module has a dependency on profitbricks >= 1.0.0 Requirements ------------ The below requirements are needed on the host that executes this module. * profitbricks Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **auto\_increment** boolean | **Choices:*** no * **yes** ← | Whether or not to increment a single number in the name for created virtual machines. | | **bus** string | **Choices:*** IDE * **VIRTIO** ← | The bus type. | | **count** integer | **Default:**1 | The number of volumes you wish to create. | | **datacenter** string | | The datacenter in which to create the volumes. | | **disk\_type** string | **Choices:*** **HDD** ← * SSD | The disk type of the volume. | | **image** string | | The system image ID for the volume, e.g. a3eae284-a2fe-11e4-b187-5f1f641608c8. This can also be a snapshot image ID. | | **image\_password** string | | Password set for the administrative user. | | **instance\_ids** list / elements=string | | list of instance ids, currently only used when state='absent' to remove instances. | | **licence\_type** string | **Default:**"UNKNOWN" | The licence type for the volume. This is used when the image is non-standard. The available choices are: `LINUX`, `WINDOWS`, `UNKNOWN`, `OTHER`. | | **name** string | | The name of the volumes. You can enumerate the names using auto\_increment. | | **server** string | | Server name to attach the volume to. | | **size** integer | **Default:**10 | The size of the volume. | | **ssh\_keys** list / elements=string | | Public SSH keys allowing access to the virtual machine. | | **state** string | **Default:**"present" | create or terminate datacenters The available choices are: `present`, `absent`. | | **subscription\_password** string | | THe ProfitBricks password. Overrides the PB\_PASSWORD environment variable. | | **subscription\_user** string | | The ProfitBricks username. Overrides the PB\_SUBSCRIPTION\_ID environment variable. | | **wait** boolean | **Choices:*** no * **yes** ← | wait for the datacenter to be created before returning | | **wait\_timeout** integer | **Default:**600 | how long before wait gives up, in seconds | Examples -------- ``` - name: Create multiple volumes community.general.profitbricks_volume: datacenter: Tardis One name: vol%02d count: 5 auto_increment: yes wait_timeout: 500 state: present - name: Remove Volumes community.general.profitbricks_volume: datacenter: Tardis One instance_ids: - 'vol01' - 'vol02' wait_timeout: 500 state: absent ``` ### Authors * Matt Baldwin (@baldwinSPC) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#2240434e46554b4c040111151904011710190401161a195156434149524d4b4c56414e4d57460401161419414d4f)> ansible community.general.rax_scaling_group – Manipulate Rackspace Cloud Autoscale Groups community.general.rax\_scaling\_group – Manipulate Rackspace Cloud Autoscale Groups =================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rax_scaling_group`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manipulate Rackspace Cloud Autoscale Groups Requirements ------------ The below requirements are needed on the host that executes this module. * pyrax * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string | | Rackspace API key, overrides *credentials*. aliases: password | | **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/> | | **config\_drive** boolean | **Choices:*** **no** ← * yes | Attach read-only configuration drive to server as label config-2 | | **cooldown** integer | **Default:**300 | The period of time, in seconds, that must pass before any scaling can occur after the previous scaling. Must be an integer between 0 and 86400 (24 hrs). | | **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided. aliases: creds\_file | | **disk\_config** string | **Choices:*** auto * manual | Disk partitioning strategy If not specified, it will fallback to `auto`. | | **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. | | **files** dictionary | | Files to insert into the instance. Hash of `remotepath: localpath` | | **flavor** string / required | | flavor to use for the instance | | **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. | | **image** string / required | | image to use for the instance. Can be an `id`, `human_id` or `name` | | **key\_name** string | | key pair to use on the instance | | **loadbalancers** list / elements=dictionary | | List of load balancer `id` and `port` hashes | | **max\_entities** integer / required | | The maximum number of entities that are allowed in the scaling group. Must be an integer between 0 and 1000. | | **meta** dictionary | | A hash of metadata to associate with the instance | | **min\_entities** integer / required | | The minimum number of entities that are allowed in the scaling group. Must be an integer between 0 and 1000. | | **name** string / required | | Name to give the scaling group | | **networks** list / elements=string | **Default:**["public", "private"] | The network to attach to the instances. If specified, you must include ALL networks including the public and private interfaces. Can be `id` or `label`. | | **region** string | | Region to create an instance in. | | **server\_name** string / required | | The base name for servers created by Autoscale | | **state** string | **Choices:*** **present** ← * absent | Indicate desired state of the resource | | **tenant\_id** string | | The tenant ID used for authentication. | | **tenant\_name** string | | The tenant name used for authentication. | | **user\_data** string | | Data to be uploaded to the servers config drive. This option implies *config\_drive*. Can be a file path or a string | | **username** string | | Rackspace username, overrides *credentials*. | | **validate\_certs** boolean | **Choices:*** no * yes | Whether or not to require SSL validation of API endpoints. aliases: verify\_ssl | | **wait** boolean | **Choices:*** **no** ← * yes | wait for the scaling group to finish provisioning the minimum amount of servers | | **wait\_timeout** integer | **Default:**300 | how long before wait gives up, in seconds | Notes ----- Note * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) Examples -------- ``` --- - hosts: localhost gather_facts: false connection: local tasks: - community.general.rax_scaling_group: credentials: ~/.raxpub region: ORD cooldown: 300 flavor: performance1-1 image: bb02b1a3-bc77-4d17-ab5b-421d89850fca min_entities: 5 max_entities: 10 name: ASG Test server_name: asgtest loadbalancers: - id: 228385 port: 80 register: asg ``` ### Authors * Matt Martz (@sivel) ansible community.general.oneview_network_set_info – Retrieve information about the OneView Network Sets community.general.oneview\_network\_set\_info – Retrieve information about the OneView Network Sets =================================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneview_network_set_info`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Retrieve information about the Network Sets from OneView. * This module was called `oneview_network_set_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [community.general.oneview\_network\_set\_info](#ansible-collections-community-general-oneview-network-set-info-module) module no longer returns `ansible_facts`! Requirements ------------ The below requirements are needed on the host that executes this module. * hpOneView >= 2.0.1 * python >= 2.7.9 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_version** integer | | OneView API Version. | | **config** path | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional and when used should be present in the host running the ansible commands. If the file path is not provided, the configuration will be loaded from environment variables. For links to example configuration files or how to use the environment variables verify the notes section. | | **hostname** string | | IP address or hostname for the appliance. | | **image\_streamer\_hostname** string | | IP address or hostname for the HPE Image Streamer REST API. | | **name** string | | Network Set name. | | **options** list / elements=string | | List with options to gather information about Network Set. Option allowed: `withoutEthernet`. The option `withoutEthernet` retrieves the list of network\_sets excluding Ethernet networks. | | **params** dictionary | | List of params to delimit, filter and sort the list of resources. params allowed: - `start`: The first item to return, using 0-based indexing. - `count`: The number of resources to return. - `filter`: A general filter/query string to narrow the list of items returned. - `sort`: The sort order of the returned data set. | | **password** string | | Password for API authentication. | | **username** string | | Username for API authentication. | Notes ----- Note * A sample configuration file for the config parameter can be found at: <https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json> * Check how to use environment variables for configuration at: <https://github.com/HewlettPackard/oneview-ansible#environment-variables> * Additional Playbooks for the HPE OneView Ansible modules can be found at: <https://github.com/HewlettPackard/oneview-ansible/tree/master/examples> * The OneView API version used will directly affect returned and expected fields in resources. Information on setting the desired API version and can be found at: <https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version> Examples -------- ``` - name: Gather information about all Network Sets community.general.oneview_network_set_info: hostname: 172.16.101.48 username: administrator password: my_password api_version: 500 no_log: true delegate_to: localhost register: result - name: Print fetched information about Network Sets ansible.builtin.debug: msg: "{{ result.network_sets }}" - name: Gather paginated, filtered and sorted information about Network Sets community.general.oneview_network_set_info: hostname: 172.16.101.48 username: administrator password: my_password api_version: 500 params: start: 0 count: 3 sort: 'name:descending' filter: name='netset001' no_log: true delegate_to: localhost register: result - name: Print fetched information about paginated, filtered and sorted list of Network Sets ansible.builtin.debug: msg: "{{ result.network_sets }}" - name: Gather information about all Network Sets, excluding Ethernet networks community.general.oneview_network_set_info: hostname: 172.16.101.48 username: administrator password: my_password api_version: 500 options: - withoutEthernet no_log: true delegate_to: localhost register: result - name: Print fetched information about Network Sets, excluding Ethernet networks ansible.builtin.debug: msg: "{{ result.network_sets }}" - name: Gather information about a Network Set by name community.general.oneview_network_set_info: hostname: 172.16.101.48 username: administrator password: my_password api_version: 500 name: Name of the Network Set no_log: true delegate_to: localhost register: result - name: Print fetched information about Network Set found by name ansible.builtin.debug: msg: "{{ result.network_sets }}" - name: Gather information about a Network Set by name, excluding Ethernet networks community.general.oneview_network_set_info: hostname: 172.16.101.48 username: administrator password: my_password api_version: 500 name: Name of the Network Set options: - withoutEthernet no_log: true delegate_to: localhost register: result - name: Print fetched information about Network Set found by name, excluding Ethernet networks ansible.builtin.debug: msg: "{{ result.network_sets }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **network\_sets** dictionary | Always, but can be empty. | Has all the OneView information about the Network Sets. | ### Authors * Felipe Bulsoni (@fgbulsoni) * Thiago Miotto (@tmiotto) * Adriane Cardozo (@adriane-cardozo)
programming_docs
ansible community.general.solaris_zone – Manage Solaris zones community.general.solaris\_zone – Manage Solaris zones ====================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.solaris_zone`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Create, start, stop and delete Solaris zones. * This module does not currently allow changing of options for a zone that is already been created. Requirements ------------ The below requirements are needed on the host that executes this module. * Solaris 10 or 11 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **attach\_options** string | **Default:**"" | Extra options to the zoneadm attach command. For example, this can be used to specify whether a minimum or full update of packages is required and if any packages need to be deleted. For valid values, see zoneadm(1M) | | **config** string | **Default:**"" | The zonecfg configuration commands for this zone. See zonecfg(1M) for the valid options and syntax. Typically this is a list of options separated by semi-colons or new lines, e.g. "set auto-boot=true;add net;set physical=bge0;set address=10.1.1.1;end" | | **create\_options** string | **Default:**"" | Extra options to the zonecfg(1M) create command. | | **install\_options** string | **Default:**"" | Extra options to the zoneadm(1M) install command. To automate Solaris 11 zone creation, use this to specify the profile XML file, e.g. install\_options="-c sc\_profile.xml" | | **name** string / required | | Zone name. A zone name must be unique name. A zone name must begin with an alpha-numeric character. The name can contain alpha-numeric characters, underbars *\_*, hyphens *-*, and periods *.*. The name cannot be longer than 64 characters. | | **path** string | | The path where the zone will be created. This is required when the zone is created, but not used otherwise. | | **root\_password** string | | The password hash for the root account. If not specified, the zone's root account will not have a password. | | **sparse** boolean | **Choices:*** **no** ← * yes | Whether to create a sparse (`true`) or whole root (`false`) zone. | | **state** string | **Choices:*** absent * attached * configured * detached * installed * **present** ← * running * started * stopped | `present`, configure and install the zone. `installed`, synonym for `present`. `running`, if the zone already exists, boot it, otherwise, configure and install the zone first, then boot it. `started`, synonym for `running`. `stopped`, shutdown a zone. `absent`, destroy the zone. `configured`, configure the ready so that it's to be attached. `attached`, attach a zone, but do not boot it. `detached`, shutdown and detach a zone | | **timeout** integer | **Default:**600 | Timeout, in seconds, for zone to boot. | Examples -------- ``` - name: Create and install a zone, but don't boot it community.general.solaris_zone: name: zone1 state: present path: /zones/zone1 sparse: True root_password: Be9oX7OSwWoU. config: 'set autoboot=true; add net; set physical=bge0; set address=10.1.1.1; end' - name: Create and install a zone and boot it community.general.solaris_zone: name: zone1 state: running path: /zones/zone1 root_password: Be9oX7OSwWoU. config: 'set autoboot=true; add net; set physical=bge0; set address=10.1.1.1; end' - name: Boot an already installed zone community.general.solaris_zone: name: zone1 state: running - name: Stop a zone community.general.solaris_zone: name: zone1 state: stopped - name: Destroy a zone community.general.solaris_zone: name: zone1 state: absent - name: Detach a zone community.general.solaris_zone: name: zone1 state: detached - name: Configure a zone, ready to be attached community.general.solaris_zone: name: zone1 state: configured path: /zones/zone1 root_password: Be9oX7OSwWoU. config: 'set autoboot=true; add net; set physical=bge0; set address=10.1.1.1; end' - name: Attach zone1 community.general.solaris_zone: name: zone1 state: attached attach_options: -u ``` ### Authors * Paul Markham (@pmarkham) ansible community.general.openbsd_pkg – Manage packages on OpenBSD community.general.openbsd\_pkg – Manage packages on OpenBSD =========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.openbsd_pkg`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manage packages on OpenBSD using the pkg tools. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.5 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **build** boolean | **Choices:*** **no** ← * yes | Build the package from source instead of downloading and installing a binary. Requires that the port source tree is already installed. Automatically builds and installs the 'sqlports' package, if it is not already installed. Mutually exclusive with *snapshot*. | | **clean** boolean | **Choices:*** **no** ← * yes | When updating or removing packages, delete the extra configuration file(s) in the old packages which are annotated with @extra in the packaging-list. | | **name** list / elements=string / required | | A name or a list of names of the packages. | | **ports\_dir** path | **Default:**"/usr/ports" | When used in combination with the `build` option, allows overriding the default ports source directory. | | **quick** boolean | **Choices:*** **no** ← * yes | Replace or delete packages quickly; do not bother with checksums before removing normal files. | | **snapshot** boolean added in 1.3.0 of community.general | **Choices:*** **no** ← * yes | Force `%c` and `%m` to expand to `snapshots`, even on a release kernel. Mutually exclusive with *build*. | | **state** string | **Choices:*** absent * latest * **present** ← * installed * removed | `present` will make sure the package is installed. `latest` will make sure the latest version of the package is installed. `absent` will make sure the specified package is not installed. | Notes ----- Note * When used with a `loop:` each package will be processed individually, it is much more efficient to pass the list directly to the `name` option. Examples -------- ``` - name: Make sure nmap is installed community.general.openbsd_pkg: name: nmap state: present - name: Make sure nmap is the latest version community.general.openbsd_pkg: name: nmap state: latest - name: Make sure nmap is not installed community.general.openbsd_pkg: name: nmap state: absent - name: Make sure nmap is installed, build it from source if it is not community.general.openbsd_pkg: name: nmap state: present build: yes - name: Specify a pkg flavour with '--' community.general.openbsd_pkg: name: vim--no_x11 state: present - name: Specify the default flavour to avoid ambiguity errors community.general.openbsd_pkg: name: vim-- state: present - name: Specify a package branch (requires at least OpenBSD 6.0) community.general.openbsd_pkg: name: python%3.5 state: present - name: Update all packages on the system community.general.openbsd_pkg: name: '*' state: latest - name: Purge a package and it's configuration files community.general.openbsd_pkg: name: mpd clean: yes state: absent - name: Quickly remove a package without checking checksums community.general.openbsd_pkg: name: qt5 quick: yes state: absent ``` ### Authors * Patrik Lundin (@eest) ansible community.general.pickle – Pickle formatted files. community.general.pickle – Pickle formatted files. ================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pickle`. * [Synopsis](#synopsis) * [Parameters](#parameters) Synopsis -------- * This cache uses Python’s pickle serialization format, in per host files, saved to the filesystem. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **\_prefix** string | | ini entries: [defaults]fact\_caching\_prefix = None env:ANSIBLE\_CACHE\_PLUGIN\_PREFIX | User defined prefix to use when creating the files | | **\_timeout** string | **Default:**86400 | ini entries: [defaults]fact\_caching\_timeout = 86400 env:ANSIBLE\_CACHE\_PLUGIN\_TIMEOUT | Expiration timeout in seconds for the cache plugin data. Set to 0 to never expire | | **\_uri** string / required | | ini entries: [defaults]fact\_caching\_connection = None env:ANSIBLE\_CACHE\_PLUGIN\_CONNECTION | Path in which the cache plugin will save the files | ### Authors * Brian Coca (@bcoca) ansible community.general.awall – Manage awall policies community.general.awall – Manage awall policies =============================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.awall`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This modules allows for enable/disable/activate of *awall* policies. * Alpine Wall (*awall*) generates a firewall configuration from the enabled policy files and activates the configuration on the system. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **activate** boolean | **Choices:*** **no** ← * yes | Activate the new firewall rules. Can be run with other steps or on its own. | | **name** list / elements=string | | One or more policy names. | | **state** string | **Choices:*** disabled * **enabled** ← | Whether the policies should be enabled or disabled. | Examples -------- ``` - name: Enable "foo" and "bar" policy community.general.awall: name: [ foo bar ] state: enabled - name: Disable "foo" and "bar" policy and activate new rules community.general.awall: name: - foo - bar state: disabled activate: no - name: Activate currently enabled firewall rules community.general.awall: activate: yes ``` ### Authors * Ted Trask (@tdtrask) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#daaeaea8bba9b1eaebfcf9e9ede1fcf9efe8e1fcf9eee2e1a3bbb2b5b5fcf9eeece1b9b5b7)> ansible community.general.onepassword – fetch field values from 1Password community.general.onepassword – fetch field values from 1Password ================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.onepassword`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * `onepassword` wraps the `op` command line utility to fetch specific field values from 1Password. Requirements ------------ The below requirements are needed on the local controller node that executes this lookup. * `op` 1Password command line utility. See <https://support.1password.com/command-line/> Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **\_terms** string / required | | | identifier(s) (UUID, name, or subdomain; case-insensitive) of item(s) to retrieve. | | **domain** string added in 3.2.0 of community.general | **Default:**"1password.com" | | Domain of 1Password. Default is <1password.com>. | | **field** string | **Default:**"password" | | field to return from each matching item (case-insensitive). | | **master\_password** string | | | The password used to unlock the specified vault. aliases: vault\_password | | **secret\_key** string | | | The secret key used when performing an initial sign in. | | **section** string | | | Item section containing the field to retrieve (case-insensitive). If absent will return first match from any section. | | **subdomain** string | | | The 1Password subdomain to authenticate against. | | **username** string | | | The username used to sign in. | | **vault** string | | | Vault containing the item to retrieve (case-insensitive). If absent will search all vaults. | Notes ----- Note * This lookup will use an existing 1Password session if one exists. If not, and you have already performed an initial sign in (meaning `~/.op/config exists`), then only the `master_password` is required. You may optionally specify `subdomain` in this scenario, otherwise the last used subdomain will be used by `op`. * This lookup can perform an initial login by providing `subdomain`, `username`, `secret_key`, and `master_password`. * Due to the **very** sensitive nature of these credentials, it is **highly** recommended that you only pass in the minimal credentials needed at any given time. Also, store these credentials in an Ansible Vault using a key that is equal to or greater in strength to the 1Password master password. * This lookup stores potentially sensitive data from 1Password as Ansible facts. Facts are subject to caching if enabled, which means this data could be stored in clear text on disk or in a database. * Tested with `op` version 0.5.3 Examples -------- ``` # These examples only work when already signed in to 1Password - name: Retrieve password for KITT when already signed in to 1Password ansible.builtin.debug: var: lookup('community.general.onepassword', 'KITT') - name: Retrieve password for Wintermute when already signed in to 1Password ansible.builtin.debug: var: lookup('community.general.onepassword', 'Tessier-Ashpool', section='Wintermute') - name: Retrieve username for HAL when already signed in to 1Password ansible.builtin.debug: var: lookup('community.general.onepassword', 'HAL 9000', field='username', vault='Discovery') - name: Retrieve password for HAL when not signed in to 1Password ansible.builtin.debug: var: lookup('community.general.onepassword' 'HAL 9000' subdomain='Discovery' master_password=vault_master_password) - name: Retrieve password for HAL when never signed in to 1Password ansible.builtin.debug: var: lookup('community.general.onepassword' 'HAL 9000' subdomain='Discovery' master_password=vault_master_password username='[email protected]' secret_key=vault_secret_key) ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **\_raw** list / elements=string | success | field data requested | ### Authors * Scott Buchanan (@scottsb) * Andrew Zenk (@azenk) * Sam Doran (@samdoran) ansible community.general.urpmi – Urpmi manager community.general.urpmi – Urpmi manager ======================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.urpmi`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manages packages with *urpmi* (such as for Mageia or Mandriva) Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **force** boolean | **Choices:*** no * **yes** ← | Assume "yes" is the answer to any question urpmi has to ask. Corresponds to the `--force` option for *urpmi*. | | **name** list / elements=string / required | | A list of package names to install, upgrade or remove. aliases: package, pkg | | **no\_recommends** boolean | **Choices:*** no * **yes** ← | Corresponds to the `--no-recommends` option for *urpmi*. Alias `no-recommends` has been deprecated and will be removed in community.general 5.0.0. aliases: no-recommends | | **root** string | | Specifies an alternative install root, relative to which all packages will be installed. Corresponds to the `--root` option for *urpmi*. aliases: installroot | | **state** string | **Choices:*** absent * **present** ← * installed * removed | Indicates the desired package state. | | **update\_cache** boolean | **Choices:*** **no** ← * yes | Update the package database first `urpmi.update -a`. Alias `update-cache` has been deprecated and will be removed in community.general 5.0.0. aliases: update-cache | Examples -------- ``` - name: Install package foo community.general.urpmi: pkg: foo state: present - name: Remove package foo community.general.urpmi: pkg: foo state: absent - name: Remove packages foo and bar community.general.urpmi: pkg: foo,bar state: absent - name: Update the package database (urpmi.update -a -q) and install bar (bar will be the updated if a newer version exists) - community.general.urpmi: name: bar state: present update_cache: yes ``` ### Authors * Philippe Makowski (@pmakowski) ansible community.general.filesize – Create a file with a given size, or resize it if it exists community.general.filesize – Create a file with a given size, or resize it if it exists ======================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.filesize`. New in version 3.0.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [See Also](#see-also) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module is a simple wrapper around `dd` to create, extend or truncate a file, given its size. It can be used to manage swap files (that require contiguous blocks) or alternatively, huge sparse files. Requirements ------------ The below requirements are needed on the host that executes this module. * dd (Data Duplicator) in PATH Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **attributes** string added in 2.3 of ansible.builtin | | The attributes the resulting file or directory should have. To get supported flags look at the man page for *chattr* on the target system. This string should contain the attributes in the same order as the one displayed by *lsattr*. The `=` operator is assumed as default, otherwise `+` or `-` operators need to be included in the string. aliases: attr | | **blocksize** raw | | Size of blocks, in bytes if not followed by a multiplicative suffix. The numeric value (before the unit) `MUST` be an integer (or a `float` if it equals an integer). If not set, the size of blocks is guessed from the OS and commonly results in `512` or `4096` bytes, that is used internally by the module or when *size* has no unit. | | **force** boolean | **Choices:*** **no** ← * yes | Whether or not to overwrite the file if it exists, in other words, to truncate it from 0. When `true`, the module is not idempotent, that means it always reports *changed=true*. *force=true* and *sparse=true* are mutually exclusive. | | **group** string | | Name of the group that should own the file/directory, as would be fed to *chown*. | | **mode** raw | | The permissions the resulting file or directory should have. For those used to */usr/bin/chmod* remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like `0644` or `01777`) or quote it (like `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination file **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created file. If `mode` is not specified and the destination file **does** exist, the mode of the existing file will be used. Specifying `mode` is the best way to ensure files are created with the correct permissions. See CVE-2020-1736 for further details. | | **owner** string | | Name of the user that should own the file/directory, as would be fed to *chown*. | | **path** path / required | | Path of the regular file to create or resize. | | **selevel** string | | The level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the `range`. When set to `_default`, it will use the `level` portion of the policy if available. | | **serole** string | | The role part of the SELinux file context. When set to `_default`, it will use the `role` portion of the policy if available. | | **setype** string | | The type part of the SELinux file context. When set to `_default`, it will use the `type` portion of the policy if available. | | **seuser** string | | The user part of the SELinux file context. By default it uses the `system` policy, where applicable. When set to `_default`, it will use the `user` portion of the policy if available. | | **size** raw / required | | Requested size of the file. The value is a number (either `int` or `float`) optionally followed by a multiplicative suffix, that can be one of `B` (bytes), `KB` or `kB` (= 1000B), `MB` or `mB` (= 1000kB), `GB` or `gB` (= 1000MB), and so on for `T`, `P`, `E`, `Z` and `Y`; or alternatively one of `K`, `k` or `KiB` (= 1024B); `M`, `m` or `MiB` (= 1024KiB); `G`, `g` or `GiB` (= 1024MiB); and so on. If the multiplicative suffix is not provided, the value is treated as an integer number of blocks of *blocksize* bytes each (float values are rounded to the closest integer). When the *size* value is equal to the current file size, does nothing. When the *size* value is bigger than the current file size, bytes from *source* (if *sparse* is not `false`) are appended to the file without truncating it, in other words, without modifying the existing bytes of the file. When the *size* value is smaller than the current file size, it is truncated to the requested value without modifying bytes before this value. That means that a file of any arbitrary size can be grown to any other arbitrary size, and then resized down to its initial size without modifying its initial content. | | **source** path | **Default:**"/dev/zero" | Device or file that provides input data to provision the file. This parameter is ignored when *sparse=true*. | | **sparse** boolean | **Choices:*** **no** ← * yes | Whether or not the file to create should be a sparse file. This option is effective only on newly created files, or when growing a file, only for the bytes to append. This option is not supported on OpenBSD, Solaris and AIX. *force=true* and *sparse=true* are mutually exclusive. | | **unsafe\_writes** boolean added in 2.2 of ansible.builtin | **Choices:*** **no** ← * yes | This option is silently ignored. This module always modifies file size in-place. | Notes ----- Note * This module supports `check_mode` and `diff`. See Also -------- See also [dd(1) manpage for Linux](https://man7.org/linux/man-pages/man1/dd.1.html) Manual page of the GNU/Linux’s dd implementation (from GNU coreutils). [dd(1) manpage for IBM AIX](https://www.ibm.com/support/knowledgecenter/ssw_aix_72/d_commands/dd.html) Manual page of the IBM AIX’s dd implementation. [dd(1) manpage for Mac OSX](https://www.unix.com/man-page/osx/1/dd/) Manual page of the Mac OSX’s dd implementation. [dd(1M) manpage for Solaris](https://docs.oracle.com/cd/E36784_01/html/E36871/dd-1m.html) Manual page of the Oracle Solaris’s dd implementation. [dd(1) manpage for FreeBSD](https://www.freebsd.org/cgi/man.cgi?dd(1)) Manual page of the FreeBSD’s dd implementation. [dd(1) manpage for OpenBSD](https://man.openbsd.org/dd) Manual page of the OpenBSD’s dd implementation. [dd(1) manpage for NetBSD](https://man.netbsd.org/dd.1) Manual page of the NetBSD’s dd implementation. Examples -------- ``` - name: Create a file of 1G filled with null bytes community.general.filesize: path: /var/bigfile size: 1G - name: Extend the file to 2G (2*1024^3) community.general.filesize: path: /var/bigfile size: 2G - name: Reduce the file to 2GB (2*1000^3) community.general.filesize: path: /var/bigfile size: 2GB - name: Fill a file with random bytes for backing a LUKS device community.general.filesize: path: ~/diskimage.luks size: 512.0 MiB source: /dev/urandom - name: Take a backup of MBR boot code into a file, overwriting it if it exists community.general.filesize: path: /media/sdb1/mbr.bin size: 440B source: /dev/sda force: true - name: Create/resize a sparse file of/to 8TB community.general.filesize: path: /var/local/sparsefile size: 8TB sparse: true - name: Create a file with specific size and attributes, to be used as swap space community.general.filesize: path: /var/swapfile size: 2G blocksize: 512B mode: u=rw,go= owner: root group: root ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **cmd** string | when changed or failed | Command executed to create or resize the file. **Sample:** /usr/bin/dd if=/dev/zero of=/var/swapfile bs=1048576 seek=3072 count=1024 | | **filesize** dictionary | always | Dictionary of sizes related to the file. | | | **blocks** integer | success | Number of blocks in the file. **Sample:** 500 | | | **blocksize** integer | success | Size of the blocks in bytes. **Sample:** 1024 | | | **bytes** integer | success | Size of the file, in bytes, as the product of `blocks` and `blocksize`. **Sample:** 512000 | | | **iec** string | success | Size of the file, in human-readable format, following IEC standard. **Sample:** 500.0 KiB | | | **si** string | success | Size of the file, in human-readable format, following SI standard. **Sample:** 512.0 kB | | **path** string | always | Realpath of the file if it is a symlink, otherwise the same than module's param. **Sample:** /var/swap0 | | **size\_diff** integer | always | Difference (positive or negative) between old size and new size, in bytes. **Sample:** -1234567890 | ### Authors * quidame (@quidame)
programming_docs
ansible community.general.ldap_search – Search for entries in a LDAP server community.general.ldap\_search – Search for entries in a LDAP server ==================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ldap_search`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Return the results of an LDAP search. Requirements ------------ The below requirements are needed on the host that executes this module. * python-ldap Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **attrs** list / elements=string | | A list of attributes for limiting the result. Use an actual list or a comma-separated string. | | **bind\_dn** string | | A DN to bind with. If this is omitted, we'll try a SASL bind with the EXTERNAL mechanism as default. If this is blank, we'll use an anonymous bind. | | **bind\_pw** string | | The password to use with *bind\_dn*. | | **dn** string / required | | The LDAP DN to search in. | | **filter** string | **Default:**"(objectClass=\*)" | Used for filtering the LDAP search result. | | **referrals\_chasing** string added in 2.0.0 of community.general | **Choices:*** disabled * **anonymous** ← | Set the referrals chasing behavior. `anonymous` follow referrals anonymously. This is the default behavior. `disabled` disable referrals chasing. This sets `OPT_REFERRALS` to off. | | **sasl\_class** string added in 2.0.0 of community.general | **Choices:*** **external** ← * gssapi | The class to use for SASL authentication. possible choices are `external`, `gssapi`. | | **schema** boolean | **Choices:*** **no** ← * yes | Set to `true` to return the full attribute schema of entries, not their attribute values. Overrides *attrs* when provided. | | **scope** string | **Choices:*** **base** ← * onelevel * subordinate * children | The LDAP scope to use. | | **server\_uri** string | **Default:**"ldapi:///" | A URI to the LDAP server. The default value lets the underlying LDAP client library look for a UNIX domain socket in its default location. | | **start\_tls** boolean | **Choices:*** **no** ← * yes | If true, we'll use the START\_TLS LDAP extension. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If set to `no`, SSL certificates will not be validated. This should only be used on sites using self-signed certificates. | Notes ----- Note * The default authentication settings will attempt to use a SASL EXTERNAL bind over a UNIX domain socket. This works well with the default Ubuntu install for example, which includes a `cn=peercred,cn=external,cn=auth` ACL rule allowing root to modify the server configuration. If you need to use a simple bind to access your server, pass the credentials in *bind\_dn* and *bind\_pw*. Examples -------- ``` - name: Return all entries within the 'groups' organizational unit. community.general.ldap_search: dn: "ou=groups,dc=example,dc=com" register: ldap_groups - name: Return GIDs for all groups community.general.ldap_search: dn: "ou=groups,dc=example,dc=com" scope: "onelevel" attrs: - "gidNumber" register: ldap_group_gids ``` ### Authors * Sebastian Pfahl (@eryx12o45) ansible community.general.pmrun – Privilege Manager run community.general.pmrun – Privilege Manager run =============================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pmrun`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) Synopsis -------- * This become plugins allows your remote/login user to execute commands as another user via the pmrun utility. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **become\_exe** string | **Default:**"pmrun" | ini entries: [privilege\_escalation]become\_exe = pmrun [pmrun\_become\_plugin]executable = pmrun env:ANSIBLE\_BECOME\_EXE env:ANSIBLE\_PMRUN\_EXE var: ansible\_become\_exe var: ansible\_pmrun\_exe | Sudo executable | | **become\_flags** string | **Default:**"" | ini entries: [privilege\_escalation]become\_flags = [pmrun\_become\_plugin]flags = env:ANSIBLE\_BECOME\_FLAGS env:ANSIBLE\_PMRUN\_FLAGS var: ansible\_become\_flags var: ansible\_pmrun\_flags | Options to pass to pmrun | | **become\_pass** string | | ini entries: [pmrun\_become\_plugin]password = None env:ANSIBLE\_BECOME\_PASS env:ANSIBLE\_PMRUN\_PASS var: ansible\_become\_password var: ansible\_become\_pass var: ansible\_pmrun\_pass | pmrun password | Notes ----- Note * This plugin ignores the become\_user supplied and uses pmrun’s own configuration to select the user. ### Authors * Ansible Core Team ansible community.general.oneandone_server – Create, destroy, start, stop, and reboot a 1&1 Host server. community.general.oneandone\_server – Create, destroy, start, stop, and reboot a 1&1 Host server. ================================================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneandone_server`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Create, destroy, update, start, stop, and reboot a 1&1 Host server. When the server is created it can optionally wait for it to be ‘running’ before returning. Requirements ------------ The below requirements are needed on the host that executes this module. * 1and1 * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_url** string | | Custom API URL. Overrides the ONEANDONE\_API\_URL environment variable. | | **appliance** string | | The operating system name or ID for the server. It is required only for 'present' state. | | **auth\_token** string | | Authenticating API token provided by 1&1. Overrides the ONEANDONE\_AUTH\_TOKEN environment variable. | | **auto\_increment** boolean | **Choices:*** no * **yes** ← | When creating multiple servers at once, whether to differentiate hostnames by appending a count after them or substituting the count where there is a %02d or %03d in the hostname string. | | **cores\_per\_processor** integer | | The number of cores per processor. It must be provided with vcore, ram, and hdds parameters. | | **count** integer | **Default:**1 | The number of servers to create. | | **datacenter** string | **Choices:*** **US** ← * ES * DE * GB | The datacenter location. | | **description** string | | The description of the server. | | **firewall\_policy** string | | The firewall policy name or ID. | | **fixed\_instance\_size** string | | The instance size name or ID of the server. It is required only for 'present' state, and it is mutually exclusive with vcore, cores\_per\_processor, ram, and hdds parameters. The available choices are: `S`, `M`, `L`, `XL`, `XXL`, `3XL`, `4XL`, `5XL` | | **hdds** list / elements=dictionary | | A list of hard disks with nested "size" and "is\_main" properties. It must be provided with vcore, cores\_per\_processor, and ram parameters. | | **hostname** string | | The hostname or ID of the server. Only used when state is 'present'. | | **load\_balancer** string | | The load balancer name or ID. | | **monitoring\_policy** string | | The monitoring policy name or ID. | | **private\_network** string | | The private network name or ID. | | **ram** float | | The amount of RAM memory. It must be provided with with vcore, cores\_per\_processor, and hdds parameters. | | **server** string | | Server identifier (ID or hostname). It is required for all states except 'running' and 'present'. | | **server\_type** string | **Choices:*** **cloud** ← * baremetal * k8s\_node | The type of server to be built. | | **ssh\_key** raw | | User's public SSH key (contents, not path). | | **state** string | **Choices:*** **present** ← * absent * running * stopped | Define a server's state to create, remove, start or stop it. | | **vcore** integer | | The total number of processors. It must be provided with cores\_per\_processor, ram, and hdds parameters. | | **wait** boolean | **Choices:*** no * **yes** ← | Wait for the server to be in state 'running' before returning. Also used for delete operation (set to 'false' if you don't want to wait for each individual server to be deleted before moving on with other tasks.) | | **wait\_interval** integer | **Default:**5 | Defines the number of seconds to wait when using the wait\_for methods | | **wait\_timeout** integer | **Default:**600 | how long before wait gives up, in seconds | Examples -------- ``` - name: Create three servers and enumerate their names community.general.oneandone_server: auth_token: oneandone_private_api_key hostname: node%02d fixed_instance_size: XL datacenter: US appliance: C5A349786169F140BCBC335675014C08 auto_increment: true count: 3 - name: Create three servers, passing in an ssh_key community.general.oneandone_server: auth_token: oneandone_private_api_key hostname: node%02d vcore: 2 cores_per_processor: 4 ram: 8.0 hdds: - size: 50 is_main: false datacenter: ES appliance: C5A349786169F140BCBC335675014C08 count: 3 wait: yes wait_timeout: 600 wait_interval: 10 ssh_key: SSH_PUBLIC_KEY - name: Removing server community.general.oneandone_server: auth_token: oneandone_private_api_key state: absent server: 'node01' - name: Starting server community.general.oneandone_server: auth_token: oneandone_private_api_key state: running server: 'node01' - name: Stopping server community.general.oneandone_server: auth_token: oneandone_private_api_key state: stopped server: 'node01' ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **servers** list / elements=string | always | Information about each server that was processed **Sample:** [{"hostname": "my-server", "id": "server-id"}] | ### Authors * Amel Ajdinovic (@aajdinov) * Ethan Devenport (@edevenport) ansible community.general.git_config – Read and write git configuration community.general.git\_config – Read and write git configuration ================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.git_config`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * The `git_config` module changes git configuration by invoking ‘git config’. This is needed if you don’t want to use [ansible.builtin.template](../../ansible/builtin/template_module#ansible-collections-ansible-builtin-template-module) for the entire git config file (e.g. because you need to change just `user.email` in /etc/.git/config). Solutions involving [ansible.builtin.command](../../ansible/builtin/command_module#ansible-collections-ansible-builtin-command-module) are cumbersome or don’t work correctly in check mode. Requirements ------------ The below requirements are needed on the host that executes this module. * git Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **file** path added in 2.0.0 of community.general | | Path to an adhoc git configuration file to be managed using the `file` scope. | | **list\_all** boolean | **Choices:*** **no** ← * yes | List all settings (optionally limited to a given *scope*). | | **name** string | | The name of the setting. If no value is supplied, the value will be read from the config if it has been set. | | **repo** path | | Path to a git repository for reading and writing values from a specific repo. | | **scope** string | **Choices:*** file * local * global * system | Specify which scope to read/set values from. This is required when setting config values. If this is set to `local`, you must also specify the `repo` parameter. If this is set to `file`, you must also specify the `file` parameter. It defaults to system only when not using *list\_all*=`yes`. | | **state** string | **Choices:*** **present** ← * absent | Indicates the setting should be set/unset. This parameter has higher precedence than *value* parameter: when *state*=absent and *value* is defined, *value* is discarded. | | **value** string | | When specifying the name of a single setting, supply a value to set that setting to the given value. | Examples -------- ``` - name: Add a setting to ~/.gitconfig community.general.git_config: name: alias.ci scope: global value: commit - name: Add a setting to ~/.gitconfig community.general.git_config: name: alias.st scope: global value: status - name: Remove a setting from ~/.gitconfig community.general.git_config: name: alias.ci scope: global state: absent - name: Add a setting to ~/.gitconfig community.general.git_config: name: core.editor scope: global value: vim - name: Add a setting system-wide community.general.git_config: name: alias.remotev scope: system value: remote -v - name: Add a setting to a system scope (default) community.general.git_config: name: alias.diffc value: diff --cached - name: Add a setting to a system scope (default) community.general.git_config: name: color.ui value: auto - name: Make etckeeper not complaining when it is invoked by cron community.general.git_config: name: user.email repo: /etc scope: local value: 'root@{{ ansible_fqdn }}' - name: Read individual values from git config community.general.git_config: name: alias.ci scope: global - name: Scope system is also assumed when reading values, unless list_all=yes community.general.git_config: name: alias.diffc - name: Read all values from git config community.general.git_config: list_all: yes scope: global - name: When list_all is yes and no scope is specified, you get configuration from all scopes community.general.git_config: list_all: yes - name: Specify a repository to include local settings community.general.git_config: list_all: yes repo: /path/to/repo.git ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **config\_value** string | success | When list\_all=no and value is not set, a string containing the value of the setting in name **Sample:** vim | | **config\_values** dictionary | success | When list\_all=yes, a dict containing key/value pairs of multiple configuration settings **Sample:** {'alias.diffc': 'diff --cached', 'alias.remotev': 'remote -v', 'color.ui': 'auto', 'core.editor': 'vim'} | ### Authors * Matthew Gamble (@djmattyg007) * Marius Gedminas (@mgedmin) ansible community.general.oneview_fcoe_network – Manage OneView FCoE Network resources community.general.oneview\_fcoe\_network – Manage OneView FCoE Network resources ================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneview_fcoe_network`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Provides an interface to manage FCoE Network resources. Can create, update, or delete. Requirements ------------ The below requirements are needed on the host that executes this module. * hpOneView >= 4.0.0 * python >= 2.7.9 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_version** integer | | OneView API Version. | | **config** path | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional and when used should be present in the host running the ansible commands. If the file path is not provided, the configuration will be loaded from environment variables. For links to example configuration files or how to use the environment variables verify the notes section. | | **data** dictionary / required | | List with FCoE Network properties. | | **hostname** string | | IP address or hostname for the appliance. | | **image\_streamer\_hostname** string | | IP address or hostname for the HPE Image Streamer REST API. | | **password** string | | Password for API authentication. | | **state** string | **Choices:*** **present** ← * absent | Indicates the desired state for the FCoE Network resource. `present` will ensure data properties are compliant with OneView. `absent` will remove the resource from OneView, if it exists. | | **username** string | | Username for API authentication. | | **validate\_etag** boolean | **Choices:*** no * **yes** ← | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. | Notes ----- Note * A sample configuration file for the config parameter can be found at: <https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json> * Check how to use environment variables for configuration at: <https://github.com/HewlettPackard/oneview-ansible#environment-variables> * Additional Playbooks for the HPE OneView Ansible modules can be found at: <https://github.com/HewlettPackard/oneview-ansible/tree/master/examples> * The OneView API version used will directly affect returned and expected fields in resources. Information on setting the desired API version and can be found at: <https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version> Examples -------- ``` - name: Ensure that FCoE Network is present using the default configuration community.general.oneview_fcoe_network: config: '/etc/oneview/oneview_config.json' state: present data: name: Test FCoE Network vlanId: 201 delegate_to: localhost - name: Update the FCOE network scopes community.general.oneview_fcoe_network: config: '/etc/oneview/oneview_config.json' state: present data: name: New FCoE Network scopeUris: - '/rest/scopes/00SC123456' - '/rest/scopes/01SC123456' delegate_to: localhost - name: Ensure that FCoE Network is absent community.general.oneview_fcoe_network: config: '/etc/oneview/oneview_config.json' state: absent data: name: New FCoE Network delegate_to: localhost ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **fcoe\_network** dictionary | On state 'present'. Can be null. | Has the facts about the OneView FCoE Networks. | ### Authors * Felipe Bulsoni (@fgbulsoni)
programming_docs
ansible community.general.aix_lvg – Manage LVM volume groups on AIX community.general.aix\_lvg – Manage LVM volume groups on AIX ============================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.aix_lvg`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module creates, removes or resize volume groups on AIX LVM. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **force** boolean | **Choices:*** **no** ← * yes | Force volume group creation. | | **pp\_size** integer | | The size of the physical partition in megabytes. | | **pvs** list / elements=string | | List of comma-separated devices to use as physical devices in this volume group. Required when creating or extending (`present` state) the volume group. If not informed reducing (`absent` state) the volume group will be removed. | | **state** string | **Choices:*** absent * **present** ← * varyoff * varyon | Control if the volume group exists and volume group AIX state varyonvg `varyon` or varyoffvg `varyoff`. | | **vg** string / required | | The name of the volume group. | | **vg\_type** string | **Choices:*** big * **normal** ← * scalable | The type of the volume group. | Notes ----- Note * AIX will permit remove VG only if all LV/Filesystems are not busy. * Module does not modify PP size for already present volume group. Examples -------- ``` - name: Create a volume group datavg community.general.aix_lvg: vg: datavg pp_size: 128 vg_type: scalable state: present - name: Removing a volume group datavg community.general.aix_lvg: vg: datavg state: absent - name: Extending rootvg community.general.aix_lvg: vg: rootvg pvs: hdisk1 state: present - name: Reducing rootvg community.general.aix_lvg: vg: rootvg pvs: hdisk1 state: absent ``` ### Authors * Kairo Araujo (@kairoaraujo) ansible community.general.random_pet – Generates random pet names community.general.random\_pet – Generates random pet names ========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.random_pet`. New in version 3.1.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Generates random pet names that can be used as unique identifiers for the resources. Requirements ------------ The below requirements are needed on the local controller node that executes this lookup. * petname <https://github.com/dustinkirkland/python-petname> Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **length** integer | **Default:**6 | | The maximal length of every component of the pet name. Values below 3 will be set to 3 by petname. | | **prefix** string | | | A string to prefix with the name. | | **separator** string | **Default:**"-" | | The character to separate words in the pet name. | | **words** integer | **Default:**2 | | The number of words in the pet name. | Examples -------- ``` - name: Generate pet name ansible.builtin.debug: var: lookup('community.general.random_pet') # Example result: 'loving-raptor' - name: Generate pet name with 3 words ansible.builtin.debug: var: lookup('community.general.random_pet', words=3) # Example result: 'fully-fresh-macaw' - name: Generate pet name with separator ansible.builtin.debug: var: lookup('community.general.random_pet', separator="_") # Example result: 'causal_snipe' - name: Generate pet name with length ansible.builtin.debug: var: lookup('community.general.random_pet', length=7) # Example result: 'natural-peacock' ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup: | Key | Returned | Description | | --- | --- | --- | | **\_raw** list / elements=string | success | A one-element list containing a random pet name | ### Authors * Abhijeet Kasurde (@Akasurde) ansible community.general.ipa_otptoken – Manage FreeIPA OTPs community.general.ipa\_otptoken – Manage FreeIPA OTPs ===================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ipa_otptoken`. New in version 2.5.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Add, modify, and delete One Time Passwords in IPA. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **algorithm** string | **Choices:*** sha1 * sha256 * sha384 * sha512 | Token hash algorithm. **Note:** Cannot be modified after OTP is created. | | **counter** integer | | Initial counter for the HOTP token. **Note:** Cannot be modified after OTP is created. | | **description** string | | Description of the token (informational only). | | **digits** integer | **Choices:*** 6 * 8 | Number of digits each token code will have. **Note:** Cannot be modified after OTP is created. | | **enabled** boolean | **Choices:*** no * **yes** ← | Mark the token as enabled (default `true`). | | **interval** integer | | Length of TOTP token code validity in seconds. **Note:** Cannot be modified after OTP is created. | | **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_prot** string | **Choices:*** http * **https** ← | Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. | | **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **model** string | | Token model (informational only). | | **newuniqueid** string | | If specified, the unique id specified will be changed to this. | | **notafter** string | | Last date/time the token can be used. In the format `YYYYMMddHHmmss`. For example, `20200121182022` will allow the token to be used until 21 January 2020 at 18:20:22. | | **notbefore** string | | First date/time the token can be used. In the format `YYYYMMddHHmmss`. For example, `20180121182022` will allow the token to be used starting on 21 January 2018 at 18:20:22. | | **offset** integer | | TOTP token / IPA server time difference. **Note:** Cannot be modified after OTP is created. | | **otptype** string | **Choices:*** totp * hotp | Type of OTP. **Note:** Cannot be modified after OTP is created. | | **owner** string | | Assigned user of the token. | | **secretkey** string | | Token secret (Base64). If OTP is created and this is not specified, a random secret will be generated by IPA. **Note:** Cannot be modified after OTP is created. | | **serial** string | | Token serial (informational only). | | **state** string | **Choices:*** **present** ← * absent | State to ensure. | | **uniqueid** string / required | | Unique ID of the token in IPA. aliases: name | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | This only applies if `ipa_prot` is *https*. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. | | **vendor** string | | Token vendor name (informational only). | Examples -------- ``` - name: Create a totp for pinky, allowing the IPA server to generate using defaults community.general.ipa_otptoken: uniqueid: Token123 otptype: totp owner: pinky ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - name: Create a 8 digit hotp for pinky with sha256 with specified validity times community.general.ipa_otptoken: uniqueid: Token123 enabled: true otptype: hotp digits: 8 secretkey: UMKSIER00zT2T2tWMUlTRmNlekRCbFQvWFBVZUh2dElHWGR6T3VUR3IzK2xjaFk9 algorithm: sha256 notbefore: 20180121182123 notafter: 20220121182123 owner: pinky ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - name: Update Token123 to indicate a vendor, model, serial number (info only), and description community.general.ipa_otptoken: uniqueid: Token123 vendor: Acme model: acme101 serial: SerialNumber1 description: Acme OTP device ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - name: Disable Token123 community.general.ipa_otptoken: uniqueid: Token123 enabled: false ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - name: Rename Token123 to TokenABC and enable it community.general.ipa_otptoken: uniqueid: Token123 newuniqueid: TokenABC enabled: true ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **otptoken** dictionary | always | OTP Token as returned by IPA API | ### Authors * justchris1 (@justchris1) ansible community.general.oneview_ethernet_network_info – Retrieve the information about one or more of the OneView Ethernet Networks community.general.oneview\_ethernet\_network\_info – Retrieve the information about one or more of the OneView Ethernet Networks ================================================================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneview_ethernet_network_info`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Retrieve the information about one or more of the Ethernet Networks from OneView. * This module was called `oneview_ethernet_network_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [community.general.oneview\_ethernet\_network\_info](#ansible-collections-community-general-oneview-ethernet-network-info-module) module no longer returns `ansible_facts`! Requirements ------------ The below requirements are needed on the host that executes this module. * hpOneView >= 2.0.1 * python >= 2.7.9 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_version** integer | | OneView API Version. | | **config** path | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional and when used should be present in the host running the ansible commands. If the file path is not provided, the configuration will be loaded from environment variables. For links to example configuration files or how to use the environment variables verify the notes section. | | **hostname** string | | IP address or hostname for the appliance. | | **image\_streamer\_hostname** string | | IP address or hostname for the HPE Image Streamer REST API. | | **name** string | | Ethernet Network name. | | **options** list / elements=string | | List with options to gather additional information about an Ethernet Network and related resources. Options allowed: `associatedProfiles` and `associatedUplinkGroups`. | | **params** dictionary | | List of params to delimit, filter and sort the list of resources. params allowed: - `start`: The first item to return, using 0-based indexing. - `count`: The number of resources to return. - `filter`: A general filter/query string to narrow the list of items returned. - `sort`: The sort order of the returned data set. | | **password** string | | Password for API authentication. | | **username** string | | Username for API authentication. | Notes ----- Note * A sample configuration file for the config parameter can be found at: <https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json> * Check how to use environment variables for configuration at: <https://github.com/HewlettPackard/oneview-ansible#environment-variables> * Additional Playbooks for the HPE OneView Ansible modules can be found at: <https://github.com/HewlettPackard/oneview-ansible/tree/master/examples> * The OneView API version used will directly affect returned and expected fields in resources. Information on setting the desired API version and can be found at: <https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version> Examples -------- ``` - name: Gather information about all Ethernet Networks community.general.oneview_ethernet_network_info: config: /etc/oneview/oneview_config.json delegate_to: localhost register: result - name: Print fetched information about Ethernet Networks ansible.builtin.debug: msg: "{{ result.ethernet_networks }}" - name: Gather paginated and filtered information about Ethernet Networks community.general.oneview_ethernet_network_info: config: /etc/oneview/oneview_config.json params: start: 1 count: 3 sort: 'name:descending' filter: 'purpose=General' delegate_to: localhost register: result - name: Print fetched information about paginated and filtered list of Ethernet Networks ansible.builtin.debug: msg: "{{ result.ethernet_networks }}" - name: Gather information about an Ethernet Network by name community.general.oneview_ethernet_network_info: config: /etc/oneview/oneview_config.json name: Ethernet network name delegate_to: localhost register: result - name: Print fetched information about Ethernet Network found by name ansible.builtin.debug: msg: "{{ result.ethernet_networks }}" - name: Gather information about an Ethernet Network by name with options community.general.oneview_ethernet_network_info: config: /etc/oneview/oneview_config.json name: eth1 options: - associatedProfiles - associatedUplinkGroups delegate_to: localhost register: result - name: Print fetched information about Ethernet Network Associated Profiles ansible.builtin.debug: msg: "{{ result.enet_associated_profiles }}" - name: Print fetched information about Ethernet Network Associated Uplink Groups ansible.builtin.debug: msg: "{{ result.enet_associated_uplink_groups }}" ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **enet\_associated\_profiles** dictionary | When requested, but can be null. | Has all the OneView information about the profiles which are using the Ethernet network. | | **enet\_associated\_uplink\_groups** dictionary | When requested, but can be null. | Has all the OneView information about the uplink sets which are using the Ethernet network. | | **ethernet\_networks** dictionary | Always, but can be null. | Has all the OneView information about the Ethernet Networks. | ### Authors * Felipe Bulsoni (@fgbulsoni) * Thiago Miotto (@tmiotto) * Adriane Cardozo (@adriane-cardozo) ansible community.general.influxdb_database – Manage InfluxDB databases community.general.influxdb\_database – Manage InfluxDB databases ================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.influxdb_database`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Manage InfluxDB databases. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * influxdb >= 0.9 * requests Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **database\_name** string / required | | Name of the database. | | **hostname** string | **Default:**"localhost" | The hostname or IP address on which InfluxDB server is listening. Since Ansible 2.5, defaulted to localhost. | | **password** string | **Default:**"root" | Password that will be used to authenticate against InfluxDB server. Alias `login_password` added in Ansible 2.5. aliases: login\_password | | **path** string added in 0.2.0 of community.general | | The path on which InfluxDB server is accessible Only available when using python-influxdb >= 5.1.0 | | **port** integer | **Default:**8086 | The port on which InfluxDB server is listening | | **proxies** dictionary | | HTTP(S) proxy to use for Requests to connect to InfluxDB server. | | **retries** integer | **Default:**3 | Number of retries client will try before aborting. `0` indicates try until success. Only available when using python-influxdb >= 4.1.0 | | **ssl** boolean | **Choices:*** **no** ← * yes | Use https instead of http to connect to InfluxDB server. | | **state** string | **Choices:*** absent * **present** ← | Determines if the database should be created or destroyed. | | **timeout** integer | | Number of seconds Requests will wait for client to establish a connection. | | **udp\_port** integer | **Default:**4444 | UDP port to connect to InfluxDB server. | | **use\_udp** boolean | **Choices:*** **no** ← * yes | Use UDP to connect to InfluxDB server. | | **username** string | **Default:**"root" | Username that will be used to authenticate against InfluxDB server. Alias `login_username` added in Ansible 2.5. aliases: login\_username | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. | Examples -------- ``` # Example influxdb_database command from Ansible Playbooks - name: Create database community.general.influxdb_database: hostname: "{{influxdb_ip_address}}" database_name: "{{influxdb_database_name}}" - name: Destroy database community.general.influxdb_database: hostname: "{{influxdb_ip_address}}" database_name: "{{influxdb_database_name}}" state: absent - name: Create database using custom credentials community.general.influxdb_database: hostname: "{{influxdb_ip_address}}" username: "{{influxdb_username}}" password: "{{influxdb_password}}" database_name: "{{influxdb_database_name}}" ssl: yes validate_certs: yes ``` ### Authors * Kamil Szczygiel (@kamsz)
programming_docs
ansible community.general.pagerduty_user – Manage a user account on PagerDuty community.general.pagerduty\_user – Manage a user account on PagerDuty ====================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.pagerduty_user`. New in version 1.3.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * This module manages the creation/removal of a user account on PagerDuty. Requirements ------------ The below requirements are needed on the host that executes this module. * pdpyras python module = 4.1.1 * PagerDuty API Access Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **access\_token** string / required | | An API access token to authenticate with the PagerDuty REST API. | | **pd\_email** string / required | | The user's email address. *pd\_email* is the unique identifier used and cannot be updated using this module. | | **pd\_role** string | **Choices:*** global\_admin * manager * **responder** ← * observer * stakeholder * limited\_stakeholder * restricted\_access | The user's role. | | **pd\_teams** list / elements=string | | The teams to which the user belongs. Required if *state=present*. | | **pd\_user** string / required | | Name of the user in PagerDuty. | | **state** string | **Choices:*** **present** ← * absent | State of the user. On `present`, it creates a user if the user doesn't exist. On `absent`, it removes a user if the account exists. | Notes ----- Note * Supports `check_mode`. Examples -------- ``` - name: Create a user account on PagerDuty community.general.pagerduty_user: access_token: 'Your_Access_token' pd_user: user_full_name pd_email: user_email pd_role: user_pd_role pd_teams: user_pd_teams state: "present" - name: Remove a user account from PagerDuty community.general.pagerduty_user: access_token: 'Your_Access_token' pd_user: user_full_name pd_email: user_email state: "absent" ``` ### Authors * Zainab Alsaffar (@zanssa) ansible community.general.ipa_hostgroup – Manage FreeIPA host-group community.general.ipa\_hostgroup – Manage FreeIPA host-group ============================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ipa_hostgroup`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Add, modify and delete an IPA host-group using IPA API. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **cn** string / required | | Name of host-group. Can not be changed as it is the unique identifier. aliases: name | | **description** string | | Description. | | **host** list / elements=string | | List of hosts that belong to the host-group. If an empty list is passed all hosts will be removed from the group. If option is omitted hosts will not be checked or changed. If option is passed all assigned hosts that are not passed will be unassigned from the group. | | **hostgroup** list / elements=string | | List of host-groups than belong to that host-group. If an empty list is passed all host-groups will be removed from the group. If option is omitted host-groups will not be checked or changed. If option is passed all assigned hostgroups that are not passed will be unassigned from the group. | | **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_prot** string | **Choices:*** http * **https** ← | Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. | | **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **state** string | **Choices:*** absent * disabled * enabled * **present** ← | State to ensure. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | This only applies if `ipa_prot` is *https*. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Ensure host-group databases is present community.general.ipa_hostgroup: name: databases state: present host: - db.example.com hostgroup: - mysql-server - oracle-server ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - name: Ensure host-group databases is absent community.general.ipa_hostgroup: name: databases state: absent ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **hostgroup** dictionary | always | Hostgroup as returned by IPA API. | ### Authors * Thomas Krahn (@Nosmoht) ansible community.general.xfconf_info – Retrieve XFCE4 configurations community.general.xfconf\_info – Retrieve XFCE4 configurations ============================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.xfconf_info`. New in version 3.5.0: of community.general * [Synopsis](#synopsis) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * This module allows retrieving Xfce 4 configurations with the help of `xfconf-query`. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **channel** string | | A Xfconf preference channel is a top-level tree key, inside of the Xfconf repository that corresponds to the location for which all application properties/keys are stored. If not provided, the module will list all available channels. | | **property** string | | A Xfce preference key is an element in the Xfconf repository that corresponds to an application preference. If provided, then *channel* is required. If not provided and a *channel* is provided, then the module will list all available properties in that *channel*. | Notes ----- Note * See man xfconf-query(1) for more details. Examples -------- ``` - name: Get list of all available channels community.general.xfconf_info: {} register: result - name: Get list of all properties in a specific channel community.general.xfconf_info: channel: xsettings register: result - name: Retrieve the DPI value community.general.xfconf_info: channel: xsettings property: /Xft/DPI register: result - name: Get workspace names (4) community.general.xfconf_info: channel: xfwm4 property: /general/workspace_names register: result ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **channels** list / elements=string | success | List of available channels. Returned when the module receives no parameter at all. **Sample:** ['xfce4-desktop', 'displays', 'xsettings', 'xfwm4'] | | **is\_array** boolean | success | Flag indicating whether the property is an array or not. | | **properties** list / elements=string | success | List of available properties for a specific channel. Returned by passed only the *channel* parameter to the module. **Sample:** ['/Gdk/WindowScalingFactor', '/Gtk/ButtonImages', '/Gtk/CursorThemeSize', '/Gtk/DecorationLayout', '/Gtk/FontName', '/Gtk/MenuImages', '/Gtk/MonospaceFontName', '/Net/DoubleClickTime', '/Net/IconThemeName', '/Net/ThemeName', '/Xft/Antialias', '/Xft/Hinting', '/Xft/HintStyle', '/Xft/RGBA'] | | **value** string | success | The value of the property. Empty if the property is of array type. **Sample:** Monospace 10 | | **value\_array** list / elements=string | success | The array value of the property. Empty if the property is not of array type. **Sample:** ['Main', 'Work', 'Tmp'] | ### Authors * Alexei Znamensky (@russoz) ansible community.general.ldap_attrs – Add or remove multiple LDAP attribute values community.general.ldap\_attrs – Add or remove multiple LDAP attribute values ============================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ldap_attrs`. New in version 0.2.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Add or remove multiple LDAP attribute values. Requirements ------------ The below requirements are needed on the host that executes this module. * python-ldap Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **attributes** dictionary / required | | The attribute(s) and value(s) to add or remove. The complex argument format is required in order to pass a list of strings (see examples). | | **bind\_dn** string | | A DN to bind with. If this is omitted, we'll try a SASL bind with the EXTERNAL mechanism as default. If this is blank, we'll use an anonymous bind. | | **bind\_pw** string | | The password to use with *bind\_dn*. | | **dn** string / required | | The DN of the entry to add or remove. | | **ordered** boolean | **Choices:*** **no** ← * yes | If `yes`, prepend list values with X-ORDERED index numbers in all attributes specified in the current task. This is useful mostly with *olcAccess* attribute to easily manage LDAP Access Control Lists. | | **referrals\_chasing** string added in 2.0.0 of community.general | **Choices:*** disabled * **anonymous** ← | Set the referrals chasing behavior. `anonymous` follow referrals anonymously. This is the default behavior. `disabled` disable referrals chasing. This sets `OPT_REFERRALS` to off. | | **sasl\_class** string added in 2.0.0 of community.general | **Choices:*** **external** ← * gssapi | The class to use for SASL authentication. possible choices are `external`, `gssapi`. | | **server\_uri** string | **Default:**"ldapi:///" | A URI to the LDAP server. The default value lets the underlying LDAP client library look for a UNIX domain socket in its default location. | | **start\_tls** boolean | **Choices:*** **no** ← * yes | If true, we'll use the START\_TLS LDAP extension. | | **state** string | **Choices:*** **present** ← * absent * exact | The state of the attribute values. If `present`, all given attribute values will be added if they're missing. If `absent`, all given attribute values will be removed if present. If `exact`, the set of attribute values will be forced to exactly those provided and no others. If *state=exact* and the attribute *value* is empty, all values for this attribute will be removed. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | If set to `no`, SSL certificates will not be validated. This should only be used on sites using self-signed certificates. | Notes ----- Note * This only deals with attributes on existing entries. To add or remove whole entries, see [community.general.ldap\_entry](ldap_entry_module#ansible-collections-community-general-ldap-entry-module). * The default authentication settings will attempt to use a SASL EXTERNAL bind over a UNIX domain socket. This works well with the default Ubuntu install for example, which includes a cn=peercred,cn=external,cn=auth ACL rule allowing root to modify the server configuration. If you need to use a simple bind to access your server, pass the credentials in *bind\_dn* and *bind\_pw*. * For *state=present* and *state=absent*, all value comparisons are performed on the server for maximum accuracy. For *state=exact*, values have to be compared in Python, which obviously ignores LDAP matching rules. This should work out in most cases, but it is theoretically possible to see spurious changes when target and actual values are semantically identical but lexically distinct. Examples -------- ``` - name: Configure directory number 1 for example.com community.general.ldap_attrs: dn: olcDatabase={1}hdb,cn=config attributes: olcSuffix: dc=example,dc=com state: exact # The complex argument format is required here to pass a list of ACL strings. - name: Set up the ACL community.general.ldap_attrs: dn: olcDatabase={1}hdb,cn=config attributes: olcAccess: - >- {0}to attrs=userPassword,shadowLastChange by self write by anonymous auth by dn="cn=admin,dc=example,dc=com" write by * none' - >- {1}to dn.base="dc=example,dc=com" by dn="cn=admin,dc=example,dc=com" write by * read state: exact # An alternative approach with automatic X-ORDERED numbering - name: Set up the ACL community.general.ldap_attrs: dn: olcDatabase={1}hdb,cn=config attributes: olcAccess: - >- to attrs=userPassword,shadowLastChange by self write by anonymous auth by dn="cn=admin,dc=example,dc=com" write by * none' - >- to dn.base="dc=example,dc=com" by dn="cn=admin,dc=example,dc=com" write by * read ordered: yes state: exact - name: Declare some indexes community.general.ldap_attrs: dn: olcDatabase={1}hdb,cn=config attributes: olcDbIndex: - objectClass eq - uid eq - name: Set up a root user, which we can use later to bootstrap the directory community.general.ldap_attrs: dn: olcDatabase={1}hdb,cn=config attributes: olcRootDN: cn=root,dc=example,dc=com olcRootPW: "{SSHA}tabyipcHzhwESzRaGA7oQ/SDoBZQOGND" state: exact - name: Remove an attribute with a specific value community.general.ldap_attrs: dn: uid=jdoe,ou=people,dc=example,dc=com attributes: description: "An example user account" state: absent server_uri: ldap://localhost/ bind_dn: cn=admin,dc=example,dc=com bind_pw: password - name: Remove specified attribute(s) from an entry community.general.ldap_attrs: dn: uid=jdoe,ou=people,dc=example,dc=com attributes: description: [] state: exact server_uri: ldap://localhost/ bind_dn: cn=admin,dc=example,dc=com bind_pw: password ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **modlist** list / elements=string | success | list of modified parameters **Sample:** [[2, "olcRootDN", ["cn=root,dc=example,dc=com"]]] | ### Authors * Jiri Tyr (@jtyr) * Alexander Korinek (@noles) * Maciej Delmanowski (@drybjed) ansible community.general.jenkins_job – Manage jenkins jobs community.general.jenkins\_job – Manage jenkins jobs ==================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.jenkins_job`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Manage Jenkins jobs by using Jenkins REST API. Requirements ------------ The below requirements are needed on the host that executes this module. * python-jenkins >= 0.4.12 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **config** string | | config in XML format. Required if job does not yet exist. Mutually exclusive with `enabled`. Considered if `state=present`. | | **enabled** boolean | **Choices:*** no * yes | Whether the job should be enabled or disabled. Mutually exclusive with `config`. Considered if `state=present`. | | **name** string / required | | Name of the Jenkins job. | | **password** string | | Password to authenticate with the Jenkins server. | | **state** string | **Choices:*** **present** ← * absent | Attribute that specifies if the job has to be created or deleted. | | **token** string | | API token used to authenticate alternatively to password. | | **url** string | **Default:**"http://localhost:8080" | URL where the Jenkins server is accessible. | | **user** string | | User to authenticate with the Jenkins server. | | **validate\_certs** boolean added in 2.3.0 of community.general | **Choices:*** no * **yes** ← | If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates as it avoids verifying the source site. The `python-jenkins` library only handles this by using the environment variable `PYTHONHTTPSVERIFY`. | Examples -------- ``` - name: Create a jenkins job using basic authentication community.general.jenkins_job: config: "{{ lookup('file', 'templates/test.xml') }}" name: test password: admin url: http://localhost:8080 user: admin - name: Create a jenkins job using the token community.general.jenkins_job: config: "{{ lookup('template', 'templates/test.xml.j2') }}" name: test token: asdfasfasfasdfasdfadfasfasdfasdfc url: http://localhost:8080 user: admin - name: Delete a jenkins job using basic authentication community.general.jenkins_job: name: test password: admin state: absent url: http://localhost:8080 user: admin - name: Delete a jenkins job using the token community.general.jenkins_job: name: test token: asdfasfasfasdfasdfadfasfasdfasdfc state: absent url: http://localhost:8080 user: admin - name: Disable a jenkins job using basic authentication community.general.jenkins_job: name: test password: admin enabled: False url: http://localhost:8080 user: admin - name: Disable a jenkins job using the token community.general.jenkins_job: name: test token: asdfasfasfasdfasdfadfasfasdfasdfc enabled: False url: http://localhost:8080 user: admin ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **enabled** boolean | success | Whether the jenkins job is enabled or not. **Sample:** True | | **name** string | success | Name of the jenkins job. **Sample:** test-job | | **state** string | success | State of the jenkins job. **Sample:** present | | **url** string | success | Url to connect to the Jenkins server. **Sample:** https://jenkins.mydomain.com | | **user** string | success | User used for authentication. **Sample:** admin | ### Authors * Sergio Millan Rodriguez (@sermilrod)
programming_docs
ansible community.general.ipa_sudorule – Manage FreeIPA sudo rule community.general.ipa\_sudorule – Manage FreeIPA sudo rule ========================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.ipa_sudorule`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Add, modify or delete sudo rule within IPA server using IPA API. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **cmd** list / elements=string | | List of commands assigned to the rule. If an empty list is passed all commands will be removed from the rule. If option is omitted commands will not be checked or changed. | | **cmdcategory** string | **Choices:*** all | Command category the rule applies to. | | **cmdgroup** list / elements=string added in 2.0.0 of community.general | | List of command groups assigned to the rule. If an empty list is passed all command groups will be removed from the rule. If option is omitted command groups will not be checked or changed. | | **cn** string / required | | Canonical name. Can not be changed as it is the unique identifier. aliases: name | | **description** string | | Description of the sudo rule. | | **host** list / elements=string | | List of hosts assigned to the rule. If an empty list is passed all hosts will be removed from the rule. If option is omitted hosts will not be checked or changed. Option `hostcategory` must be omitted to assign hosts. | | **hostcategory** string | **Choices:*** all | Host category the rule applies to. If 'all' is passed one must omit `host` and `hostgroup`. Option `host` and `hostgroup` must be omitted to assign 'all'. | | **hostgroup** list / elements=string | | List of host groups assigned to the rule. If an empty list is passed all host groups will be removed from the rule. If option is omitted host groups will not be checked or changed. Option `hostcategory` must be omitted to assign host groups. | | **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_prot** string | **Choices:*** http * **https** ← | Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. | | **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. | | **runasextusers** list / elements=string added in 2.3.0 of community.general | | List of external RunAs users | | **runasgroupcategory** string | **Choices:*** all | RunAs Group category the rule applies to. | | **runasusercategory** string | **Choices:*** all | RunAs User category the rule applies to. | | **state** string | **Choices:*** absent * disabled * enabled * **present** ← | State to ensure. | | **sudoopt** list / elements=string | | List of options to add to the sudo rule. | | **user** list / elements=string | | List of users assigned to the rule. If an empty list is passed all users will be removed from the rule. If option is omitted users will not be checked or changed. | | **usercategory** string | **Choices:*** all | User category the rule applies to. | | **usergroup** list / elements=string | | List of user groups assigned to the rule. If an empty list is passed all user groups will be removed from the rule. If option is omitted user groups will not be checked or changed. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | This only applies if `ipa_prot` is *https*. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. | Examples -------- ``` - name: Ensure sudo rule is present that's allows all every body to execute any command on any host without being asked for a password. community.general.ipa_sudorule: name: sudo_all_nopasswd cmdcategory: all description: Allow to run every command with sudo without password hostcategory: all sudoopt: - '!authenticate' usercategory: all ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - name: Ensure user group developers can run every command on host group db-server as well as on host db01.example.com. community.general.ipa_sudorule: name: sudo_dev_dbserver description: Allow developers to run every command with sudo on all database server cmdcategory: all host: - db01.example.com hostgroup: - db-server sudoopt: - '!authenticate' usergroup: - developers ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - name: Ensure user group operations can run any commands that is part of operations-cmdgroup on any host as user root. community.general.ipa_sudorule: name: sudo_operations_all description: Allow operators to run any commands that is part of operations-cmdgroup on any host as user root. cmdgroup: - operations-cmdgroup hostcategory: all runasextusers: - root sudoopt: - '!authenticate' usergroup: - operators ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **sudorule** dictionary | always | Sudorule as returned by IPA | ### Authors * Thomas Krahn (@Nosmoht) ansible community.general.gitlab_protected_branch – (un)Marking existing branches for protection community.general.gitlab\_protected\_branch – (un)Marking existing branches for protection ========================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.gitlab_protected_branch`. New in version 3.4.0: of community.general * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * (un)Marking existing branches for protection. Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.7 * python-gitlab >= 2.3.0 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_password** string | | The password to use for authentication against the API | | **api\_token** string / required | | GitLab access token with API permissions. | | **api\_url** string | | The resolvable endpoint for the API | | **api\_username** string | | The username to use for authentication against the API | | **merge\_access\_levels** string | **Choices:*** **maintainer** ← * developer * nobody | Access levels allowed to merge. | | **name** string / required | | The name of the branch that needs to be protected. Can make use a wildcard charachter for like `production/*` or just have `main` or `develop` as value. | | **project** string / required | | The path and name of the project. | | **push\_access\_level** string | **Choices:*** **maintainer** ← * developer * nobody | Access levels allowed to push. | | **state** string | **Choices:*** **present** ← * absent | Create or delete proteced branch. | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | Whether or not to validate SSL certs when supplying a https endpoint. | Examples -------- ``` - name: Create protected branch on main community.general.gitlab_protected_branch: api_url: https://gitlab.com api_token: secret_access_token project: "dj-wasabi/collection.general" name: main merge_access_levels: maintainer push_access_level: nobody ``` ### Authors * Werner Dijkerman (@dj-wasabi) ansible community.general.consul_acl – Manipulate Consul ACL keys and rules community.general.consul\_acl – Manipulate Consul ACL keys and rules ==================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.consul_acl`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Allows the addition, modification and deletion of ACL keys and associated rules in a consul cluster via the agent. For more details on using and configuring ACLs, see <https://www.consul.io/docs/guides/acl.html>. Requirements ------------ The below requirements are needed on the host that executes this module. * python-consul * pyhcl * requests Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **host** string | **Default:**"localhost" | host of the consul agent defaults to localhost | | **mgmt\_token** string / required | | a management token is required to manipulate the acl lists | | **name** string | | the name that should be associated with the acl key, this is opaque to Consul | | **port** integer | **Default:**8500 | the port on which the consul agent is running | | **rules** list / elements=dictionary | | rules that should be associated with a given token | | **scheme** string | **Default:**"http" | the protocol scheme on which the consul agent is running | | **state** string | **Choices:*** **present** ← * absent | whether the ACL pair should be present or absent | | **token** string | | the token key identifying an ACL rule set. If generated by consul this will be a UUID | | **token\_type** string | **Choices:*** **client** ← * management | the type of token that should be created | | **validate\_certs** boolean | **Choices:*** no * **yes** ← | whether to verify the tls certificate of the consul agent | Examples -------- ``` - name: Create an ACL with rules community.general.consul_acl: host: consul1.example.com mgmt_token: some_management_acl name: Foo access rules: - key: "foo" policy: read - key: "private/foo" policy: deny - name: Create an ACL with a specific token community.general.consul_acl: host: consul1.example.com mgmt_token: some_management_acl name: Foo access token: my-token rules: - key: "foo" policy: read - name: Update the rules associated to an ACL token community.general.consul_acl: host: consul1.example.com mgmt_token: some_management_acl name: Foo access token: some_client_token rules: - event: "bbq" policy: write - key: "foo" policy: read - key: "private" policy: deny - keyring: write - node: "hgs4" policy: write - operator: read - query: "" policy: write - service: "consul" policy: write - session: "standup" policy: write - name: Remove a token community.general.consul_acl: host: consul1.example.com mgmt_token: some_management_acl token: 172bd5c8-9fe9-11e4-b1b0-3c15c2c9fd5e state: absent ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **operation** string | changed | the operation performed on the ACL **Sample:** update | | **rules** string | *status* == "present" | the HCL JSON representation of the rules associated to the ACL, in the format described in the Consul documentation (https://www.consul.io/docs/guides/acl.html#rule-specification). **Sample:** {'key': {'bar': {'policy': 'deny'}, 'foo': {'policy': 'write'}}} | | **token** string | success | the token associated to the ACL (the ACL's ID) **Sample:** a2ec332f-04cf-6fba-e8b8-acf62444d3da | ### Authors * Steve Gargan (@sgargan) * Colin Nolan (@colin-nolan) ansible community.general.cronvar – Manage variables in crontabs community.general.cronvar – Manage variables in crontabs ======================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.cronvar`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * Use this module to manage crontab variables. * This module allows you to create, update, or delete cron variable definitions. Requirements ------------ The below requirements are needed on the host that executes this module. * cron Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **backup** boolean | **Choices:*** **no** ← * yes | If set, create a backup of the crontab before it is modified. The location of the backup is returned in the `backup` variable by this module. | | **cron\_file** string | | If specified, uses this file instead of an individual user's crontab. Without a leading `/`, this is assumed to be in */etc/cron.d*. With a leading `/`, this is taken as absolute. | | **insertafter** string | | If specified, the variable will be inserted after the variable specified. Used with `state=present`. | | **insertbefore** string | | Used with `state=present`. If specified, the variable will be inserted just before the variable specified. | | **name** string / required | | Name of the crontab variable. | | **state** string | **Choices:*** absent * **present** ← | Whether to ensure that the variable is present or absent. | | **user** string | | The specific user whose crontab should be modified. This parameter defaults to `root` when unset. | | **value** string | | The value to set this variable to. Required if `state=present`. | Examples -------- ``` - name: Ensure entry like "[email protected]" exists community.general.cronvar: name: EMAIL value: [email protected] - name: Ensure a variable does not exist. This may remove any variable named "LEGACY" community.general.cronvar: name: LEGACY state: absent - name: Add a variable to a file under /etc/cron.d community.general.cronvar: name: LOGFILE value: /var/log/yum-autoupdate.log user: root cron_file: ansible_yum-autoupdate ``` ### Authors * Doug Luce (@dougluce) ansible community.general.rax_cbs – Manipulate Rackspace Cloud Block Storage Volumes community.general.rax\_cbs – Manipulate Rackspace Cloud Block Storage Volumes ============================================================================= Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.rax_cbs`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) Synopsis -------- * Manipulate Rackspace Cloud Block Storage Volumes Requirements ------------ The below requirements are needed on the host that executes this module. * python >= 2.6 * pyrax Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **api\_key** string | | Rackspace API key, overrides *credentials*. aliases: password | | **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/> | | **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided. aliases: creds\_file | | **description** string | | Description to give the volume being created | | **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. | | **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. | | **image** string | | image to use for bootable volumes. Can be an `id`, `human_id` or `name`. This option requires `pyrax>=1.9.3` | | **meta** dictionary | | A hash of metadata to associate with the volume | | **name** string / required | | Name to give the volume being created | | **region** string | | Region to create an instance in. | | **size** integer | **Default:**100 | Size of the volume to create in Gigabytes | | **snapshot\_id** string | | The id of the snapshot to create the volume from | | **state** string | **Choices:*** **present** ← * absent | Indicate desired state of the resource | | **tenant\_id** string | | The tenant ID used for authentication. | | **tenant\_name** string | | The tenant name used for authentication. | | **username** string | | Rackspace username, overrides *credentials*. | | **validate\_certs** boolean | **Choices:*** no * yes | Whether or not to require SSL validation of API endpoints. aliases: verify\_ssl | | **volume\_type** string | **Choices:*** **SATA** ← * SSD | Type of the volume being created | | **wait** boolean | **Choices:*** **no** ← * yes | wait for the volume to be in state 'available' before returning | | **wait\_timeout** integer | **Default:**300 | how long before wait gives up, in seconds | Notes ----- Note * The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`. * `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating> * `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file * `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, …) Examples -------- ``` - name: Build a Block Storage Volume gather_facts: False hosts: local connection: local tasks: - name: Storage volume create request local_action: module: rax_cbs credentials: ~/.raxpub name: my-volume description: My Volume volume_type: SSD size: 150 region: DFW wait: yes state: present meta: app: my-cool-app register: my_volume ``` ### Authors * Christopher H. Laco (@claco) * Matt Martz (@sivel)
programming_docs
ansible community.general.splunk – Sends task result events to Splunk HTTP Event Collector community.general.splunk – Sends task result events to Splunk HTTP Event Collector ================================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.splunk`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) Synopsis -------- * This callback plugin will send task results as JSON formatted events to a Splunk HTTP collector. * The companion Splunk Monitoring & Diagnostics App is available here “<https://splunkbase.splunk.com/app/4023/>” * Credit to “Ryan Currah (@ryancurrah)” for original source upon which this is based. Requirements ------------ The below requirements are needed on the local controller node that executes this callback. * Whitelisting this callback plugin * Create a HTTP Event Collector in Splunk * Define the url and token in ansible.cfg Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **authtoken** string | | ini entries: [callback\_splunk]authtoken = None env:SPLUNK\_AUTHTOKEN | Token to authenticate the connection to the Splunk HTTP collector | | **batch** string added in 3.3.0 of community.general | | ini entries: [callback\_splunk]batch = None env:SPLUNK\_BATCH | Correlation ID which can be set across multiple playbook executions. | | **include\_milliseconds** boolean added in 2.0.0 of community.general | **Choices:*** **no** ← * yes | ini entries: [callback\_splunk]include\_milliseconds = no env:SPLUNK\_INCLUDE\_MILLISECONDS | Whether to include milliseconds as part of the generated timestamp field in the event sent to the Splunk HTTP collector | | **url** string | | ini entries: [callback\_splunk]url = None env:SPLUNK\_URL | URL to the Splunk HTTP collector source | | **validate\_certs** boolean added in 1.0.0 of community.general | **Choices:*** no * **yes** ← | ini entries: [callback\_splunk]validate\_certs = yes env:SPLUNK\_VALIDATE\_CERTS | Whether to validate certificates for connections to HEC. It is not recommended to set to `false` except when you are sure that nobody can intercept the connection between this plugin and HEC, as setting it to `false` allows man-in-the-middle attacks! | Examples -------- ``` examples: > To enable, add this to your ansible.cfg file in the defaults block [defaults] callback_whitelist = community.general.splunk Set the environment variable export SPLUNK_URL=http://mysplunkinstance.datapaas.io:8088/services/collector/event export SPLUNK_AUTHTOKEN=f23blad6-5965-4537-bf69-5b5a545blabla88 Set the ansible.cfg variable in the callback_splunk block [callback_splunk] url = http://mysplunkinstance.datapaas.io:8088/services/collector/event authtoken = f23blad6-5965-4537-bf69-5b5a545blabla88 ``` ### Authors * Stuart Hirst (!UNKNOWN) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#b3c0c6c3c3dcc1c7959080848895908681889590878b88d0dcddc5d6c1d4daddd4d7d2c7d29590878588d0dcde)> ansible community.general.yaml – YAML formatted files. community.general.yaml – YAML formatted files. ============================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.yaml`. * [Synopsis](#synopsis) * [Parameters](#parameters) Synopsis -------- * This cache uses YAML formatted, per host, files saved to the filesystem. Parameters ---------- | Parameter | Choices/Defaults | Configuration | Comments | | --- | --- | --- | --- | | **\_prefix** string | | ini entries: [defaults]fact\_caching\_prefix = None env:ANSIBLE\_CACHE\_PLUGIN\_PREFIX | User defined prefix to use when creating the files | | **\_timeout** integer | **Default:**86400 | ini entries: [defaults]fact\_caching\_timeout = 86400 env:ANSIBLE\_CACHE\_PLUGIN\_TIMEOUT | Expiration timeout in seconds for the cache plugin data. Set to 0 to never expire | | **\_uri** string / required | | ini entries: [defaults]fact\_caching\_connection = None env:ANSIBLE\_CACHE\_PLUGIN\_CONNECTION | Path in which the cache plugin will save the files | ### Authors * Brian Coca (@bcoca) ansible community.general.oneandone_load_balancer – Configure 1&1 load balancer. community.general.oneandone\_load\_balancer – Configure 1&1 load balancer. ========================================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.oneandone_load_balancer`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Create, remove, update load balancers. This module has a dependency on 1and1 >= 1.0 Requirements ------------ The below requirements are needed on the host that executes this module. * 1and1 * python >= 2.6 Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **add\_rules** list / elements=dictionary | | A list of rules that will be added to an existing load balancer. It is syntax is the same as the one used for rules parameter. Used in combination with update state. | | **add\_server\_ips** list / elements=string | | A list of server identifiers (id or name) to be assigned to a load balancer. Used in combination with update state. | | **api\_url** string | | Custom API URL. Overrides the ONEANDONE\_API\_URL environment variable. | | **auth\_token** string | | Authenticating API token provided by 1&1. | | **datacenter** string | **Choices:*** US * ES * DE * GB | ID or country code of the datacenter where the load balancer will be created. If not specified, it defaults to *US*. | | **description** string | | Description of the load balancer. maxLength=256 | | **health\_check\_interval** string | | Health check period in seconds. minimum=5, maximum=300, multipleOf=1 | | **health\_check\_parse** string | | Regular expression to check. Required for HTTP health check. maxLength=64 | | **health\_check\_path** string | | Url to call for checking. Required for HTTP health check. maxLength=1000 | | **health\_check\_test** string | **Choices:*** NONE * TCP * HTTP * ICMP | Type of the health check. At the moment, HTTP is not allowed. | | **load\_balancer** string | | The identifier (id or name) of the load balancer used with update state. | | **method** string | **Choices:*** ROUND\_ROBIN * LEAST\_CONNECTIONS | Balancing procedure. | | **name** string | | Load balancer name used with present state. Used as identifier (id or name) when used with absent state. maxLength=128 | | **persistence** boolean | **Choices:*** no * yes | Persistence. | | **persistence\_time** string | | Persistence time in seconds. Required if persistence is enabled. minimum=30, maximum=1200, multipleOf=1 | | **remove\_rules** list / elements=string | | A list of rule ids that will be removed from an existing load balancer. Used in combination with update state. | | **remove\_server\_ips** list / elements=string | | A list of server IP ids to be unassigned from a load balancer. Used in combination with update state. | | **rules** list / elements=dictionary | | A list of rule objects that will be set for the load balancer. Each rule must contain protocol, port\_balancer, and port\_server parameters, in addition to source parameter, which is optional. | | **state** string | **Choices:*** **present** ← * absent * update | Define a load balancer state to create, remove, or update. | | **wait** boolean | **Choices:*** no * **yes** ← | wait for the instance to be in state 'running' before returning | | **wait\_interval** integer | **Default:**5 | Defines the number of seconds to wait when using the \_wait\_for methods | | **wait\_timeout** integer | **Default:**600 | how long before wait gives up, in seconds | Examples -------- ``` - name: Create a load balancer community.general.oneandone_load_balancer: auth_token: oneandone_private_api_key name: ansible load balancer description: Testing creation of load balancer with ansible health_check_test: TCP health_check_interval: 40 persistence: true persistence_time: 1200 method: ROUND_ROBIN datacenter: US rules: - protocol: TCP port_balancer: 80 port_server: 80 source: 0.0.0.0 wait: true wait_timeout: 500 - name: Destroy a load balancer community.general.oneandone_load_balancer: auth_token: oneandone_private_api_key name: ansible load balancer wait: true wait_timeout: 500 state: absent - name: Update a load balancer community.general.oneandone_load_balancer: auth_token: oneandone_private_api_key load_balancer: ansible load balancer name: ansible load balancer updated description: Testing the update of a load balancer with ansible wait: true wait_timeout: 500 state: update - name: Add server to a load balancer community.general.oneandone_load_balancer: auth_token: oneandone_private_api_key load_balancer: ansible load balancer updated description: Adding server to a load balancer with ansible add_server_ips: - server identifier (id or name) wait: true wait_timeout: 500 state: update - name: Remove server from a load balancer community.general.oneandone_load_balancer: auth_token: oneandone_private_api_key load_balancer: ansible load balancer updated description: Removing server from a load balancer with ansible remove_server_ips: - B2504878540DBC5F7634EB00A07C1EBD (server's ip id) wait: true wait_timeout: 500 state: update - name: Add rules to a load balancer community.general.oneandone_load_balancer: auth_token: oneandone_private_api_key load_balancer: ansible load balancer updated description: Adding rules to a load balancer with ansible add_rules: - protocol: TCP port_balancer: 70 port_server: 70 source: 0.0.0.0 - protocol: TCP port_balancer: 60 port_server: 60 source: 0.0.0.0 wait: true wait_timeout: 500 state: update - name: Remove rules from a load balancer community.general.oneandone_load_balancer: auth_token: oneandone_private_api_key load_balancer: ansible load balancer updated description: Adding rules to a load balancer with ansible remove_rules: - rule_id #1 - rule_id #2 - ... wait: true wait_timeout: 500 state: update ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **load\_balancer** dictionary | always | Information about the load balancer that was processed **Sample:** {"id": "92B74394A397ECC3359825C1656D67A6", "name": "Default Balancer"} | ### Authors * Amel Ajdinovic (@aajdinov) * Ethan Devenport (@edevenport) ansible community.general.clc_publicip – Add and Delete public ips on servers in CenturyLink Cloud. community.general.clc\_publicip – Add and Delete public ips on servers in CenturyLink Cloud. ============================================================================================ Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.clc_publicip`. * [Synopsis](#synopsis) * [Requirements](#requirements) * [Parameters](#parameters) * [Notes](#notes) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * An Ansible module to add or delete public ip addresses on an existing server or servers in CenturyLink Cloud. Requirements ------------ The below requirements are needed on the host that executes this module. * python = 2.7 * requests >= 2.5.0 * clc-sdk Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **ports** list / elements=integer | | A list of ports to expose. This is required when state is 'present' | | **protocol** string | **Choices:*** **TCP** ← * UDP * ICMP | The protocol that the public IP will listen for. | | **server\_ids** list / elements=string / required | | A list of servers to create public ips on. | | **state** string | **Choices:*** **present** ← * absent | Determine whether to create or delete public IPs. If present module will not create a second public ip if one already exists. | | **wait** boolean | **Choices:*** no * **yes** ← | Whether to wait for the tasks to finish before returning. | Notes ----- Note * To use this module, it is required to set the below environment variables which enables access to the Centurylink Cloud - CLC\_V2\_API\_USERNAME, the account login id for the centurylink cloud - CLC\_V2\_API\_PASSWORD, the account password for the centurylink cloud * Alternatively, the module accepts the API token and account alias. The API token can be generated using the CLC account login and password via the HTTP api call @ <https://api.ctl.io/v2/authentication/login> - CLC\_V2\_API\_TOKEN, the API token generated from <https://api.ctl.io/v2/authentication/login> - CLC\_ACCT\_ALIAS, the account alias associated with the centurylink cloud * Users can set CLC\_V2\_API\_URL to specify an endpoint for pointing to a different CLC environment. Examples -------- ``` # Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples - name: Add Public IP to Server hosts: localhost gather_facts: False connection: local tasks: - name: Create Public IP For Servers community.general.clc_publicip: protocol: TCP ports: - 80 server_ids: - UC1TEST-SVR01 - UC1TEST-SVR02 state: present register: clc - name: Debug ansible.builtin.debug: var: clc - name: Delete Public IP from Server hosts: localhost gather_facts: False connection: local tasks: - name: Create Public IP For Servers community.general.clc_publicip: server_ids: - UC1TEST-SVR01 - UC1TEST-SVR02 state: absent register: clc - name: Debug ansible.builtin.debug: var: clc ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **server\_ids** list / elements=string | success | The list of server ids that are changed **Sample:** ['UC1TEST-SVR01', 'UC1TEST-SVR02'] | ### Authors * CLC Runner (@clc-runner) ansible community.general.zfs_facts – Gather facts about ZFS datasets. community.general.zfs\_facts – Gather facts about ZFS datasets. =============================================================== Note This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1). 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 community.general`. To use it in a playbook, specify: `community.general.zfs_facts`. * [Synopsis](#synopsis) * [Parameters](#parameters) * [Examples](#examples) * [Return Values](#return-values) Synopsis -------- * Gather facts from ZFS dataset properties. Parameters ---------- | Parameter | Choices/Defaults | Comments | | --- | --- | --- | | **depth** integer | | Specifies recursion depth. | | **name** string / required | | ZFS dataset name. aliases: ds, dataset | | **parsable** boolean | **Choices:*** **no** ← * yes | Specifies if property values should be displayed in machine friendly format. | | **properties** string | **Default:**"all" | Specifies which dataset properties should be queried in comma-separated format. For more information about dataset properties, check zfs(1M) man page. | | **recurse** boolean | **Choices:*** **no** ← * yes | Specifies if properties for any children should be recursively displayed. | | **type** string | **Choices:*** **all** ← * filesystem * volume * snapshot * bookmark | Specifies which datasets types to display. Multiple values have to be provided in comma-separated form. | Examples -------- ``` - name: Gather facts about ZFS dataset rpool/export/home community.general.zfs_facts: dataset: rpool/export/home - name: Report space usage on ZFS filesystems under data/home community.general.zfs_facts: name: data/home recurse: yes type: filesystem - ansible.builtin.debug: msg: 'ZFS dataset {{ item.name }} consumes {{ item.used }} of disk space.' with_items: '{{ ansible_zfs_datasets }}' ``` Return Values ------------- Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module: | Key | Returned | Description | | --- | --- | --- | | **name** string | always | ZFS dataset name **Sample:** rpool/var/spool | | **parsable** boolean | if 'parsable' is set to True | if parsable output should be provided in machine friendly format. **Sample:** True | | **recurse** boolean | if 'recurse' is set to True | if we should recurse over ZFS dataset **Sample:** True | | **zfs\_datasets** string | always | ZFS dataset facts **Sample:** {'aclinherit': 'restricted', 'aclmode': 'discard', 'atime': 'on', 'available': '43.8G', 'canmount': 'on', 'casesensitivity': 'sensitive', 'checksum': 'on', 'compression': 'off', 'compressratio': '1.00x', 'copies': '1', 'creation': 'Thu Jun 16 11:37 2016', 'dedup': 'off', 'devices': 'on', 'exec': 'on', 'filesystem\_count': 'none', 'filesystem\_limit': 'none', 'logbias': 'latency', 'logicalreferenced': '18.5K', 'logicalused': '3.45G', 'mlslabel': 'none', 'mounted': 'yes', 'mountpoint': '/rpool', 'name': 'rpool', 'nbmand': 'off', 'normalization': 'none', 'org.openindiana.caiman:install': 'ready', 'primarycache': 'all', 'quota': 'none', 'readonly': 'off', 'recordsize': '128K', 'redundant\_metadata': 'all', 'refcompressratio': '1.00x', 'referenced': '29.5K', 'refquota': 'none', 'refreservation': 'none', 'reservation': 'none', 'secondarycache': 'all', 'setuid': 'on', 'sharenfs': 'off', 'sharesmb': 'off', 'snapdir': 'hidden', 'snapshot\_count': 'none', 'snapshot\_limit': 'none', 'sync': 'standard', 'type': 'filesystem', 'used': '4.41G', 'usedbychildren': '4.41G', 'usedbydataset': '29.5K', 'usedbyrefreservation': '0', 'usedbysnapshots': '0', 'utf8only': 'off', 'version': '5', 'vscan': 'off', 'written': '29.5K', 'xattr': 'on', 'zoned': 'off'} | ### Authors * Adam Števko (@xen0l)
programming_docs