Ansible Container Plugin
The Ansible container plugin plugin allows Release to run playblooks on an Ansible host.
important
You must set up a connection to a Unix server running Ansible. For more information, see Set up Connection to Ansible Server.
note
In the release flow editor, Container tasks have a blue border.
Prerequisites
For Ansible integration, you need the following:
- Unix server running Ansible
- Digital.ai Release Runner setup to run the container tasks
Set up Connection to Ansible Server
- From the navigation pane, under CONFIGURATION, click Connections.
- Under Other, next to Unix Host, click . The New Unix Host page opens.
- In the Title field, enter the name of the Ansible server. This name will display in Jenkins tasks.
- In the Address box, enter the IP address or host name of the remote machine running Ansible.
- In the Connection Type field, select a connection type from the drop-down list. Note that, it currently supports only SUDO.
- In the Port box, enter the SSH port of the remote machine.
- In the Username and Password boxes, specify the user name and password of the SSH user that Release should use when connecting to the remote machine. Note that, if you're using the private key, it currently supports only the RSA private key.
- In the Sudo Username box, enter the user name of the
sudo
user on the remote machine (for example,root
). - To test the connection, click Test.
- To save the configuration, click Save.
Run Playbook (Container)
The Run Playbook (Container) task is used to run an Ansible playbook. It requires you to specify the playbook in YAML format.
- In the release flow tab of a Release template, add a task of type Ansible > Run Playbook (Container).
- Click the added task to open it.
- In the Capabilities field, enter a value that matches the capability set for your Runner. This will help you to route jobs to that particular Runner.
- In the Host field, select the Ansible controller host.
- In the Playbook field, enter the YAML as plain text to specify the playbook.
- In the Playbook Path field, enter the location of a YAML file that already exists on the target Ansible server.
- In the Additional command line parameters field, enter the command line parameters that are needed to pass with Ansible-playbook command.
- In the Ansible Cmd field, enter the complete path of the ansible-playbook executable.