Ansible integration
|
This feature is a technology preview. |
|
Currently, the supported version of Ansible is 2.9 (LTS) shipped in SUSE Linux Enterprise 15 Client Tools channels. For Control Nodes running operating systems other than SUSE Linux Enterprise, use Ansible shipped by your distribution. |
Feature Overview
Uyuni enables system administrators to operate their Ansible Control Nodes. Supported features are: * introspection of inventory files * discovery of playbooks * execution of playbooks
Requirements
To use Ansible features, you need to register your Ansible Control Node system as a Salt client in your Uyuni. Moreover, you must enable the Ansible Control Node system type in the Add-on System Types in the page of that system.
Enabling this system type ensures that the ansible package is installed on the system by adding it in the highstate and activates the Ansible features under the page.
As the next step, configure the paths to your Ansible inventories and playbooks in the . As an inventory path, you can use the typical ansible inventory path /etc/ansible/hosts. As a playbook directory, you can use any directory on the control node, where your playbooks reside. A playbook directory either directly contains the site.yml or contains subdirectories with this file.
Inventory introspection
After defining an inventory path, you can use Uyuni to introspect its contents. You can do so in the page. Clicking an inventory path in this page executes the inventory introspection on the Control Node in real-time.
Playbook discovery
After defining a playbook directory, you can discover playbooks via the page.
As with the inventory introspection, the playbook discovery operations run on the Control Node in real-time.
Playbook execution
You can schedule a playbook execution from the page. After selecting the playbook you wish to execute, you can select the inventory file for the execution from the dropdown element. If you do not select any item, the default inventory configured in your Control Node will be used. The dropdown element is populated with the inventories you defined in your Inventory paths and with inventories that have been locally discovered in your playbook directories (displayed as "Custom Inventory" items in the playbook details). You can also enter an arbitrary inventory path.
Afterwards, you choose the time of the playbook execution or select an action chain. Eventually, the Uyuni executes the playbook as an action on the Control Node. You can see the result of the operation in the action details page.