0

I need help with Ansible AWX Inventory. We have many/different inventories on our AWX server which we are importing through different methods.

I have a requirement to search and fetch inventory names in a playbook and put it in a list, which starts from (ABC_DateTime) or (XYZ_DateTime) and create schedule on AWX through playbook. Inventory file is dynamic and changing every time but Prefix is fixed (ABC_, XYZ_).

Can you guys please help me to write a playbook that I would run on AWX server locally and it could fetch inventories starts from (ABC_* or XYZ_ *)

In a play book, I need to get inventory in two different lists (for XYZ) and (for ABC) so I could use it for scheduling. All I care about to fetch dynamic inventory name in playbook and store it in a variable/list. i.e.

...
ABC_2022-04-20
ABC_2022-06-29
ABC_2022-03-20
XYZ_2022-03-20
XYZ_2022-02-19
XYZ_2022-03-23
...

0 Answers0