inventory-manage.py --file option can cause the output to overwrite the default inventory file

Bug #1667814 reported by Joel Griffiths
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Confirmed
Medium
Unassigned

Bug Description

When --file option is specified on the inventory-manage.py command line, the script will load the exact filename specified (path and name). When it saves the changes though, the script will save the file to the same path, but it will use the default inventory filename.

Example:
scripts/inventory-manage.py -r "openstack003_repo_container-8d447a61" -f /tmp/openstack_inventory-non-default.json

This will read /tmp/openstack_inventory-non-default.json, but it will write the changes to /tmp/openstack_inventory.json

Changed in openstack-ansible:
assignee: nobody → Joel Griffiths (5s-ubuntu)
Changed in openstack-ansible:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Nolan Brubaker (nolan-brubaker) wrote :

Can confirm this - the loading uses the `load_from_json` common function which takes the user argument. Writing after clearing IPs and removal uses only the filename returned from `load_from_json`, which may not match the CLI argument.

Changed in openstack-ansible:
assignee: Joel Griffiths (gadgetwiz) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.