57fef57868
In preparation for moving the current code into a new file but retaining the existing dynamic_inventory.py entry-point, this change modifies the main function so that can generate inventory without having to be in the same directory as the env.d dir. An initial attempt to move the `main` function of dynamic_inventory into a structure like this: playbooks/ inventory/ env.d/ <env files> dynamic_inventory.py lib/ generate.py (contents of dynamic_inventory moved here) resulted in errors when trying to access env.d due to using os.path.join(__file__) inside the function. Also, incorporating this change with the move would have resulted in a harder-to-review patch. Instead, the `args` function will be left inside of dynamic_inventory.py when `main` is moved out, so that the CLI-facing code is grouped together. Since the base environment was moved to a command line argument, documentation was added as to its function, as well as the differences from the --config argument. As a side effect, this opens the door to running tests with multiple environment layouts. However, none is added with this review. Change-Id: Ie690f31b64c7381257634a9dbb2ee5b4197fd9bf |
||
---|---|---|
.. | ||
common-tasks | ||
defaults/repo_packages | ||
inventory | ||
roles/system_crontab_coordination | ||
vars/configs | ||
etcd-install.yml | ||
galera-install.yml | ||
haproxy-install.yml | ||
lxc-containers-create.yml | ||
lxc-containers-destroy.yml | ||
lxc-hosts-setup.yml | ||
memcached-install.yml | ||
openstack-hosts-setup.yml | ||
os-aodh-install.yml | ||
os-ceilometer-install.yml | ||
os-cinder-install.yml | ||
os-glance-install.yml | ||
os-gnocchi-install.yml | ||
os-heat-install.yml | ||
os-horizon-install.yml | ||
os-ironic-install.yml | ||
os-keystone-install.yml | ||
os-magnum-install.yml | ||
os-neutron-install.yml | ||
os-nova-install.yml | ||
os-rally-install.yml | ||
os-sahara-install.yml | ||
os-swift-install.yml | ||
os-swift-sync.yml | ||
os-tempest-install.yml | ||
rabbitmq-install.yml | ||
repo-build.yml | ||
repo-install.yml | ||
repo-server.yml | ||
rsyslog-install.yml | ||
security-hardening.yml | ||
setup-everything.yml | ||
setup-hosts.yml | ||
setup-infrastructure.yml | ||
setup-openstack.yml | ||
unbound-install.yml | ||
utility-install.yml |