Your team Implemented a SaaS application that requires a whole system deployment for each new customer. The Infrastructure provisioning is already automated via Terraform, and now you have been asked to develop an Ansible playbook to centralize configuration file management and deployment.
What Is the most effective way to ensure your playbooks are utilizing up-to-date and accurate Inventory?
Ansible tracks configuration resources by preserving lists, called inventory lists. These inventory files can be either simple static lists, or they can be dynamic lists that automatically update when inventory resources are added, deleted, or moved.
When using Ansible to work with hosts that you have provisioned in Oracle Cloud Infrastructure, static inventory lists can cause problems because Compute instances are added and deleted over time. They can also be affected by external tools such as Terraform, or by the Oracle Cloud Infrastructure SDKs.
Oracle Cloud Infrastructure provides two tools for working with Ansible inventory: a dynamic inventory plugin (recommended) and a dynamic inventory script.
Using the Dynamic Inventory Script
Having up-to-date and accurate inventory lists is essential for running Ansible playbooks. Oracle Cloud Infrastructure provides you with a script that you can download and run to ensure that your instance inventory list is always up-to-date. The script ensures that you always have the current set of Oracle Cloud Infrastructure compute instances available to your playbooks
https://docs.cloud.oracle.com/en-us/iaas/Content/API/SDKDocs/ansibleinventoryscript.htm
Currently there are no comments in this discussion, be the first to comment!