From 662181646f53ae22eb21fe9db74ec7e93614e70a Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Fri, 22 Feb 2019 01:06:38 +0000 Subject: [PATCH] Convert include to either import_playbook or include_tasks This change resolves the deprecation warnings for the use of "include" which has been removed upstream. Playbooks will now use "import_playbook" and tasks will now use "include_tasks". While this change attempts to resolve all of the include issues several playbooks will need to be refactored to resolve the use of include with variables as this is not a pattern that is supported by mainline ansible. Change-Id: I8fdb2f9f75f38986ba1dc9f93e274749c49e5c67 Signed-off-by: Kevin Carter --- playbooks/common-playbooks/cinder.yml | 17 ++++----- playbooks/common-playbooks/glance.yml | 15 ++++---- playbooks/common-playbooks/neutron.yml | 14 ++++---- playbooks/common-playbooks/nova.yml | 14 ++++---- playbooks/containers-deploy.yml | 8 ++--- playbooks/containers-lxc-create.yml | 4 +-- playbooks/containers-lxc-host.yml | 2 +- playbooks/containers-nspawn-create.yml | 4 +-- playbooks/etcd-install.yml | 6 ++-- playbooks/galera-install.yml | 10 ++---- playbooks/haproxy-install.yml | 8 ++--- playbooks/memcached-install.yml | 8 ++--- playbooks/openstack-hosts-setup.yml | 4 +-- playbooks/os-aodh-install.yml | 8 ++--- playbooks/os-barbican-install.yml | 8 ++--- playbooks/os-ceilometer-install.yml | 8 ++--- playbooks/os-congress-install.yml | 10 +++--- playbooks/os-designate-install.yml | 8 ++--- playbooks/os-gnocchi-install.yml | 11 +++--- playbooks/os-heat-install.yml | 8 ++--- playbooks/os-horizon-install.yml | 8 ++--- playbooks/os-ironic-install.yml | 6 ++-- playbooks/os-keystone-install.yml | 12 +++---- playbooks/os-magnum-install.yml | 8 ++--- playbooks/os-octavia-install.yml | 8 ++--- playbooks/os-rally-install.yml | 3 +- playbooks/os-sahara-install.yml | 8 ++--- playbooks/os-swift-install.yml | 8 ++--- playbooks/os-tacker-install.yml | 5 ++- playbooks/os-trove-install.yml | 8 ++--- playbooks/rabbitmq-install.yml | 6 ++-- playbooks/repo-build.yml | 2 +- playbooks/repo-install.yml | 4 +-- playbooks/repo-server.yml | 8 ++--- playbooks/repo-use.yml | 4 +-- playbooks/rsyslog-install.yml | 6 ++-- playbooks/setup-everything.yml | 6 ++-- playbooks/setup-hosts.yml | 6 ++-- playbooks/setup-infrastructure.yml | 24 ++++++------- playbooks/setup-openstack.yml | 48 +++++++++++++------------- playbooks/unbound-install.yml | 8 ++--- playbooks/utility-install.yml | 8 ++--- 42 files changed, 158 insertions(+), 221 deletions(-) diff --git a/playbooks/common-playbooks/cinder.yml b/playbooks/common-playbooks/cinder.yml index 67e6b0d40f..f21cd5681a 100644 --- a/playbooks/common-playbooks/cinder.yml +++ b/playbooks/common-playbooks/cinder.yml @@ -29,7 +29,7 @@ # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - - include: ../common-tasks/haproxy-endpoint-manage.yml + - include_tasks: ../common-tasks/haproxy-endpoint-manage.yml vars: haproxy_backend: cinder_api-back haproxy_state: disabled @@ -38,13 +38,12 @@ - "groups['cinder_api'] | length > 1" - name: Determine storage bridge IP address - include: ../common-tasks/dynamic-address-fact.yml + include_tasks: ../common-tasks/dynamic-address-fact.yml vars: network_address: "storage_address" - name: Configure container (cinder-volume) when lvm is in-use - include: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + include_tasks: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" vars: extra_container_config: - "lxc.autodev=0" @@ -58,21 +57,19 @@ - "cinder_backend_lvm_inuse | bool" - name: Configure container (other services) - include: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + include_tasks: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: - "not is_metal" - "not ( 'cinder_volume' in group_names and cinder_backend_lvm_inuse | bool )" - name: Configure log directories (on metal) - include: ../common-tasks/os-log-dir-setup.yml + include_tasks: ../common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-cinder" dest: "/var/log/cinder" - - include: ../common-tasks/unbound-clients.yml - static: no + - include_tasks: ../common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -117,7 +114,7 @@ # Now that container changes are done, we can set # the load balancer back end for this container # to available again. - - include: ../common-tasks/haproxy-endpoint-manage.yml + - include_tasks: ../common-tasks/haproxy-endpoint-manage.yml vars: haproxy_backend: cinder_api-back haproxy_state: enabled diff --git a/playbooks/common-playbooks/glance.yml b/playbooks/common-playbooks/glance.yml index 3cd62aa0fe..c483c02c84 100644 --- a/playbooks/common-playbooks/glance.yml +++ b/playbooks/common-playbooks/glance.yml @@ -28,7 +28,7 @@ # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - - include: ../common-tasks/haproxy-endpoint-manage.yml + - include_tasks: ../common-tasks/haproxy-endpoint-manage.yml vars: haproxy_backend: glance_api-back haproxy_state: disabled @@ -37,31 +37,28 @@ - "groups['glance_api'] | length > 1" - name: Configure container (non-nfs) - include: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_tasks: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" vars: list_of_bind_mounts: "{{ glance_container_bind_mounts }}" - static: no when: - not is_metal - glance_default_store == "file" - (glance_nfs_client is not defined) or (glance_nfs_client | length == 0) - name: Configure container (nfs) - include: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + include_tasks: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: - not is_metal - (glance_default_store != "file") or (glance_nfs_client is defined) - name: Configure log directories (on metal) - include: ../common-tasks/os-log-dir-setup.yml + include_tasks: ../common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-glance" dest: "/var/log/glance" - - include: ../common-tasks/unbound-clients.yml - static: no + - include_tasks: ../common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -81,7 +78,7 @@ # Now that container changes are done, we can set # the load balancer back end for this container # to available again. - - include: ../common-tasks/haproxy-endpoint-manage.yml + - include_tasks: ../common-tasks/haproxy-endpoint-manage.yml vars: haproxy_backend: glance_api-back haproxy_state: enabled diff --git a/playbooks/common-playbooks/neutron.yml b/playbooks/common-playbooks/neutron.yml index 31cc23c86a..d253612676 100644 --- a/playbooks/common-playbooks/neutron.yml +++ b/playbooks/common-playbooks/neutron.yml @@ -26,12 +26,12 @@ pre_tasks: - name: Determine tunnel bridge IP address - include: ../common-tasks/dynamic-address-fact.yml + include_tasks: ../common-tasks/dynamic-address-fact.yml vars: network_address: "tunnel_address" - name: Configure container (neutron-agent) - include: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_tasks: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" vars: list_of_bind_mounts: - bind_dir_path: "{{ (ansible_pkg_mgr == 'apt') | ternary('/lib/modules', '/usr/lib/modules') }}" @@ -40,26 +40,25 @@ - "lxc.cgroup.devices.allow=a *:* rmw" extra_container_config_no_restart: - "lxc.start.order=29" - static: no when: - "not is_metal" - "'neutron_agent' in group_names" - name: Configure container (other services) - include: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_tasks: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: - "not is_metal" - "'neutron_agent' not in group_names" - name: Configure log directories (on metal) - include: ../common-tasks/os-log-dir-setup.yml + include_tasks: ../common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-neutron" dest: "/var/log/neutron" - name: Configure log directories (on metal) (calico) - include: ../common-tasks/os-log-dir-setup.yml + include_tasks: ../common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-calico" @@ -67,8 +66,7 @@ when: - "'neutron_calico_dhcp_agent' in group_names" - - include: ../common-tasks/unbound-clients.yml - static: no + - include_tasks: ../common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool diff --git a/playbooks/common-playbooks/nova.yml b/playbooks/common-playbooks/nova.yml index 94074407d7..0e7d88c3f0 100644 --- a/playbooks/common-playbooks/nova.yml +++ b/playbooks/common-playbooks/nova.yml @@ -44,7 +44,7 @@ # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - - include: ../common-tasks/haproxy-endpoint-manage.yml + - include_tasks: ../common-tasks/haproxy-endpoint-manage.yml vars: haproxy_backend: "{{ backend_name }}-back" haproxy_state: disabled @@ -60,27 +60,25 @@ - "nova_console" - name: Determine management bridge IP address - include: ../common-tasks/dynamic-address-fact.yml + include_tasks: ../common-tasks/dynamic-address-fact.yml vars: network_address: "management_address" - name: Configure container - include: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + include_tasks: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal vars: extra_container_config_no_restart: - "lxc.start.order=39" - name: Configure log directories (on metal) - include: ../common-tasks/os-log-dir-setup.yml + include_tasks: ../common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-nova" dest: "/var/log/nova" - - include: ../common-tasks/unbound-clients.yml - static: no + - include_tasks: ../common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -175,7 +173,7 @@ # Now that container changes are done, we can set # the load balancer back end for this container # to available again. - - include: ../common-tasks/haproxy-endpoint-manage.yml + - include_tasks: ../common-tasks/haproxy-endpoint-manage.yml vars: haproxy_backend: "{{ backend_name }}-back" haproxy_state: enabled diff --git a/playbooks/containers-deploy.yml b/playbooks/containers-deploy.yml index 5adaecf6cf..c41180b3de 100644 --- a/playbooks/containers-deploy.yml +++ b/playbooks/containers-deploy.yml @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include: "containers-lxc-host.yml" -- include: "containers-lxc-create.yml" -- include: "containers-nspawn-host.yml" -- include: "containers-nspawn-create.yml" +- import_playbook: "containers-lxc-host.yml" +- import_playbook: "containers-lxc-create.yml" +- import_playbook: "containers-nspawn-host.yml" +- import_playbook: "containers-nspawn-create.yml" diff --git a/playbooks/containers-lxc-create.yml b/playbooks/containers-lxc-create.yml index 942abaeccf..fedff37a24 100644 --- a/playbooks/containers-lxc-create.yml +++ b/playbooks/containers-lxc-create.yml @@ -71,9 +71,9 @@ tags: - lxc-containers-create pre_tasks: - - include: common-tasks/package-cache-proxy.yml + - include_tasks: common-tasks/package-cache-proxy.yml when: install_method == "source" - - include: common-tasks/set-pip-vars.yml + - include_tasks: common-tasks/set-pip-vars.yml when: install_method == "source" roles: - role: "openstack_hosts" diff --git a/playbooks/containers-lxc-host.yml b/playbooks/containers-lxc-host.yml index 9e207d8a02..24d2b8ef61 100644 --- a/playbooks/containers-lxc-host.yml +++ b/playbooks/containers-lxc-host.yml @@ -24,7 +24,7 @@ tags: - lxc-hosts pre_tasks: - - include: common-tasks/set-pip-vars.yml + - include_tasks: common-tasks/set-pip-vars.yml when: install_method == "source" - name: Check the state of the default LXC service log directory stat: diff --git a/playbooks/containers-nspawn-create.yml b/playbooks/containers-nspawn-create.yml index ccc9288e16..1f886d41a4 100644 --- a/playbooks/containers-nspawn-create.yml +++ b/playbooks/containers-nspawn-create.yml @@ -108,10 +108,10 @@ setup: gather_subset: "network,hardware,virtual" - - include: common-tasks/package-cache-proxy.yml + - include_tasks: common-tasks/package-cache-proxy.yml when: install_method == "source" - - include: common-tasks/set-pip-vars.yml + - include_tasks: common-tasks/set-pip-vars.yml when: install_method == "source" roles: - role: "openstack_hosts" diff --git a/playbooks/etcd-install.yml b/playbooks/etcd-install.yml index 772eaf5428..e5bcb2ec0d 100644 --- a/playbooks/etcd-install.yml +++ b/playbooks/etcd-install.yml @@ -18,11 +18,9 @@ gather_facts: "{{ osa_gather_facts | default(True) }}" user: root pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: diff --git a/playbooks/galera-install.yml b/playbooks/galera-install.yml index 0452fa77a0..9f03f83d2c 100644 --- a/playbooks/galera-install.yml +++ b/playbooks/galera-install.yml @@ -19,20 +19,18 @@ serial: 1 user: root tasks: - - include: common-tasks/os-log-dir-setup.yml + - include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-mysql_logs" dest: "/var/log/mysql_logs" - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal vars: list_of_bind_mounts: "{{ galera_container_bind_mounts }}" extra_container_config_no_restart: - "lxc.start.order=10" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool environment: "{{ deployment_environment_variables | default({}) }}" @@ -47,12 +45,10 @@ roles: - role: haproxy_endpoints haproxy_state: disabled - static: no when: "groups['haproxy'] | default([]) | length > 0" - role: "galera_server" - role: haproxy_endpoints haproxy_state: enabled - static: no when: "groups['haproxy'] | default([]) | length > 0" - role: "system_crontab_coordination" tags: diff --git a/playbooks/haproxy-install.yml b/playbooks/haproxy-install.yml index 11a6873deb..4871bfd976 100644 --- a/playbooks/haproxy-install.yml +++ b/playbooks/haproxy-install.yml @@ -19,16 +19,14 @@ serial: "50%" user: root pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include: common-tasks/os-log-dir-setup.yml + - include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-haproxy" dest: "/var/log/haproxy" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool - name: Remove legacy haproxy configuration files diff --git a/playbooks/memcached-install.yml b/playbooks/memcached-install.yml index 2f0a98ca80..c34994a326 100644 --- a/playbooks/memcached-install.yml +++ b/playbooks/memcached-install.yml @@ -18,16 +18,14 @@ gather_facts: "{{ osa_gather_facts | default(True) }}" user: root pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include: common-tasks/os-log-dir-setup.yml + - include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-memcached" dest: "/var/log/memcached" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: diff --git a/playbooks/openstack-hosts-setup.yml b/playbooks/openstack-hosts-setup.yml index d4aa3bf7a1..0814908e6c 100644 --- a/playbooks/openstack-hosts-setup.yml +++ b/playbooks/openstack-hosts-setup.yml @@ -50,9 +50,9 @@ (ansible_os_family == 'Suse' and ansible_distribution_major_version in ['15', '42']) msg: "The only supported platforms for this release are Ubuntu 16.04 LTS (Xenial), Ubuntu 18.04 LTS (Bionic), CentOS 7 (WIP) and openSUSE Leap 42.X and openSUSE Leap 15.X" - - include: common-tasks/package-cache-proxy.yml + - include_tasks: common-tasks/package-cache-proxy.yml when: install_method == "source" - - include: common-tasks/set-pip-vars.yml + - include_tasks: common-tasks/set-pip-vars.yml when: install_method == "source" roles: - role: "openstack_hosts" diff --git a/playbooks/os-aodh-install.yml b/playbooks/os-aodh-install.yml index c8f1e81c4a..9c8b46240f 100644 --- a/playbooks/os-aodh-install.yml +++ b/playbooks/os-aodh-install.yml @@ -23,18 +23,16 @@ tags: - aodh pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include: common-tasks/os-log-dir-setup.yml + - include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-aodh" dest: "/var/log/aodh" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool diff --git a/playbooks/os-barbican-install.yml b/playbooks/os-barbican-install.yml index 5888f39769..efdfc643a1 100644 --- a/playbooks/os-barbican-install.yml +++ b/playbooks/os-barbican-install.yml @@ -23,18 +23,16 @@ tags: - barbican pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include: common-tasks/os-log-dir-setup.yml + - include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-barbican" dest: "/var/log/barbican" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: diff --git a/playbooks/os-ceilometer-install.yml b/playbooks/os-ceilometer-install.yml index a39f6dba61..86c5bc51e6 100644 --- a/playbooks/os-ceilometer-install.yml +++ b/playbooks/os-ceilometer-install.yml @@ -20,17 +20,15 @@ vars_files: - "defaults/{{ install_method }}_install.yml" pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include: common-tasks/os-log-dir-setup.yml + - include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-ceilometer" dest: "/var/log/ceilometer" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: diff --git a/playbooks/os-congress-install.yml b/playbooks/os-congress-install.yml index c310f697e2..f7603184f7 100644 --- a/playbooks/os-congress-install.yml +++ b/playbooks/os-congress-install.yml @@ -24,24 +24,22 @@ tags: - congress pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - name: Configure log directories (on metal) - include: common-tasks/os-log-dir-setup.yml + include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-congress" dest: "/var/log/congress" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool - name: Configure package proxy cache - include: common-tasks/package-cache-proxy.yml + include_tasks: common-tasks/package-cache-proxy.yml when: install_method == "source" roles: diff --git a/playbooks/os-designate-install.yml b/playbooks/os-designate-install.yml index e6e0b90aef..13e34517a9 100644 --- a/playbooks/os-designate-install.yml +++ b/playbooks/os-designate-install.yml @@ -26,18 +26,16 @@ tags: - designate pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include: common-tasks/os-log-dir-setup.yml + - include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-designate" dest: "/var/log/designate" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: diff --git a/playbooks/os-gnocchi-install.yml b/playbooks/os-gnocchi-install.yml index 259240d304..6c57a307dd 100644 --- a/playbooks/os-gnocchi-install.yml +++ b/playbooks/os-gnocchi-install.yml @@ -22,29 +22,26 @@ tags: - gnocchi pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" vars: list_of_bind_mounts: "{{ gnocchi_container_bind_mounts }}" - static: no when: - (gnocchi_storage_driver == "file") or (gnocchi_storage_driver is not defined) - not is_metal - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: - not is_metal - gnocchi_storage_driver is defined - gnocchi_storage_driver != "file" - - include: common-tasks/os-log-dir-setup.yml + - include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-gnocchi" dest: "/var/log/gnocchi" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: diff --git a/playbooks/os-heat-install.yml b/playbooks/os-heat-install.yml index bc4e22c1e2..00b8323199 100644 --- a/playbooks/os-heat-install.yml +++ b/playbooks/os-heat-install.yml @@ -24,18 +24,16 @@ - defaults/repo_packages/openstack_services.yml - "defaults/{{ install_method }}_install.yml" pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include: common-tasks/os-log-dir-setup.yml + - include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-heat" dest: "/var/log/heat" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: diff --git a/playbooks/os-horizon-install.yml b/playbooks/os-horizon-install.yml index 68e760aff6..0baf360274 100644 --- a/playbooks/os-horizon-install.yml +++ b/playbooks/os-horizon-install.yml @@ -23,17 +23,15 @@ tags: - horizon pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include: common-tasks/os-log-dir-setup.yml + - include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-horizon" dest: "/var/log/horizon" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: diff --git a/playbooks/os-ironic-install.yml b/playbooks/os-ironic-install.yml index 378000d065..a1810298bf 100644 --- a/playbooks/os-ironic-install.yml +++ b/playbooks/os-ironic-install.yml @@ -23,12 +23,10 @@ tags: - ironic pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: diff --git a/playbooks/os-keystone-install.yml b/playbooks/os-keystone-install.yml index fa55373be5..486c106ac5 100644 --- a/playbooks/os-keystone-install.yml +++ b/playbooks/os-keystone-install.yml @@ -46,29 +46,27 @@ # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - - include: common-tasks/haproxy-endpoint-manage.yml + - include_tasks: common-tasks/haproxy-endpoint-manage.yml vars: haproxy_backend: "keystone_service-back" haproxy_state: disabled when: "groups['keystone_all'] | length > 1" - name: Configure container - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" vars: extra_container_config_no_restart: - "lxc.start.order=19" - static: no when: not is_metal - name: Configure log directories (on metal) - include: common-tasks/os-log-dir-setup.yml + include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-keystone" dest: "/var/log/keystone" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool @@ -88,7 +86,7 @@ # Now that container changes are done, we can set # the load balancer back end for this container # to available again. - - include: common-tasks/haproxy-endpoint-manage.yml + - include_tasks: common-tasks/haproxy-endpoint-manage.yml vars: haproxy_backend: "keystone_service-back" haproxy_state: enabled diff --git a/playbooks/os-magnum-install.yml b/playbooks/os-magnum-install.yml index 05ea9e9932..86141ee48c 100644 --- a/playbooks/os-magnum-install.yml +++ b/playbooks/os-magnum-install.yml @@ -25,18 +25,16 @@ tags: - magnum pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include: common-tasks/os-log-dir-setup.yml + - include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-magnum" dest: "/var/log/magnum" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool diff --git a/playbooks/os-octavia-install.yml b/playbooks/os-octavia-install.yml index 8b5aa8406f..2935df9c65 100644 --- a/playbooks/os-octavia-install.yml +++ b/playbooks/os-octavia-install.yml @@ -23,18 +23,16 @@ tags: - octavia pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include: common-tasks/os-log-dir-setup.yml + - include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-octavia" dest: "/var/log/octavia" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: diff --git a/playbooks/os-rally-install.yml b/playbooks/os-rally-install.yml index ddcbb74e86..86092a9b9a 100644 --- a/playbooks/os-rally-install.yml +++ b/playbooks/os-rally-install.yml @@ -23,8 +23,7 @@ tags: - rally pre_tasks: - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: diff --git a/playbooks/os-sahara-install.yml b/playbooks/os-sahara-install.yml index 8c59278537..602be7ce92 100644 --- a/playbooks/os-sahara-install.yml +++ b/playbooks/os-sahara-install.yml @@ -21,18 +21,16 @@ tags: - sahara pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include: common-tasks/os-log-dir-setup.yml + - include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-sahara" dest: "/var/log/sahara" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: diff --git a/playbooks/os-swift-install.yml b/playbooks/os-swift-install.yml index 567c5a2542..c96b5a3380 100644 --- a/playbooks/os-swift-install.yml +++ b/playbooks/os-swift-install.yml @@ -20,20 +20,18 @@ vars_files: - "defaults/{{ install_method }}_install.yml" pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" vars: extra_container_config_no_restart: - "lxc.start.order=39" when: not is_metal - - include: common-tasks/os-log-dir-setup.yml + - include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-swift" dest: "/var/log/swift" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool diff --git a/playbooks/os-tacker-install.yml b/playbooks/os-tacker-install.yml index c2e0067f05..b41399a884 100644 --- a/playbooks/os-tacker-install.yml +++ b/playbooks/os-tacker-install.yml @@ -23,11 +23,10 @@ tags: - tacker pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include: common-tasks/os-log-dir-setup.yml + - include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-tacker" diff --git a/playbooks/os-trove-install.yml b/playbooks/os-trove-install.yml index 9da9aec9db..92de6b48d3 100644 --- a/playbooks/os-trove-install.yml +++ b/playbooks/os-trove-install.yml @@ -26,18 +26,16 @@ tags: - trove pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include: common-tasks/os-log-dir-setup.yml + - include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-trove" dest: "/var/log/trove" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: diff --git a/playbooks/rabbitmq-install.yml b/playbooks/rabbitmq-install.yml index e1ccfefc18..5d303b14bc 100644 --- a/playbooks/rabbitmq-install.yml +++ b/playbooks/rabbitmq-install.yml @@ -19,15 +19,13 @@ gather_facts: "{{ osa_gather_facts | default(True) }}" user: root pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" vars: extra_container_config_no_restart: - "lxc.start.order=19" when: not is_metal - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: diff --git a/playbooks/repo-build.yml b/playbooks/repo-build.yml index 3a27083075..1aa8541062 100644 --- a/playbooks/repo-build.yml +++ b/playbooks/repo-build.yml @@ -51,7 +51,7 @@ serial: 1 pre_tasks: - - include: common-tasks/set-pip-vars.yml + - include_tasks: common-tasks/set-pip-vars.yml - name: Load local packages debug: diff --git a/playbooks/repo-install.yml b/playbooks/repo-install.yml index ea20df723c..7cb711ec96 100644 --- a/playbooks/repo-install.yml +++ b/playbooks/repo-install.yml @@ -13,5 +13,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include: repo-server.yml -- include: repo-build.yml +- import_playbook: repo-server.yml +- import_playbook: repo-build.yml diff --git a/playbooks/repo-server.yml b/playbooks/repo-server.yml index 411e5fee25..795cd77de1 100644 --- a/playbooks/repo-server.yml +++ b/playbooks/repo-server.yml @@ -19,7 +19,7 @@ user: root pre_tasks: - - include: common-tasks/set-pip-vars.yml + - include_tasks: common-tasks/set-pip-vars.yml - name: Check if the git cache exists on deployment host local_action: @@ -28,16 +28,14 @@ register: _local_git_cache when: repo_build_git_cache is defined - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" vars: list_of_bind_mounts: - mount_path: "/openstack/{{ inventory_hostname }}" bind_dir_path: "/var/www" when: not is_metal - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: diff --git a/playbooks/repo-use.yml b/playbooks/repo-use.yml index 99611ca38b..23d7cf89bd 100644 --- a/playbooks/repo-use.yml +++ b/playbooks/repo-use.yml @@ -26,7 +26,7 @@ - always - repo-config pre_tasks: - - include: common-tasks/package-cache-proxy.yml - - include: common-tasks/set-pip-vars.yml + - include_tasks: common-tasks/package-cache-proxy.yml + - include_tasks: common-tasks/set-pip-vars.yml roles: - pip_install diff --git a/playbooks/rsyslog-install.yml b/playbooks/rsyslog-install.yml index fc8c53a354..fe3dd2363e 100644 --- a/playbooks/rsyslog-install.yml +++ b/playbooks/rsyslog-install.yml @@ -24,8 +24,7 @@ when: - not rsyslog_server_enabled | bool - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" vars: list_of_bind_mounts: - bind_dir_path: "{{ rsyslog_server_storage_directory }}" @@ -34,8 +33,7 @@ - "lxc.start.order=19" when: not is_metal - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool roles: diff --git a/playbooks/setup-everything.yml b/playbooks/setup-everything.yml index da1e956a32..9b60558aef 100644 --- a/playbooks/setup-everything.yml +++ b/playbooks/setup-everything.yml @@ -13,6 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include: setup-hosts.yml -- include: setup-infrastructure.yml -- include: setup-openstack.yml +- import_playbook: setup-hosts.yml +- import_playbook: setup-infrastructure.yml +- import_playbook: setup-openstack.yml diff --git a/playbooks/setup-hosts.yml b/playbooks/setup-hosts.yml index 618f8f0039..0544f57105 100644 --- a/playbooks/setup-hosts.yml +++ b/playbooks/setup-hosts.yml @@ -13,6 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include: openstack-hosts-setup.yml -- include: security-hardening.yml -- include: containers-deploy.yml +- import_playbook: openstack-hosts-setup.yml +- import_playbook: security-hardening.yml +- import_playbook: containers-deploy.yml diff --git a/playbooks/setup-infrastructure.yml b/playbooks/setup-infrastructure.yml index b945e6c333..5c46faf152 100644 --- a/playbooks/setup-infrastructure.yml +++ b/playbooks/setup-infrastructure.yml @@ -13,20 +13,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include: unbound-install.yml -- include: repo-install.yml +- import_playbook: unbound-install.yml +- import_playbook: repo-install.yml when: install_method == "source" -- include: haproxy-install.yml +- import_playbook: haproxy-install.yml # TODO(evrardjp): Remove the following when repo_build is done # before lxc_container_create, and haproxy is moved with it as # second step. -- include: repo-use.yml +- import_playbook: repo-use.yml when: install_method == "source" -- include: utility-install.yml -- include: memcached-install.yml -- include: galera-install.yml -- include: rabbitmq-install.yml -- include: etcd-install.yml -- include: ceph-install.yml -- include: rsyslog-install.yml -- include: infra-journal-remote.yml +- import_playbook: utility-install.yml +- import_playbook: memcached-install.yml +- import_playbook: galera-install.yml +- import_playbook: rabbitmq-install.yml +- import_playbook: etcd-install.yml +- import_playbook: ceph-install.yml +- import_playbook: rsyslog-install.yml +- import_playbook: infra-journal-remote.yml diff --git a/playbooks/setup-openstack.yml b/playbooks/setup-openstack.yml index a4dacd1f47..7d1ced8685 100644 --- a/playbooks/setup-openstack.yml +++ b/playbooks/setup-openstack.yml @@ -13,38 +13,38 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include: os-keystone-install.yml -- include: os-barbican-install.yml -- include: os-glance-install.yml -- include: os-cinder-install.yml -- include: os-nova-install.yml -- include: os-neutron-install.yml -- include: os-heat-install.yml -- include: os-horizon-install.yml -- include: os-designate-install.yml +- import_playbook: os-keystone-install.yml +- import_playbook: os-barbican-install.yml +- import_playbook: os-glance-install.yml +- import_playbook: os-cinder-install.yml +- import_playbook: os-nova-install.yml +- import_playbook: os-neutron-install.yml +- import_playbook: os-heat-install.yml +- import_playbook: os-horizon-install.yml +- import_playbook: os-designate-install.yml #NOTE(stevelle) Ensure Gnocchi identities exist before Swift -- include: os-gnocchi-install.yml +- import_playbook: os-gnocchi-install.yml when: - gnocchi_storage_driver is defined - gnocchi_storage_driver == 'swift' vars: gnocchi_identity_only: True -- include: os-swift-install.yml -- include: os-gnocchi-install.yml -- include: os-ceilometer-install.yml -- include: os-aodh-install.yml -- include: os-ironic-install.yml -- include: os-magnum-install.yml -- include: os-trove-install.yml -- include: os-sahara-install.yml -- include: os-octavia-install.yml -- include: os-tacker-install.yml -- include: os-blazar-install.yml +- import_playbook: os-swift-install.yml +- import_playbook: os-gnocchi-install.yml +- import_playbook: os-ceilometer-install.yml +- import_playbook: os-aodh-install.yml +- import_playbook: os-ironic-install.yml +- import_playbook: os-magnum-install.yml +- import_playbook: os-trove-install.yml +- import_playbook: os-sahara-install.yml +- import_playbook: os-octavia-install.yml +- import_playbook: os-tacker-install.yml +- import_playbook: os-blazar-install.yml # This is not an OpenStack service, but integrates with Keystone and must be # deployed afterward. -- include: ceph-rgw-install.yml -- include: os-congress-install.yml -- include: os-tempest-install.yml +- import_playbook: ceph-rgw-install.yml +- import_playbook: os-congress-install.yml +- import_playbook: os-tempest-install.yml when: (tempest_install | default(False)) | bool or (tempest_run | default(False)) | bool diff --git a/playbooks/unbound-install.yml b/playbooks/unbound-install.yml index 2652ede1d2..1c6f3dd793 100644 --- a/playbooks/unbound-install.yml +++ b/playbooks/unbound-install.yml @@ -19,9 +19,8 @@ gather_facts: "{{ osa_gather_facts | default(True) }}" user: root pre_tasks: - - include: common-tasks/os-log-dir-setup.yml - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: common-tasks/os-log-dir-setup.yml + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal roles: - role: "unbound" @@ -39,8 +38,7 @@ - "{{ openstack_host_group|default('hosts') }}" user: root tasks: - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool environment: "{{ deployment_environment_variables | default({}) }}" diff --git a/playbooks/utility-install.yml b/playbooks/utility-install.yml index e07d09973b..1dc134298f 100644 --- a/playbooks/utility-install.yml +++ b/playbooks/utility-install.yml @@ -23,18 +23,16 @@ tags: - utility pre_tasks: - - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - static: no + - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: not is_metal - - include: common-tasks/os-log-dir-setup.yml + - include_tasks: common-tasks/os-log-dir-setup.yml vars: log_dirs: - src: "/openstack/log/{{ inventory_hostname }}-utility" dest: "/var/log/utility" - - include: common-tasks/unbound-clients.yml - static: no + - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool