How to migrate inventory scripts from Red Hat Ansible tower to Red Hat Ansible Automation Platform?
Environment
- Red Hat® Ansible Automation Platform 2.x
Issue
- How to migrate inventory scripts from Ansible tower to Ansible Automation Platform?
Resolution
-
Inventory Scriptsdirect options is deprecated inRed Hat Ansible Automation Platform. For more information, refer to the document Content from docs.ansible.com is not included.Custom Inventory Scripts -
To migrate
Inventory ScriptsonRed Hat Ansible Automation Platform, refer to the below steps.[1] Place
Inventory Scripton Git with execute permission, Create a new project using theGit Source Controldetails, and sync the project. For more information, refer to the document: Content from docs.ansible.com is not included.Create Project using SCM Types - Git and Subversion[2] Create an Inventory with basic details. For more information, refer to the document: Content from docs.ansible.com is not included.Add a new Inventory
[3] Add
Sourceswith the below minimum required details. For more information, refer to the document: Content from docs.ansible.com is not included.Add Soruce- Source Name - Description - Execution Environment - Select `Source` as `Sourced from a Project` - Select `Inventory Project` - Select `Inventory file`[4] Start sync for
Sourcein Inventory. -
Inventory scriptwill be executed usingExecution Environemtand if any python module is missing, create a newExecution Environmentto include the missing python module using the document Content from docs.ansible.com is not included.Execution Environment
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.