Bookmark this page

Summary

  • You can use the ansible.builtin.import_playbook module to incorporate external play files into playbooks.

  • You can use the ansible.builtin.include_tasks or ansible.builtin.import_tasks modules to incorporate external task files into playbooks.

  • You can use the ansible.builtin.include_role or ansible.builtin.import_role modules to incorporate roles into playbooks.

  • When you include content, Ansible processes it dynamically as content is reached. When you import content, Ansible processes it before the run starts.

  • Ansible Content Collections provide a set of related modules, roles, and other plug-ins that you can use in your playbooks.

  • Ansible Roles and Ansible Content Collections help you to reuse and share Ansible code.

  • You can use the ansible-galaxy command to find, download, and manage Ansible Roles and Ansible Content Collections.

  • Red Hat provides Red Hat Certified Ansible Content Collections through a cloud based service, automation hub. Red Hat and its ecosystem partners support these Ansible Content Collections.

  • You can use an on-premise service, private automation hub, to distribute Red Hat Certified Ansible Content Collections or your own Ansible Content Collections.

  • You can create a requirements.yml file in the project directory that lists all the roles and collections that your Ansible project requires. Automation controller detects this file and automatically installs the specified roles or collections before running your playbooks.

Revision: do457-2.3-7cfa22a