redhat-cop / automate-tower-ha-dr

Configure High Availability and/or Disaster Recovery on a Tower Cluster
MIT License
63 stars 38 forks source link

meta: refresh_inventory doesn't seem to work #26

Open tonyreveal opened 2 years ago

tonyreveal commented 2 years ago

Testing with Tower 3.8.4-1 and Ansible 2.9.25.

The tower_inventory role has a step to refresh the inventory:

  - name: refresh_inventory
    meta: refresh_inventory

When running any of the *_standup or *_failover playbooks, the tower.ini is getting updated with the appropriate inventory file:

TASK [tower_inventory : debug] *****************************************************************************************************************
ok: [localhost -> localhost] =>
  msg: setting inventory to inventory_ha_dr/inventory_pm

TASK [tower_inventory : populate inventory ini with inventory_ha_dr/inventory_pm] **************************************************************
ok: [localhost -> localhost]

But the inventory is not refreshed. As a result the following plays will skip with no matching hosts.

To workaround the issue you can run ansible-playbook with -i inventory_ha_dr/inventory_pm (or whichever inventory file you need to use).