In this video I integrate an Ansible inventory with Github for better tracking and management of an Ansible hosts inventory.
Previous video showing Github integration for playbooks:
• Ansible Tower: Github Integration for...
1) Create a 'hosts' file in the Github repository you want to use:
[all]
your-server-1
your-server-2
your-server-3
[category1]
your-server-1
your-server-2
[category2]
your-server-3
2) Either create a new project to point to a Github repository or using an existing one you've already created to sync your playbooks.
3) Create a new Inventory, and Save it.
4) Within the Inventory, select the Sources tab at top, add (+), from Source choose 'Sourced From a Project'.
5) Under 'Inventory File' enter 'hosts' - the name of your host file.
6) Choose 'Update Options' (Update on Launch will update the inventory before launching a playbook/job using this inventory).
7) Save. Attempt Sync from Inventory section. If it fails (red cloud) Sync from the Projects section.
8) Go back to Inventories and Sources tab. Sync again. Cloud should turn green.
9) View the Hosts in the Hosts tab.
10) In the Templates section choose the new inventory and the appropriate groups from that file.
11) Inventory is now successfully integrated into Github and jobs/playbooks can be run with this inventory.
12) Remember: The host groups to use from the inventory file are applied in the playbook itself.
Смотрите видео Ansible Tower: Github Inventory Integration онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь CyberScribe.org 08 Май 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 9,787 раз и оно понравилось 81 людям.