Skip to main content
Version: Release 24.3

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

  1. From the navigation pane, under CONFIGURATION, click Connections.
  2. Under Other, next to Unix Host, click add button. The New Unix Host page opens.
  3. In the Title field, enter the name of the Ansible server. This name will display in Jenkins tasks.
  4. In the Address box, enter the IP address or host name of the remote machine running Ansible.
  5. In the Connection Type field, select a connection type from the drop-down list. Note that, it currently supports only SUDO.
  6. In the Port box, enter the SSH port of the remote machine.
  7. 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.
  8. In the Sudo Username box, enter the user name of the sudo user on the remote machine (for example, root).
  9. To test the connection, click Test.
  10. To save the configuration, click Save.

Create Ansible server

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.

  1. In the release flow tab of a Release template, add a task of type Ansible > Run Playbook (Container).
  2. Click the added task to open it.
  3. 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.
  4. In the Host field, select the Ansible controller host.
  5. In the Playbook field, enter the YAML as plain text to specify the playbook.
  6. In the Playbook Path field, enter the location of a YAML file that already exists on the target Ansible server.
  7. In the Git Repository field, select the Git repository connection.
  8. In the Branch field, enter the git repository branch name.
  9. In the Git Playbook Path field, enter the path to the YAML file in the Git.
  10. In the Additional command line parameters field, enter the command line parameters that are needed to pass with Ansible-playbook command.
  11. In the Ansible Cmd field, enter the complete path of the ansible-playbook executable.

BuRun Playbook (Container)