Tag Archives: satellite

Ansible support in Red Hat Satellite 6.4

With the introduction of Red Hat Satellite version 6.4, Ansible Core is now installed as part of the Red Hat Satellite installation, as well as integration with Ansible Core features itself. But what does this look like in the web UI?

Ansible roles on the Satellite or Capsule server can be imported into Satellite, if they reside in the /etc/ansible/roles directory (by default). Note that only rhel-system-roles (from the extras repository) are supported by Red Hat, unless an Ansible Engine subscription is purchased.

Once added to the Satellite server, Satellite will be able to see the Ansible roles, ready for importing.

Once the Ansible roles have been imported into Satellite, roles can be assigned to hosts – can be during or post provisioning of hosts. Parameters can be passed along to the Ansible roles through host parameters or global parameters.

This screenshot shows the Parameters tab in the Create Host page. This is the same section used to customise any values for provision templates as well.

Ansible playbooks on the other hand can be implemented as another form of job templates, except using YAML with Embedded Ruby (ERB) templating code. Using the default job template Satellite uses to apply roles to hosts as an example, the the first half of the job template appears to be a standard playbook. But after the roles: section of the template, there’s ERB templating block which takes a list of all roles assign to a host and dynamically inserts the roles into the template. Therefore, the rendered final playbook will have the list of roles instead of the ERB templating block.

Apart from the <% %> block, the job template resembles an Ansible playbook.

Other things to note about the Ansible integration with Red Hat Satellite 6.4:

  • Remote Execution needs to be enabled from the Satellite or Capsule servers to the host. SSH traffic should be allowed as well (for Linux and Unix hosts).
  • Set up SSH keys for the remote user that will be executing Ansible on the remote host (for Linux and Unix hosts).
  • The Satellite or Capsule servers must be able to resolve the FQDN of the host, otherwise the Connect by IP setting in Administer > Settings > RemoteExecution tab needs to be set to yes.

That was just a brief introduction to the Ansible integration in Red Hat Satellite 6.4, which I’m sure will just be the beginning of further integrations in future releases.