From c5551f2c8cf641250517ceb978f9c94ba337ebfb Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Sat, 28 Oct 2017 16:03:55 -0700 Subject: [PATCH] Move inventory files to folder in root of repo Move the playbooks/inventory folder, group_vars, and host_vars to inventory/ in the root of the OpenStack-Ansible repo. This helps better organize the repo structure since playbooks/ will now only contain playbooks, shared task files, and included repo package var files. group_vars and host_vars are moved alongside the inventory since that's the default place that Ansible expects those folders and to help better prepare for Ansible 2.4 where multiple inventories can be loaded, automatically including relative group and host var files. Effected docs, scripts, and variables have been updated with the new paths. Change-Id: If50e2412c3fd6575d7041deb8ecc9480b04184cc --- deploy-guide/source/conf.py | 2 +- doc/source/admin/advanced-config.rst | 4 ++-- .../admin/maintenance-tasks/scale-environment.rst | 2 +- doc/source/conf.py | 2 +- doc/source/contributor/additional-roles.rst | 4 ++-- doc/source/reference/configure-inventory.rst | 2 +- doc/source/reference/generate-inventory.rst | 10 +++++----- .../inventory => inventory}/dynamic_inventory.py | 4 ++-- {playbooks/inventory => inventory}/env.d/aodh.yml | 0 {playbooks/inventory => inventory}/env.d/barbican.yml | 0 .../inventory => inventory}/env.d/ceilometer.yml | 0 {playbooks/inventory => inventory}/env.d/ceph.yml | 0 {playbooks/inventory => inventory}/env.d/cinder.yml | 0 {playbooks/inventory => inventory}/env.d/designate.yml | 0 {playbooks/inventory => inventory}/env.d/etcd.yml | 0 {playbooks/inventory => inventory}/env.d/galera.yml | 0 {playbooks/inventory => inventory}/env.d/glance.yml | 0 {playbooks/inventory => inventory}/env.d/gnocchi.yml | 0 {playbooks/inventory => inventory}/env.d/haproxy.yml | 0 {playbooks/inventory => inventory}/env.d/heat.yml | 0 {playbooks/inventory => inventory}/env.d/horizon.yml | 0 {playbooks/inventory => inventory}/env.d/ironic.yml | 0 {playbooks/inventory => inventory}/env.d/keystone.yml | 0 {playbooks/inventory => inventory}/env.d/magnum.yml | 0 {playbooks/inventory => inventory}/env.d/memcache.yml | 0 .../inventory => inventory}/env.d/molteniron.yml | 0 {playbooks/inventory => inventory}/env.d/neutron.yml | 0 {playbooks/inventory => inventory}/env.d/nova.yml | 0 {playbooks/inventory => inventory}/env.d/octavia.yml | 0 {playbooks/inventory => inventory}/env.d/os-infra.yml | 0 {playbooks/inventory => inventory}/env.d/pkg_repo.yml | 0 {playbooks/inventory => inventory}/env.d/rabbitmq.yml | 0 {playbooks/inventory => inventory}/env.d/rsyslog.yml | 0 {playbooks/inventory => inventory}/env.d/sahara.yml | 0 .../inventory => inventory}/env.d/shared-infra.yml | 0 .../inventory => inventory}/env.d/swift-remote.yml | 0 {playbooks/inventory => inventory}/env.d/swift.yml | 0 {playbooks/inventory => inventory}/env.d/tacker.yml | 0 {playbooks/inventory => inventory}/env.d/trove.yml | 0 {playbooks/inventory => inventory}/env.d/unbound.yml | 0 {playbooks/inventory => inventory}/env.d/utility.yml | 0 .../inventory => inventory}/group_vars/all/all.yml | 0 .../inventory => inventory}/group_vars/all/ceph.yml | 0 .../inventory => inventory}/group_vars/all/cinder.yml | 0 {group_vars => inventory/group_vars}/all/designate.yml | 0 .../inventory => inventory}/group_vars/all/glance.yml | 0 .../inventory => inventory}/group_vars/all/infra.yml | 0 .../group_vars/all/keystone.yml | 0 .../inventory => inventory}/group_vars/all/neutron.yml | 0 .../inventory => inventory}/group_vars/all/nova.yml | 0 .../inventory => inventory}/group_vars/all/octavia.yml | 0 .../inventory => inventory}/group_vars/all/pip.yml | 0 .../inventory => inventory}/group_vars/all/ssl.yml | 0 .../group_vars/all_containers.yml | 0 .../inventory => inventory}/group_vars/aodh_all.yml | 0 .../group_vars/barbican_all.yml | 0 .../group_vars/ceilometer_all.yml | 0 .../inventory => inventory}/group_vars/ceph_all.yml | 0 .../inventory => inventory}/group_vars/cinder_all.yml | 0 .../group_vars/cinder_volume.yml | 0 .../group_vars/designate_all.yml | 0 .../inventory => inventory}/group_vars/galera_all.yml | 0 .../inventory => inventory}/group_vars/glance_all.yml | 0 .../inventory => inventory}/group_vars/gnocchi_all.yml | 0 .../group_vars/haproxy_all/haproxy.yml | 0 .../group_vars/haproxy_all/keepalived.yml | 0 .../inventory => inventory}/group_vars/heat_all.yml | 0 .../inventory => inventory}/group_vars/horizon_all.yml | 0 .../inventory => inventory}/group_vars/hosts.yml | 0 .../group_vars/ironic-compute_hosts.yml | 0 .../inventory => inventory}/group_vars/ironic_all.yml | 0 .../group_vars/ironic_compute.yml | 0 .../group_vars/keystone_all.yml | 0 .../group_vars/kvm-compute_hosts.yml | 0 .../group_vars/lxd-compute_hosts.yml | 0 .../inventory => inventory}/group_vars/magnum_all.yml | 0 .../inventory => inventory}/group_vars/memcached.yml | 0 .../group_vars/network_hosts.yml | 0 .../group_vars/neutron_agent.yml | 0 .../inventory => inventory}/group_vars/neutron_all.yml | 0 .../group_vars/neutron_calico_dhcp_agent.yml | 0 .../inventory => inventory}/group_vars/nova_all.yml | 0 .../inventory => inventory}/group_vars/octavia_all.yml | 0 .../group_vars/powervm-compute_hosts.yml | 0 .../group_vars/qemu-compute_hosts.yml | 0 .../group_vars/rabbitmq_all.yml | 0 .../inventory => inventory}/group_vars/repo_all.yml | 0 .../inventory => inventory}/group_vars/rsyslog.yml | 0 .../inventory => inventory}/group_vars/sahara_all.yml | 0 .../inventory => inventory}/group_vars/swift_all.yml | 0 .../inventory => inventory}/group_vars/tacker_all.yml | 0 .../inventory => inventory}/group_vars/trove_all.yml | 0 .../inventory => inventory}/group_vars/utility_all.yml | 0 .../host_vars/localhost/ceilometer.yml | 0 .../host_vars/localhost/cinder.yml | 0 .../host_vars/localhost/neutron.yml | 0 .../host_vars/localhost/nova.yml | 0 .../host_vars/localhost/swift.yml | 0 .../host_vars/localhost/unbound.yml | 0 {playbooks/inventory => inventory}/localhost | 0 scripts/bootstrap-ansible.sh | 2 +- .../playbooks/deploy-config-changes.yml | 4 ++-- tests/test_filesystem.py | 2 +- tests/test_inventory.py | 2 +- tox.ini | 2 +- 105 files changed, 21 insertions(+), 21 deletions(-) rename {playbooks/inventory => inventory}/dynamic_inventory.py (94%) rename {playbooks/inventory => inventory}/env.d/aodh.yml (100%) rename {playbooks/inventory => inventory}/env.d/barbican.yml (100%) rename {playbooks/inventory => inventory}/env.d/ceilometer.yml (100%) rename {playbooks/inventory => inventory}/env.d/ceph.yml (100%) rename {playbooks/inventory => inventory}/env.d/cinder.yml (100%) rename {playbooks/inventory => inventory}/env.d/designate.yml (100%) rename {playbooks/inventory => inventory}/env.d/etcd.yml (100%) rename {playbooks/inventory => inventory}/env.d/galera.yml (100%) rename {playbooks/inventory => inventory}/env.d/glance.yml (100%) rename {playbooks/inventory => inventory}/env.d/gnocchi.yml (100%) rename {playbooks/inventory => inventory}/env.d/haproxy.yml (100%) rename {playbooks/inventory => inventory}/env.d/heat.yml (100%) rename {playbooks/inventory => inventory}/env.d/horizon.yml (100%) rename {playbooks/inventory => inventory}/env.d/ironic.yml (100%) rename {playbooks/inventory => inventory}/env.d/keystone.yml (100%) rename {playbooks/inventory => inventory}/env.d/magnum.yml (100%) rename {playbooks/inventory => inventory}/env.d/memcache.yml (100%) rename {playbooks/inventory => inventory}/env.d/molteniron.yml (100%) rename {playbooks/inventory => inventory}/env.d/neutron.yml (100%) rename {playbooks/inventory => inventory}/env.d/nova.yml (100%) rename {playbooks/inventory => inventory}/env.d/octavia.yml (100%) rename {playbooks/inventory => inventory}/env.d/os-infra.yml (100%) rename {playbooks/inventory => inventory}/env.d/pkg_repo.yml (100%) rename {playbooks/inventory => inventory}/env.d/rabbitmq.yml (100%) rename {playbooks/inventory => inventory}/env.d/rsyslog.yml (100%) rename {playbooks/inventory => inventory}/env.d/sahara.yml (100%) rename {playbooks/inventory => inventory}/env.d/shared-infra.yml (100%) rename {playbooks/inventory => inventory}/env.d/swift-remote.yml (100%) rename {playbooks/inventory => inventory}/env.d/swift.yml (100%) rename {playbooks/inventory => inventory}/env.d/tacker.yml (100%) rename {playbooks/inventory => inventory}/env.d/trove.yml (100%) rename {playbooks/inventory => inventory}/env.d/unbound.yml (100%) rename {playbooks/inventory => inventory}/env.d/utility.yml (100%) rename {playbooks/inventory => inventory}/group_vars/all/all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/all/ceph.yml (100%) rename {playbooks/inventory => inventory}/group_vars/all/cinder.yml (100%) rename {group_vars => inventory/group_vars}/all/designate.yml (100%) rename {playbooks/inventory => inventory}/group_vars/all/glance.yml (100%) rename {playbooks/inventory => inventory}/group_vars/all/infra.yml (100%) rename {playbooks/inventory => inventory}/group_vars/all/keystone.yml (100%) rename {playbooks/inventory => inventory}/group_vars/all/neutron.yml (100%) rename {playbooks/inventory => inventory}/group_vars/all/nova.yml (100%) rename {playbooks/inventory => inventory}/group_vars/all/octavia.yml (100%) rename {playbooks/inventory => inventory}/group_vars/all/pip.yml (100%) rename {playbooks/inventory => inventory}/group_vars/all/ssl.yml (100%) rename {playbooks/inventory => inventory}/group_vars/all_containers.yml (100%) rename {playbooks/inventory => inventory}/group_vars/aodh_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/barbican_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/ceilometer_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/ceph_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/cinder_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/cinder_volume.yml (100%) rename {playbooks/inventory => inventory}/group_vars/designate_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/galera_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/glance_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/gnocchi_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/haproxy_all/haproxy.yml (100%) rename {playbooks/inventory => inventory}/group_vars/haproxy_all/keepalived.yml (100%) rename {playbooks/inventory => inventory}/group_vars/heat_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/horizon_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/hosts.yml (100%) rename {playbooks/inventory => inventory}/group_vars/ironic-compute_hosts.yml (100%) rename {playbooks/inventory => inventory}/group_vars/ironic_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/ironic_compute.yml (100%) rename {playbooks/inventory => inventory}/group_vars/keystone_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/kvm-compute_hosts.yml (100%) rename {playbooks/inventory => inventory}/group_vars/lxd-compute_hosts.yml (100%) rename {playbooks/inventory => inventory}/group_vars/magnum_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/memcached.yml (100%) rename {playbooks/inventory => inventory}/group_vars/network_hosts.yml (100%) rename {playbooks/inventory => inventory}/group_vars/neutron_agent.yml (100%) rename {playbooks/inventory => inventory}/group_vars/neutron_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/neutron_calico_dhcp_agent.yml (100%) rename {playbooks/inventory => inventory}/group_vars/nova_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/octavia_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/powervm-compute_hosts.yml (100%) rename {playbooks/inventory => inventory}/group_vars/qemu-compute_hosts.yml (100%) rename {playbooks/inventory => inventory}/group_vars/rabbitmq_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/repo_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/rsyslog.yml (100%) rename {playbooks/inventory => inventory}/group_vars/sahara_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/swift_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/tacker_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/trove_all.yml (100%) rename {playbooks/inventory => inventory}/group_vars/utility_all.yml (100%) rename {playbooks/inventory => inventory}/host_vars/localhost/ceilometer.yml (100%) rename {playbooks/inventory => inventory}/host_vars/localhost/cinder.yml (100%) rename {playbooks/inventory => inventory}/host_vars/localhost/neutron.yml (100%) rename {playbooks/inventory => inventory}/host_vars/localhost/nova.yml (100%) rename {playbooks/inventory => inventory}/host_vars/localhost/swift.yml (100%) rename {playbooks/inventory => inventory}/host_vars/localhost/unbound.yml (100%) rename {playbooks/inventory => inventory}/localhost (100%) diff --git a/deploy-guide/source/conf.py b/deploy-guide/source/conf.py index e3f0c1332d..cad35b1c42 100644 --- a/deploy-guide/source/conf.py +++ b/deploy-guide/source/conf.py @@ -29,7 +29,7 @@ import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.insert(0, os.path.abspath('../../playbooks/inventory/')) +sys.path.insert(0, os.path.abspath('../../inventory/')) # -- General configuration ------------------------------------------------ diff --git a/doc/source/admin/advanced-config.rst b/doc/source/admin/advanced-config.rst index b6a4f35f86..35ff9417a9 100644 --- a/doc/source/admin/advanced-config.rst +++ b/doc/source/admin/advanced-config.rst @@ -82,7 +82,7 @@ OpenStack-Ansible) are as follows: may reference. ``ANSIBLE_INVENTORY`` This variable should point to - ``openstack-ansible/playbooks/inventory``. With this setting, + ``openstack-ansible/inventory/dynamic_inventory.py``. With this setting, extensions have access to the same dynamic inventory that OpenStack-Ansible uses. @@ -110,7 +110,7 @@ The ``/etc/openstack_deploy/env.d`` directory sources all YAML files into the deployed environment, allowing a deployer to define additional group mappings. This directory is used to extend the environment skeleton, or modify the -defaults defined in the ``playbooks/inventory/env.d`` directory. +defaults defined in the ``inventory/env.d`` directory. See also :deploy_guide:`Understanding Container Groups ` diff --git a/doc/source/admin/maintenance-tasks/scale-environment.rst b/doc/source/admin/maintenance-tasks/scale-environment.rst index 31625a5de2..e8803da202 100644 --- a/doc/source/admin/maintenance-tasks/scale-environment.rst +++ b/doc/source/admin/maintenance-tasks/scale-environment.rst @@ -40,7 +40,7 @@ needed in an environment, it is possible to create additional nodes. .. code:: console - # /opt/openstack-ansible/playbooks/inventory/dynamic_inventory.py > /dev/null + # /opt/openstack-ansible/inventory/dynamic_inventory.py > /dev/null #. Create the ``/root/add_host.limit`` file, which contains all new node host names. Replace ```` with the name of the new host. diff --git a/doc/source/conf.py b/doc/source/conf.py index f4c66427d2..cc15a9b6f9 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -41,7 +41,7 @@ with open(TABLE_FILE, 'a+') as f: # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.insert(0, os.path.abspath('../../playbooks/inventory/')) +sys.path.insert(0, os.path.abspath('../../inventory/')) # -- General configuration ------------------------------------------------ diff --git a/doc/source/contributor/additional-roles.rst b/doc/source/contributor/additional-roles.rst index dba4352981..4804f25110 100644 --- a/doc/source/contributor/additional-roles.rst +++ b/doc/source/contributor/additional-roles.rst @@ -275,7 +275,7 @@ Deploying the role run the ``repo-build.yml`` play later so that wheels for your packages will be included in the repository infrastructure. #. Make any required adjustments to the load balancer configuration - (e.g. modify ``playbooks/inventory/group_vars/all/haproxy.yml`` in the + (e.g. modify ``inventory/group_vars/all/haproxy.yml`` in the OpenStack-Ansible source repository on your deploy host) so that your service can be reached through a load balancer, if appropriate, and be sure to run the ``haproxy-install.yml`` play later so your changes will be @@ -295,7 +295,7 @@ Deploying the role hosts, Ansible skips the playbook's tasks automatically. #. Any variables needed by other roles to connect to the new role, or by the new role to connect to other roles, should be implemented in - ``playbooks/inventory/group_vars``. The group vars are essentially the + ``inventory/group_vars``. The group vars are essentially the glue which playbooks use to ensure that all roles are given the appropriate information. When group vars are implemented it should be a minimum set to achieve the goal of integrating the new role into the diff --git a/doc/source/reference/configure-inventory.rst b/doc/source/reference/configure-inventory.rst index 9d361f2692..168e482933 100644 --- a/doc/source/reference/configure-inventory.rst +++ b/doc/source/reference/configure-inventory.rst @@ -6,7 +6,7 @@ Changing the base environment directory ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The ``--environment/-e`` argument will take the path to a directory containing -an ``env.d`` directory. This defaults to ``playbooks/inventory/`` in the +an ``env.d`` directory. This defaults to ``inventory/`` in the OpenStack-Ansible codebase. Contents of this directory are populated into the environment *before* the diff --git a/doc/source/reference/generate-inventory.rst b/doc/source/reference/generate-inventory.rst index f12b0c1ec0..71eb1931c4 100644 --- a/doc/source/reference/generate-inventory.rst +++ b/doc/source/reference/generate-inventory.rst @@ -3,7 +3,7 @@ Generating the Inventory ======================== The script that creates the inventory is located at -``playbooks/inventory/dynamic_inventory.py``. +``inventory/dynamic_inventory.py``. Executing the dynamic_inventory.py script ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -16,7 +16,7 @@ Run the following command: .. code-block:: bash - # from the playbooks directory + # from the root folder of cloned OpenStack-Ansible repository inventory/dynamic_inventory.py --config /etc/openstack_deploy/ This invocation is useful when testing changes to the dynamic inventory script. @@ -29,7 +29,7 @@ holding configuration from which to create the inventory. If not specified, the default is ``/etc/openstack_deploy/``. In addition to this argument, the base environment skeleton is provided in the -``playbooks/inventory/env.d`` directory of the OpenStack-Ansible codebase. +``inventory/env.d`` directory of the OpenStack-Ansible codebase. Should an ``env.d`` directory be found in the directory specified by ``--config``, its contents will be added to the base environment, overriding @@ -70,13 +70,13 @@ As an example, consider the following excerpt from The ``identity_hosts`` dictionary defines an Ansible inventory group named ``identity_hosts`` containing the three infra hosts. The configuration file -``playbooks/inventory/env.d/keystone.yml`` defines additional Ansible +``inventory/env.d/keystone.yml`` defines additional Ansible inventory groups for the containers that are deployed onto the three hosts named with the prefix *infra*. Note that any services marked with ``is_metal: true`` will run on the allocated physical host and not in a container. For an example of ``is_metal: true`` -being used refer to ``playbooks/inventory/env.d/cinder.yml`` in the +being used refer to ``inventory/env.d/cinder.yml`` in the ``container_skel`` section. Outputs diff --git a/playbooks/inventory/dynamic_inventory.py b/inventory/dynamic_inventory.py similarity index 94% rename from playbooks/inventory/dynamic_inventory.py rename to inventory/dynamic_inventory.py index c5eb545aee..d50940d5df 100755 --- a/playbooks/inventory/dynamic_inventory.py +++ b/inventory/dynamic_inventory.py @@ -23,7 +23,7 @@ try: from osa_toolkit import generate except ImportError: current_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__))) - lib_path = os.path.join(current_path, '..', '..', 'osa_toolkit') + lib_path = os.path.join(current_path, '..') sys.path.append(lib_path) from osa_toolkit import generate @@ -67,7 +67,7 @@ def args(arg_list): '-e', '--environment', help=('Directory that contains the base env.d directory.\n' - 'Defaults to /playbooks/inventory/.'), + 'Defaults to /inventory/.'), required=False, default=os.path.dirname(__file__), ) diff --git a/playbooks/inventory/env.d/aodh.yml b/inventory/env.d/aodh.yml similarity index 100% rename from playbooks/inventory/env.d/aodh.yml rename to inventory/env.d/aodh.yml diff --git a/playbooks/inventory/env.d/barbican.yml b/inventory/env.d/barbican.yml similarity index 100% rename from playbooks/inventory/env.d/barbican.yml rename to inventory/env.d/barbican.yml diff --git a/playbooks/inventory/env.d/ceilometer.yml b/inventory/env.d/ceilometer.yml similarity index 100% rename from playbooks/inventory/env.d/ceilometer.yml rename to inventory/env.d/ceilometer.yml diff --git a/playbooks/inventory/env.d/ceph.yml b/inventory/env.d/ceph.yml similarity index 100% rename from playbooks/inventory/env.d/ceph.yml rename to inventory/env.d/ceph.yml diff --git a/playbooks/inventory/env.d/cinder.yml b/inventory/env.d/cinder.yml similarity index 100% rename from playbooks/inventory/env.d/cinder.yml rename to inventory/env.d/cinder.yml diff --git a/playbooks/inventory/env.d/designate.yml b/inventory/env.d/designate.yml similarity index 100% rename from playbooks/inventory/env.d/designate.yml rename to inventory/env.d/designate.yml diff --git a/playbooks/inventory/env.d/etcd.yml b/inventory/env.d/etcd.yml similarity index 100% rename from playbooks/inventory/env.d/etcd.yml rename to inventory/env.d/etcd.yml diff --git a/playbooks/inventory/env.d/galera.yml b/inventory/env.d/galera.yml similarity index 100% rename from playbooks/inventory/env.d/galera.yml rename to inventory/env.d/galera.yml diff --git a/playbooks/inventory/env.d/glance.yml b/inventory/env.d/glance.yml similarity index 100% rename from playbooks/inventory/env.d/glance.yml rename to inventory/env.d/glance.yml diff --git a/playbooks/inventory/env.d/gnocchi.yml b/inventory/env.d/gnocchi.yml similarity index 100% rename from playbooks/inventory/env.d/gnocchi.yml rename to inventory/env.d/gnocchi.yml diff --git a/playbooks/inventory/env.d/haproxy.yml b/inventory/env.d/haproxy.yml similarity index 100% rename from playbooks/inventory/env.d/haproxy.yml rename to inventory/env.d/haproxy.yml diff --git a/playbooks/inventory/env.d/heat.yml b/inventory/env.d/heat.yml similarity index 100% rename from playbooks/inventory/env.d/heat.yml rename to inventory/env.d/heat.yml diff --git a/playbooks/inventory/env.d/horizon.yml b/inventory/env.d/horizon.yml similarity index 100% rename from playbooks/inventory/env.d/horizon.yml rename to inventory/env.d/horizon.yml diff --git a/playbooks/inventory/env.d/ironic.yml b/inventory/env.d/ironic.yml similarity index 100% rename from playbooks/inventory/env.d/ironic.yml rename to inventory/env.d/ironic.yml diff --git a/playbooks/inventory/env.d/keystone.yml b/inventory/env.d/keystone.yml similarity index 100% rename from playbooks/inventory/env.d/keystone.yml rename to inventory/env.d/keystone.yml diff --git a/playbooks/inventory/env.d/magnum.yml b/inventory/env.d/magnum.yml similarity index 100% rename from playbooks/inventory/env.d/magnum.yml rename to inventory/env.d/magnum.yml diff --git a/playbooks/inventory/env.d/memcache.yml b/inventory/env.d/memcache.yml similarity index 100% rename from playbooks/inventory/env.d/memcache.yml rename to inventory/env.d/memcache.yml diff --git a/playbooks/inventory/env.d/molteniron.yml b/inventory/env.d/molteniron.yml similarity index 100% rename from playbooks/inventory/env.d/molteniron.yml rename to inventory/env.d/molteniron.yml diff --git a/playbooks/inventory/env.d/neutron.yml b/inventory/env.d/neutron.yml similarity index 100% rename from playbooks/inventory/env.d/neutron.yml rename to inventory/env.d/neutron.yml diff --git a/playbooks/inventory/env.d/nova.yml b/inventory/env.d/nova.yml similarity index 100% rename from playbooks/inventory/env.d/nova.yml rename to inventory/env.d/nova.yml diff --git a/playbooks/inventory/env.d/octavia.yml b/inventory/env.d/octavia.yml similarity index 100% rename from playbooks/inventory/env.d/octavia.yml rename to inventory/env.d/octavia.yml diff --git a/playbooks/inventory/env.d/os-infra.yml b/inventory/env.d/os-infra.yml similarity index 100% rename from playbooks/inventory/env.d/os-infra.yml rename to inventory/env.d/os-infra.yml diff --git a/playbooks/inventory/env.d/pkg_repo.yml b/inventory/env.d/pkg_repo.yml similarity index 100% rename from playbooks/inventory/env.d/pkg_repo.yml rename to inventory/env.d/pkg_repo.yml diff --git a/playbooks/inventory/env.d/rabbitmq.yml b/inventory/env.d/rabbitmq.yml similarity index 100% rename from playbooks/inventory/env.d/rabbitmq.yml rename to inventory/env.d/rabbitmq.yml diff --git a/playbooks/inventory/env.d/rsyslog.yml b/inventory/env.d/rsyslog.yml similarity index 100% rename from playbooks/inventory/env.d/rsyslog.yml rename to inventory/env.d/rsyslog.yml diff --git a/playbooks/inventory/env.d/sahara.yml b/inventory/env.d/sahara.yml similarity index 100% rename from playbooks/inventory/env.d/sahara.yml rename to inventory/env.d/sahara.yml diff --git a/playbooks/inventory/env.d/shared-infra.yml b/inventory/env.d/shared-infra.yml similarity index 100% rename from playbooks/inventory/env.d/shared-infra.yml rename to inventory/env.d/shared-infra.yml diff --git a/playbooks/inventory/env.d/swift-remote.yml b/inventory/env.d/swift-remote.yml similarity index 100% rename from playbooks/inventory/env.d/swift-remote.yml rename to inventory/env.d/swift-remote.yml diff --git a/playbooks/inventory/env.d/swift.yml b/inventory/env.d/swift.yml similarity index 100% rename from playbooks/inventory/env.d/swift.yml rename to inventory/env.d/swift.yml diff --git a/playbooks/inventory/env.d/tacker.yml b/inventory/env.d/tacker.yml similarity index 100% rename from playbooks/inventory/env.d/tacker.yml rename to inventory/env.d/tacker.yml diff --git a/playbooks/inventory/env.d/trove.yml b/inventory/env.d/trove.yml similarity index 100% rename from playbooks/inventory/env.d/trove.yml rename to inventory/env.d/trove.yml diff --git a/playbooks/inventory/env.d/unbound.yml b/inventory/env.d/unbound.yml similarity index 100% rename from playbooks/inventory/env.d/unbound.yml rename to inventory/env.d/unbound.yml diff --git a/playbooks/inventory/env.d/utility.yml b/inventory/env.d/utility.yml similarity index 100% rename from playbooks/inventory/env.d/utility.yml rename to inventory/env.d/utility.yml diff --git a/playbooks/inventory/group_vars/all/all.yml b/inventory/group_vars/all/all.yml similarity index 100% rename from playbooks/inventory/group_vars/all/all.yml rename to inventory/group_vars/all/all.yml diff --git a/playbooks/inventory/group_vars/all/ceph.yml b/inventory/group_vars/all/ceph.yml similarity index 100% rename from playbooks/inventory/group_vars/all/ceph.yml rename to inventory/group_vars/all/ceph.yml diff --git a/playbooks/inventory/group_vars/all/cinder.yml b/inventory/group_vars/all/cinder.yml similarity index 100% rename from playbooks/inventory/group_vars/all/cinder.yml rename to inventory/group_vars/all/cinder.yml diff --git a/group_vars/all/designate.yml b/inventory/group_vars/all/designate.yml similarity index 100% rename from group_vars/all/designate.yml rename to inventory/group_vars/all/designate.yml diff --git a/playbooks/inventory/group_vars/all/glance.yml b/inventory/group_vars/all/glance.yml similarity index 100% rename from playbooks/inventory/group_vars/all/glance.yml rename to inventory/group_vars/all/glance.yml diff --git a/playbooks/inventory/group_vars/all/infra.yml b/inventory/group_vars/all/infra.yml similarity index 100% rename from playbooks/inventory/group_vars/all/infra.yml rename to inventory/group_vars/all/infra.yml diff --git a/playbooks/inventory/group_vars/all/keystone.yml b/inventory/group_vars/all/keystone.yml similarity index 100% rename from playbooks/inventory/group_vars/all/keystone.yml rename to inventory/group_vars/all/keystone.yml diff --git a/playbooks/inventory/group_vars/all/neutron.yml b/inventory/group_vars/all/neutron.yml similarity index 100% rename from playbooks/inventory/group_vars/all/neutron.yml rename to inventory/group_vars/all/neutron.yml diff --git a/playbooks/inventory/group_vars/all/nova.yml b/inventory/group_vars/all/nova.yml similarity index 100% rename from playbooks/inventory/group_vars/all/nova.yml rename to inventory/group_vars/all/nova.yml diff --git a/playbooks/inventory/group_vars/all/octavia.yml b/inventory/group_vars/all/octavia.yml similarity index 100% rename from playbooks/inventory/group_vars/all/octavia.yml rename to inventory/group_vars/all/octavia.yml diff --git a/playbooks/inventory/group_vars/all/pip.yml b/inventory/group_vars/all/pip.yml similarity index 100% rename from playbooks/inventory/group_vars/all/pip.yml rename to inventory/group_vars/all/pip.yml diff --git a/playbooks/inventory/group_vars/all/ssl.yml b/inventory/group_vars/all/ssl.yml similarity index 100% rename from playbooks/inventory/group_vars/all/ssl.yml rename to inventory/group_vars/all/ssl.yml diff --git a/playbooks/inventory/group_vars/all_containers.yml b/inventory/group_vars/all_containers.yml similarity index 100% rename from playbooks/inventory/group_vars/all_containers.yml rename to inventory/group_vars/all_containers.yml diff --git a/playbooks/inventory/group_vars/aodh_all.yml b/inventory/group_vars/aodh_all.yml similarity index 100% rename from playbooks/inventory/group_vars/aodh_all.yml rename to inventory/group_vars/aodh_all.yml diff --git a/playbooks/inventory/group_vars/barbican_all.yml b/inventory/group_vars/barbican_all.yml similarity index 100% rename from playbooks/inventory/group_vars/barbican_all.yml rename to inventory/group_vars/barbican_all.yml diff --git a/playbooks/inventory/group_vars/ceilometer_all.yml b/inventory/group_vars/ceilometer_all.yml similarity index 100% rename from playbooks/inventory/group_vars/ceilometer_all.yml rename to inventory/group_vars/ceilometer_all.yml diff --git a/playbooks/inventory/group_vars/ceph_all.yml b/inventory/group_vars/ceph_all.yml similarity index 100% rename from playbooks/inventory/group_vars/ceph_all.yml rename to inventory/group_vars/ceph_all.yml diff --git a/playbooks/inventory/group_vars/cinder_all.yml b/inventory/group_vars/cinder_all.yml similarity index 100% rename from playbooks/inventory/group_vars/cinder_all.yml rename to inventory/group_vars/cinder_all.yml diff --git a/playbooks/inventory/group_vars/cinder_volume.yml b/inventory/group_vars/cinder_volume.yml similarity index 100% rename from playbooks/inventory/group_vars/cinder_volume.yml rename to inventory/group_vars/cinder_volume.yml diff --git a/playbooks/inventory/group_vars/designate_all.yml b/inventory/group_vars/designate_all.yml similarity index 100% rename from playbooks/inventory/group_vars/designate_all.yml rename to inventory/group_vars/designate_all.yml diff --git a/playbooks/inventory/group_vars/galera_all.yml b/inventory/group_vars/galera_all.yml similarity index 100% rename from playbooks/inventory/group_vars/galera_all.yml rename to inventory/group_vars/galera_all.yml diff --git a/playbooks/inventory/group_vars/glance_all.yml b/inventory/group_vars/glance_all.yml similarity index 100% rename from playbooks/inventory/group_vars/glance_all.yml rename to inventory/group_vars/glance_all.yml diff --git a/playbooks/inventory/group_vars/gnocchi_all.yml b/inventory/group_vars/gnocchi_all.yml similarity index 100% rename from playbooks/inventory/group_vars/gnocchi_all.yml rename to inventory/group_vars/gnocchi_all.yml diff --git a/playbooks/inventory/group_vars/haproxy_all/haproxy.yml b/inventory/group_vars/haproxy_all/haproxy.yml similarity index 100% rename from playbooks/inventory/group_vars/haproxy_all/haproxy.yml rename to inventory/group_vars/haproxy_all/haproxy.yml diff --git a/playbooks/inventory/group_vars/haproxy_all/keepalived.yml b/inventory/group_vars/haproxy_all/keepalived.yml similarity index 100% rename from playbooks/inventory/group_vars/haproxy_all/keepalived.yml rename to inventory/group_vars/haproxy_all/keepalived.yml diff --git a/playbooks/inventory/group_vars/heat_all.yml b/inventory/group_vars/heat_all.yml similarity index 100% rename from playbooks/inventory/group_vars/heat_all.yml rename to inventory/group_vars/heat_all.yml diff --git a/playbooks/inventory/group_vars/horizon_all.yml b/inventory/group_vars/horizon_all.yml similarity index 100% rename from playbooks/inventory/group_vars/horizon_all.yml rename to inventory/group_vars/horizon_all.yml diff --git a/playbooks/inventory/group_vars/hosts.yml b/inventory/group_vars/hosts.yml similarity index 100% rename from playbooks/inventory/group_vars/hosts.yml rename to inventory/group_vars/hosts.yml diff --git a/playbooks/inventory/group_vars/ironic-compute_hosts.yml b/inventory/group_vars/ironic-compute_hosts.yml similarity index 100% rename from playbooks/inventory/group_vars/ironic-compute_hosts.yml rename to inventory/group_vars/ironic-compute_hosts.yml diff --git a/playbooks/inventory/group_vars/ironic_all.yml b/inventory/group_vars/ironic_all.yml similarity index 100% rename from playbooks/inventory/group_vars/ironic_all.yml rename to inventory/group_vars/ironic_all.yml diff --git a/playbooks/inventory/group_vars/ironic_compute.yml b/inventory/group_vars/ironic_compute.yml similarity index 100% rename from playbooks/inventory/group_vars/ironic_compute.yml rename to inventory/group_vars/ironic_compute.yml diff --git a/playbooks/inventory/group_vars/keystone_all.yml b/inventory/group_vars/keystone_all.yml similarity index 100% rename from playbooks/inventory/group_vars/keystone_all.yml rename to inventory/group_vars/keystone_all.yml diff --git a/playbooks/inventory/group_vars/kvm-compute_hosts.yml b/inventory/group_vars/kvm-compute_hosts.yml similarity index 100% rename from playbooks/inventory/group_vars/kvm-compute_hosts.yml rename to inventory/group_vars/kvm-compute_hosts.yml diff --git a/playbooks/inventory/group_vars/lxd-compute_hosts.yml b/inventory/group_vars/lxd-compute_hosts.yml similarity index 100% rename from playbooks/inventory/group_vars/lxd-compute_hosts.yml rename to inventory/group_vars/lxd-compute_hosts.yml diff --git a/playbooks/inventory/group_vars/magnum_all.yml b/inventory/group_vars/magnum_all.yml similarity index 100% rename from playbooks/inventory/group_vars/magnum_all.yml rename to inventory/group_vars/magnum_all.yml diff --git a/playbooks/inventory/group_vars/memcached.yml b/inventory/group_vars/memcached.yml similarity index 100% rename from playbooks/inventory/group_vars/memcached.yml rename to inventory/group_vars/memcached.yml diff --git a/playbooks/inventory/group_vars/network_hosts.yml b/inventory/group_vars/network_hosts.yml similarity index 100% rename from playbooks/inventory/group_vars/network_hosts.yml rename to inventory/group_vars/network_hosts.yml diff --git a/playbooks/inventory/group_vars/neutron_agent.yml b/inventory/group_vars/neutron_agent.yml similarity index 100% rename from playbooks/inventory/group_vars/neutron_agent.yml rename to inventory/group_vars/neutron_agent.yml diff --git a/playbooks/inventory/group_vars/neutron_all.yml b/inventory/group_vars/neutron_all.yml similarity index 100% rename from playbooks/inventory/group_vars/neutron_all.yml rename to inventory/group_vars/neutron_all.yml diff --git a/playbooks/inventory/group_vars/neutron_calico_dhcp_agent.yml b/inventory/group_vars/neutron_calico_dhcp_agent.yml similarity index 100% rename from playbooks/inventory/group_vars/neutron_calico_dhcp_agent.yml rename to inventory/group_vars/neutron_calico_dhcp_agent.yml diff --git a/playbooks/inventory/group_vars/nova_all.yml b/inventory/group_vars/nova_all.yml similarity index 100% rename from playbooks/inventory/group_vars/nova_all.yml rename to inventory/group_vars/nova_all.yml diff --git a/playbooks/inventory/group_vars/octavia_all.yml b/inventory/group_vars/octavia_all.yml similarity index 100% rename from playbooks/inventory/group_vars/octavia_all.yml rename to inventory/group_vars/octavia_all.yml diff --git a/playbooks/inventory/group_vars/powervm-compute_hosts.yml b/inventory/group_vars/powervm-compute_hosts.yml similarity index 100% rename from playbooks/inventory/group_vars/powervm-compute_hosts.yml rename to inventory/group_vars/powervm-compute_hosts.yml diff --git a/playbooks/inventory/group_vars/qemu-compute_hosts.yml b/inventory/group_vars/qemu-compute_hosts.yml similarity index 100% rename from playbooks/inventory/group_vars/qemu-compute_hosts.yml rename to inventory/group_vars/qemu-compute_hosts.yml diff --git a/playbooks/inventory/group_vars/rabbitmq_all.yml b/inventory/group_vars/rabbitmq_all.yml similarity index 100% rename from playbooks/inventory/group_vars/rabbitmq_all.yml rename to inventory/group_vars/rabbitmq_all.yml diff --git a/playbooks/inventory/group_vars/repo_all.yml b/inventory/group_vars/repo_all.yml similarity index 100% rename from playbooks/inventory/group_vars/repo_all.yml rename to inventory/group_vars/repo_all.yml diff --git a/playbooks/inventory/group_vars/rsyslog.yml b/inventory/group_vars/rsyslog.yml similarity index 100% rename from playbooks/inventory/group_vars/rsyslog.yml rename to inventory/group_vars/rsyslog.yml diff --git a/playbooks/inventory/group_vars/sahara_all.yml b/inventory/group_vars/sahara_all.yml similarity index 100% rename from playbooks/inventory/group_vars/sahara_all.yml rename to inventory/group_vars/sahara_all.yml diff --git a/playbooks/inventory/group_vars/swift_all.yml b/inventory/group_vars/swift_all.yml similarity index 100% rename from playbooks/inventory/group_vars/swift_all.yml rename to inventory/group_vars/swift_all.yml diff --git a/playbooks/inventory/group_vars/tacker_all.yml b/inventory/group_vars/tacker_all.yml similarity index 100% rename from playbooks/inventory/group_vars/tacker_all.yml rename to inventory/group_vars/tacker_all.yml diff --git a/playbooks/inventory/group_vars/trove_all.yml b/inventory/group_vars/trove_all.yml similarity index 100% rename from playbooks/inventory/group_vars/trove_all.yml rename to inventory/group_vars/trove_all.yml diff --git a/playbooks/inventory/group_vars/utility_all.yml b/inventory/group_vars/utility_all.yml similarity index 100% rename from playbooks/inventory/group_vars/utility_all.yml rename to inventory/group_vars/utility_all.yml diff --git a/playbooks/inventory/host_vars/localhost/ceilometer.yml b/inventory/host_vars/localhost/ceilometer.yml similarity index 100% rename from playbooks/inventory/host_vars/localhost/ceilometer.yml rename to inventory/host_vars/localhost/ceilometer.yml diff --git a/playbooks/inventory/host_vars/localhost/cinder.yml b/inventory/host_vars/localhost/cinder.yml similarity index 100% rename from playbooks/inventory/host_vars/localhost/cinder.yml rename to inventory/host_vars/localhost/cinder.yml diff --git a/playbooks/inventory/host_vars/localhost/neutron.yml b/inventory/host_vars/localhost/neutron.yml similarity index 100% rename from playbooks/inventory/host_vars/localhost/neutron.yml rename to inventory/host_vars/localhost/neutron.yml diff --git a/playbooks/inventory/host_vars/localhost/nova.yml b/inventory/host_vars/localhost/nova.yml similarity index 100% rename from playbooks/inventory/host_vars/localhost/nova.yml rename to inventory/host_vars/localhost/nova.yml diff --git a/playbooks/inventory/host_vars/localhost/swift.yml b/inventory/host_vars/localhost/swift.yml similarity index 100% rename from playbooks/inventory/host_vars/localhost/swift.yml rename to inventory/host_vars/localhost/swift.yml diff --git a/playbooks/inventory/host_vars/localhost/unbound.yml b/inventory/host_vars/localhost/unbound.yml similarity index 100% rename from playbooks/inventory/host_vars/localhost/unbound.yml rename to inventory/host_vars/localhost/unbound.yml diff --git a/playbooks/inventory/localhost b/inventory/localhost similarity index 100% rename from playbooks/inventory/localhost rename to inventory/localhost diff --git a/scripts/bootstrap-ansible.sh b/scripts/bootstrap-ansible.sh index 2ede0d2f58..a387748196 100755 --- a/scripts/bootstrap-ansible.sh +++ b/scripts/bootstrap-ansible.sh @@ -47,7 +47,7 @@ export OSA_CLONE_DIR="$(pwd)" # Set the variable to the role file to be the absolute path ANSIBLE_ROLE_FILE="$(readlink -f "${ANSIBLE_ROLE_FILE}")" -OSA_INVENTORY_PATH="$(readlink -f playbooks/inventory)" +OSA_INVENTORY_PATH="$(readlink -f inventory)" OSA_PLAYBOOK_PATH="$(readlink -f playbooks)" # Create the ssh dir if needed diff --git a/scripts/upgrade-utilities/playbooks/deploy-config-changes.yml b/scripts/upgrade-utilities/playbooks/deploy-config-changes.yml index ed85d8ccec..39499cd79b 100644 --- a/scripts/upgrade-utilities/playbooks/deploy-config-changes.yml +++ b/scripts/upgrade-utilities/playbooks/deploy-config-changes.yml @@ -38,13 +38,13 @@ - block: - name: Retrieve differences - shell: rsync -avun "{{ repo_root_dir }}/playbooks/inventory/env.d/" "/etc/openstack_deploy/env.d/" | grep "yml$" + shell: rsync -avun "{{ repo_root_dir }}/inventory/env.d/" "/etc/openstack_deploy/env.d/" | grep "yml$" failed_when: false register: diff_result - name: Copy new env.d files into place copy: - src: "{{ repo_root_dir }}/playbooks/inventory/env.d/{{ item }}" + src: "{{ repo_root_dir }}/inventory/env.d/{{ item }}" dest: "/etc/openstack_deploy/env.d/{{ item }}" force: no with_items: diff --git a/tests/test_filesystem.py b/tests/test_filesystem.py index 71e3cea429..4ede28a946 100644 --- a/tests/test_filesystem.py +++ b/tests/test_filesystem.py @@ -23,7 +23,7 @@ from test_inventory import cleanup from test_inventory import get_inventory from test_inventory import make_config -INV_DIR = 'playbooks/inventory' +INV_DIR = 'inventory' sys.path.append(path.join(os.getcwd(), INV_DIR)) diff --git a/tests/test_inventory.py b/tests/test_inventory.py index e6021883c9..d6229914c2 100644 --- a/tests/test_inventory.py +++ b/tests/test_inventory.py @@ -25,7 +25,7 @@ import unittest import warnings import yaml -INV_DIR = 'playbooks/inventory' +INV_DIR = 'inventory' sys.path.append(path.join(os.getcwd(), INV_DIR)) diff --git a/tox.ini b/tox.ini index e144bcb204..857364041d 100644 --- a/tox.ini +++ b/tox.ini @@ -135,7 +135,7 @@ commands = coverage run -a {toxinidir}/tests/test_dictutils.py coverage run -a {toxinidir}/tests/test_ip.py coverage run -a {toxinidir}/tests/test_filesystem.py - coverage report --show-missing --include={toxinidir}/playbooks/inventory/*,{toxinidir}/osa_toolkit/* + coverage report --show-missing --include={toxinidir}/inventory/*,{toxinidir}/osa_toolkit/*