ansible.controller collection can use environment variables to access the API. Set them before you launch
export CONTROLLER_HOST=http://you-controller.example.com export CONTROLLER_USERNAME=admin export CONTROLLER_PASSWORD=yourpassword export CONTROLLER_VERIFY_SSL=true # disable by using "false" instead
It is recommended to use environment variables for infrastructure credentials since this is the method automation controller uses when injecting credentials as well. You can store the variables in a text file and source it into your shell.
Choose one of the following providers if you do not bring your own VM or instance, but you want to use the playbooks provided to create an instance or VM for you. If you are a Red Hat Employee of official partner and have access to Ted Hat Product Demo portal, you can request Open Environment credentials.
There are two variables:
type is used to choose where you want to deploy the automation controller instance.
controller_enable_provider is used to enable and configure the dynamic inventories. The dynamic inventory for provider specified in ’type’ will automatically be enabled. For example if you use
type == ec2 to deploy on Amazon EC2, AWS will automatically configured as a dynamic inventory in automation controller, even if you didn’t set
controller_enable_provider_ec2 == true.
The playbooks and roles do not handle your DNS setup! If you want to use nice FQDN’s (which is highly recommended), you will have to take care of managing DNS by yourself. This is mainly because there are too many ways to setup and manage DNS. If you have a good idea on how to improve this, feel free to open a Feature Request.
Environment variables to use Amazon EC2:
export AWS_ACCESS_KEY_ID=<YOUR ACCESS KEY> export AWS_SECRET_ACCESS_KEY=<YOUR SECRET KEY>
To deploy automation controller on Amazon AWS support set the following variable:
To add AWS credentials and dynamic inventory set the following variable:
Please read the Amazon Web Services Guide to learn more about setting up AWS for Ansible.
Environment variables to use Microsoft Azure:
export AZURE_SECRET=<YOUR AZURE SECRET> export AZURE_CLIENT_ID=<YOUR AZURE CLIENT ID> export AZURE_SUBSCRIPTION_ID=<YOUR AZURE SUBSCRIPTION ID> export AZURE_TENANT=<YOU AZURE TENANT ID>
Information on how to set this up can be found in the Ansible Documentation.
To enable Microsoft Azure support set the following variable:
To add Azure credentials and dynamic inventory set the following variable:
Please read the Microsoft Azure Guide to learn more about setting up Azure for Ansible.
Environment variables to use Google GCP:
export GCP_AUTH_KIND=serviceaccount export GCP_SERVICE_ACCOUNT_FILE=~<PATH TO YOUR ACCOUNT FILE> export GCP_PROJECT=<NAME OF YOUR GCP PROJECT>
To enable Google GCP support set the following variable:
To add GCP credentials and dynamic inventory set the following variable:
Please read the Google Cloud Platform Guide to learn more about setting up GCP for Ansible.
To read the variables in your current shell session: