diff --git a/playbooks/common-playbooks/cinder.yml b/playbooks/common-playbooks/cinder.yml index a7ff4b8a62..ae61058604 100644 --- a/playbooks/common-playbooks/cinder.yml +++ b/playbooks/common-playbooks/cinder.yml @@ -46,7 +46,8 @@ - always - name: Configure container (cinder-volume) when lvm is in-use - include_tasks: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" vars: extra_container_config: - "lxc.autodev=0" @@ -60,7 +61,8 @@ - "cinder_backend_lvm_inuse | bool" - name: Configure container (other services) - include_tasks: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: - "not is_metal" - "not ( 'cinder_volume' in group_names and cinder_backend_lvm_inuse | bool )" diff --git a/playbooks/common-playbooks/neutron.yml b/playbooks/common-playbooks/neutron.yml index 8dcb1b603c..24d97ccdb9 100644 --- a/playbooks/common-playbooks/neutron.yml +++ b/playbooks/common-playbooks/neutron.yml @@ -46,7 +46,8 @@ - always - name: Configure container (neutron-agent) - include_tasks: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" vars: list_of_bind_mounts: - bind_dir_path: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('/lib/modules', '/usr/lib/modules') }}" @@ -60,7 +61,8 @@ - "'neutron_agent' in group_names" - name: Configure container (other services) - include_tasks: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: - "not is_metal" - "'neutron_agent' not in group_names" diff --git a/playbooks/common-tasks/ceph-server.yml b/playbooks/common-tasks/ceph-server.yml index ae17a91856..b5cc382726 100644 --- a/playbooks/common-tasks/ceph-server.yml +++ b/playbooks/common-tasks/ceph-server.yml @@ -13,7 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" +- name: Including container setup role + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal vars: list_of_bind_mounts: "{{ ceph_container_bind_mounts }}" diff --git a/playbooks/common-tasks/os-lxc-container-setup.yml b/playbooks/common-tasks/os-lxc-container-setup.yml deleted file mode 100644 index aa698e3543..0000000000 --- a/playbooks/common-tasks/os-lxc-container-setup.yml +++ /dev/null @@ -1,156 +0,0 @@ ---- -# Copyright 2016, Rackspace US, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Usage: -# This common task will update lxc containers to use the lxc-openstack -# app-armor profile by default however this profile can be changed as needed. - -# This will also load in a list of bind mounts for a given container. To load -# in a list of bind mounts the variable, "list_of_bind_mounts" must be used -# containing at least one dictionary with the keys "bind_dir_path", -# "relative_bind_dir_path", and "mount_path". -# * bind_dir_path = Container path used in a bind mount -# * mount_path = Local path on the physical host used for a bind mount - -# If extra container configurations are desirable set the -# "extra_container_config" list to strings containing the options needed. - -- name: Set default bind mounts (bind var/log) - set_fact: - lxc_default_bind_mounts: '{{ lxc_default_bind_mounts | default([{"bind_dir_path": "/var/log", "mount_path": "/openstack/log/" ~ inventory_hostname}]) }}' - when: - - default_bind_mount_logs | bool - tags: - - common-lxc - -- name: Ensure mount directories exists - file: - path: "{{ item['mount_path'] }}" - state: "directory" - with_items: - - "{{ lxc_default_bind_mounts | default([]) }}" - - "{{ list_of_bind_mounts | default([]) }}" - when: - - item.create | default('dir') == 'dir' - delegate_to: "{{ physical_host }}" - tags: - - common-lxc - -- name: Add bind mount configuration to container - lineinfile: - dest: "/var/lib/lxc/{{ inventory_hostname }}/config" - line: "lxc.mount.entry = {{ item['mount_path'] }} {{ item['bind_dir_path'].lstrip('/') }} none bind,create={{ item.create | default('dir') }} 0 0" - insertbefore: "^lxc.mount.entry = .*\\s{{ item['bind_dir_path'].lstrip('/') | regex_replace('/', '\/') }}.*" - backup: "true" - with_items: - - "{{ lxc_default_bind_mounts | default([]) }}" - - "{{ list_of_bind_mounts | default([]) }}" - delegate_to: "{{ physical_host }}" - register: _mc - tags: - - common-lxc - -- name: Extra lxc config - lineinfile: - path: "/var/lib/lxc/{{ inventory_hostname }}/config" - regexp: "^{{ item.split('=')[0] }} =" - line: "{{ item.split('=')[0] }} = {{ item.split('=', 1)[1] }}" - backup: "true" - with_items: "{{ extra_container_config | default([]) }}" - delegate_to: "{{ physical_host }}" - register: _ec - tags: - - common-lxc - -- name: Extra lxc config no restart - lineinfile: - path: "/var/lib/lxc/{{ inventory_hostname }}/config" - regexp: "^{{ item.split('=')[0] }} =" - line: "{{ item.split('=')[0] }} = {{ item.split('=', 1)[1] }}" - backup: "true" - with_items: "{{ extra_container_config_no_restart | default(['lxc.start.order=100']) }}" - delegate_to: "{{ physical_host }}" - tags: - - common-lxc - -- name: Check container state - command: "lxc-info -n {{ inventory_hostname }} --state" - changed_when: false - delegate_to: "{{ physical_host }}" - register: _lxc_container_state - until: _lxc_container_state is success - retries: 3 - delay: 5 - when: - - (_mc is defined and _mc is changed) or (_ec is defined and _ec is changed) - -# Due to https://github.com/ansible/ansible-modules-extras/issues/2691 -# this uses the LXC CLI tools to ensure that we get logging. -# TODO(odyssey4me): revisit this once the bug is fixed and released -# NOTE(cloudnull): The `lxc-stop` command will have an RC of 2 if the command -# fails due to a container already being in a stopped state. -- name: Lxc container restart - command: > - lxc-stop --name {{ inventory_hostname }} - --logfile {{ lxc_container_log_path }}/lxc-{{ inventory_hostname }}.log - --logpriority {{ (debug | bool) | ternary('DEBUG', 'INFO') }} - delegate_to: "{{ physical_host }}" - register: container_stop - until: container_stop is success - retries: 3 - failed_when: - - container_stop.rc not in [0, 2] - when: - - lxc_container_allow_restarts | default(True) | bool - - (_mc is defined and _mc is changed) or (_ec is defined and _ec is changed) - - _lxc_container_state.stdout.find('RUNNING') != -1 - tags: - - common-lxc - -# Due to https://github.com/ansible/ansible-modules-extras/issues/2691 -# this uses the LXC CLI tools to ensure that we get logging. -# TODO(odyssey4me): revisit this once the bug is fixed and released -- name: Start Container - command: > - lxc-start --daemon --name {{ inventory_hostname }} - --logfile {{ lxc_container_log_path }}/lxc-{{ inventory_hostname }}.log - --logpriority {{ (debug | bool) | ternary('DEBUG', 'INFO') }} - delegate_to: "{{ physical_host }}" - register: container_start - until: container_start is success - retries: 3 - when: - - (_mc is defined and _mc is changed) or (_ec is defined and _ec is changed) - tags: - - common-lxc - -- name: Wait for container tmpfiles-setup finish - raw: systemctl list-units systemd-tmpfiles-setup.service --no-legend | grep 'exited' >/dev/null - register: systemd_tmpfiles - until: systemd_tmpfiles.rc == 0 - retries: 20 - delay: 2 - changed_when: false - -- name: Wait for container connectivity - wait_for_connection: - connect_timeout: "{{ lxc_container_wait_params.connect_timeout | default(omit) }}" - delay: "{{ lxc_container_wait_params.delay | default(omit) }}" - sleep: "{{ lxc_container_wait_params.sleep | default(omit) }}" - timeout: "{{ lxc_container_wait_params.timeout | default(omit) }}" - when: - - (_mc is defined and _mc is changed) or (_ec is defined and _ec is changed) - tags: - - common-lxc diff --git a/playbooks/galera-install.yml b/playbooks/galera-install.yml index 61f2a8397c..b55c3c8417 100644 --- a/playbooks/galera-install.yml +++ b/playbooks/galera-install.yml @@ -39,7 +39,8 @@ user: root pre_tasks: - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal vars: list_of_bind_mounts: "{{ galera_container_bind_mounts }}" diff --git a/playbooks/haproxy-install.yml b/playbooks/haproxy-install.yml index 877ddc23a3..418259364b 100644 --- a/playbooks/haproxy-install.yml +++ b/playbooks/haproxy-install.yml @@ -30,7 +30,8 @@ user: root pre_tasks: - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks include_tasks: common-tasks/unbound-clients.yml diff --git a/playbooks/memcached-install.yml b/playbooks/memcached-install.yml index b88de23985..f0a4309009 100644 --- a/playbooks/memcached-install.yml +++ b/playbooks/memcached-install.yml @@ -26,7 +26,8 @@ user: root pre_tasks: - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks include_tasks: common-tasks/unbound-clients.yml diff --git a/playbooks/os-aodh-install.yml b/playbooks/os-aodh-install.yml index 11f1530270..16d4c564d1 100644 --- a/playbooks/os-aodh-install.yml +++ b/playbooks/os-aodh-install.yml @@ -57,7 +57,8 @@ - "groups['aodh_api'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks diff --git a/playbooks/os-barbican-install.yml b/playbooks/os-barbican-install.yml index a52d496b40..bd05118fd6 100644 --- a/playbooks/os-barbican-install.yml +++ b/playbooks/os-barbican-install.yml @@ -57,7 +57,8 @@ - "groups['barbican_api'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks diff --git a/playbooks/os-blazar-install.yml b/playbooks/os-blazar-install.yml index 7f95b28cbb..5954959733 100644 --- a/playbooks/os-blazar-install.yml +++ b/playbooks/os-blazar-install.yml @@ -57,7 +57,8 @@ - "groups['blazar_api'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks diff --git a/playbooks/os-ceilometer-install.yml b/playbooks/os-ceilometer-install.yml index fc74b56517..edc307b2c5 100644 --- a/playbooks/os-ceilometer-install.yml +++ b/playbooks/os-ceilometer-install.yml @@ -32,7 +32,8 @@ - "defaults/{{ install_method }}_install.yml" pre_tasks: - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks diff --git a/playbooks/os-designate-install.yml b/playbooks/os-designate-install.yml index 7dc4f7298e..4fef17379c 100644 --- a/playbooks/os-designate-install.yml +++ b/playbooks/os-designate-install.yml @@ -60,7 +60,8 @@ - "groups['designate_api'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks diff --git a/playbooks/os-glance-install.yml b/playbooks/os-glance-install.yml index 0e50299d08..6ef179beff 100644 --- a/playbooks/os-glance-install.yml +++ b/playbooks/os-glance-install.yml @@ -57,7 +57,8 @@ - "groups['glance_api'] | length > 1" - name: Configure container (local storage bind mount from host) - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" vars: list_of_bind_mounts: "{{ glance_container_bind_mounts }}" when: @@ -66,7 +67,8 @@ - (glance_remote_client is not defined) or (glance_remote_client | length == 0) - name: Configure container (remote storage) - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: - not is_metal - (glance_default_store != "file") or (glance_remote_client is defined) diff --git a/playbooks/os-gnocchi-install.yml b/playbooks/os-gnocchi-install.yml index 60cd3104db..cb8745c4f3 100644 --- a/playbooks/os-gnocchi-install.yml +++ b/playbooks/os-gnocchi-install.yml @@ -57,7 +57,8 @@ - "groups['gnocchi_all'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" vars: list_of_bind_mounts: "{{ gnocchi_container_bind_mounts }}" when: diff --git a/playbooks/os-heat-install.yml b/playbooks/os-heat-install.yml index 13e4b0dc12..47e82a8cbf 100644 --- a/playbooks/os-heat-install.yml +++ b/playbooks/os-heat-install.yml @@ -57,7 +57,8 @@ - "groups['heat_api'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks diff --git a/playbooks/os-horizon-install.yml b/playbooks/os-horizon-install.yml index d53c9e891b..7bec507d66 100644 --- a/playbooks/os-horizon-install.yml +++ b/playbooks/os-horizon-install.yml @@ -57,7 +57,8 @@ - "groups['horizon_all'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks include_tasks: common-tasks/unbound-clients.yml diff --git a/playbooks/os-ironic-install.yml b/playbooks/os-ironic-install.yml index a42ac2098a..bbf4347dc3 100644 --- a/playbooks/os-ironic-install.yml +++ b/playbooks/os-ironic-install.yml @@ -57,7 +57,8 @@ - "groups['ironic_api'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks diff --git a/playbooks/os-keystone-install.yml b/playbooks/os-keystone-install.yml index cd03c3a8a9..0685502123 100644 --- a/playbooks/os-keystone-install.yml +++ b/playbooks/os-keystone-install.yml @@ -86,7 +86,8 @@ - "groups['keystone_all'] | length > 1" - name: Configure container - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" vars: extra_container_config_no_restart: - "lxc.start.order=19" diff --git a/playbooks/os-magnum-install.yml b/playbooks/os-magnum-install.yml index d74d22cef3..a3e9fc21db 100644 --- a/playbooks/os-magnum-install.yml +++ b/playbooks/os-magnum-install.yml @@ -60,7 +60,8 @@ - "groups['magnum_all'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks diff --git a/playbooks/os-masakari-install.yml b/playbooks/os-masakari-install.yml index eb29be7e54..9ad7749ab1 100644 --- a/playbooks/os-masakari-install.yml +++ b/playbooks/os-masakari-install.yml @@ -84,7 +84,8 @@ - "groups['masakari_api'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks diff --git a/playbooks/os-mistral-install.yml b/playbooks/os-mistral-install.yml index 6cae34ceb5..6516a7d21b 100644 --- a/playbooks/os-mistral-install.yml +++ b/playbooks/os-mistral-install.yml @@ -57,7 +57,8 @@ - "groups['mistral_all'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks diff --git a/playbooks/os-murano-install.yml b/playbooks/os-murano-install.yml index 8adc70fe15..c8248130f3 100644 --- a/playbooks/os-murano-install.yml +++ b/playbooks/os-murano-install.yml @@ -57,7 +57,8 @@ - "groups['murano_all'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks diff --git a/playbooks/os-nova-install.yml b/playbooks/os-nova-install.yml index f530476ff2..a3c3ec26c7 100644 --- a/playbooks/os-nova-install.yml +++ b/playbooks/os-nova-install.yml @@ -90,7 +90,8 @@ - "nova_console" - name: Configure container - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal vars: extra_container_config_no_restart: @@ -157,7 +158,8 @@ - always - name: Configure container - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal vars: extra_container_config_no_restart: diff --git a/playbooks/os-octavia-install.yml b/playbooks/os-octavia-install.yml index 25a00af37b..8de478a7e4 100644 --- a/playbooks/os-octavia-install.yml +++ b/playbooks/os-octavia-install.yml @@ -57,7 +57,8 @@ - "groups['octavia_all'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks diff --git a/playbooks/os-placement-install.yml b/playbooks/os-placement-install.yml index d44b318446..1f5016e346 100644 --- a/playbooks/os-placement-install.yml +++ b/playbooks/os-placement-install.yml @@ -57,7 +57,8 @@ - "groups['placement_all'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks diff --git a/playbooks/os-sahara-install.yml b/playbooks/os-sahara-install.yml index cfd0823ec6..dbd84ade17 100644 --- a/playbooks/os-sahara-install.yml +++ b/playbooks/os-sahara-install.yml @@ -55,7 +55,8 @@ - "groups['sahara_api'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks diff --git a/playbooks/os-swift-install.yml b/playbooks/os-swift-install.yml index ebfe5a9dba..e3756d766e 100644 --- a/playbooks/os-swift-install.yml +++ b/playbooks/os-swift-install.yml @@ -40,7 +40,8 @@ - "defaults/{{ install_method }}_install.yml" pre_tasks: - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" vars: extra_container_config_no_restart: - "lxc.start.order=39" diff --git a/playbooks/os-tacker-install.yml b/playbooks/os-tacker-install.yml index f7fdc6acfb..c33f664a88 100644 --- a/playbooks/os-tacker-install.yml +++ b/playbooks/os-tacker-install.yml @@ -57,7 +57,8 @@ - "groups['tacker_all'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal roles: diff --git a/playbooks/os-trove-install.yml b/playbooks/os-trove-install.yml index 5782d1e200..7197e125a2 100644 --- a/playbooks/os-trove-install.yml +++ b/playbooks/os-trove-install.yml @@ -60,7 +60,8 @@ - "groups['trove_api'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks diff --git a/playbooks/os-zun-install.yml b/playbooks/os-zun-install.yml index a206fae750..fa605cb8b1 100644 --- a/playbooks/os-zun-install.yml +++ b/playbooks/os-zun-install.yml @@ -71,7 +71,8 @@ - "groups['zun_api'] | length > 1" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including unbound-clients tasks diff --git a/playbooks/qdrouterd-install.yml b/playbooks/qdrouterd-install.yml index 7b01d63af8..bfb4b7469b 100644 --- a/playbooks/qdrouterd-install.yml +++ b/playbooks/qdrouterd-install.yml @@ -29,7 +29,8 @@ - qdrouterd pre_tasks: - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" vars: extra_container_config_no_restart: - "lxc.start.order=19" diff --git a/playbooks/rabbitmq-install.yml b/playbooks/rabbitmq-install.yml index 0ffcfaa8a2..abc052c355 100644 --- a/playbooks/rabbitmq-install.yml +++ b/playbooks/rabbitmq-install.yml @@ -26,7 +26,8 @@ user: root pre_tasks: - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" vars: extra_container_config_no_restart: - "lxc.start.order=19" diff --git a/playbooks/repo-install.yml b/playbooks/repo-install.yml index 7b6aabd68c..8096763403 100644 --- a/playbooks/repo-install.yml +++ b/playbooks/repo-install.yml @@ -31,7 +31,8 @@ - (install_method | default('source')) != "source" - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" vars: list_of_bind_mounts: "{{ repo_container_bind_mounts }}" when: not is_metal diff --git a/playbooks/unbound-install.yml b/playbooks/unbound-install.yml index e42bcf515c..3b3be2d8f1 100644 --- a/playbooks/unbound-install.yml +++ b/playbooks/unbound-install.yml @@ -28,7 +28,8 @@ - name: Including os-log-dir-setup tasks include_tasks: common-tasks/os-log-dir-setup.yml - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal roles: - role: "unbound" diff --git a/playbooks/utility-install.yml b/playbooks/utility-install.yml index eb8fc67bf8..3d21b4b905 100644 --- a/playbooks/utility-install.yml +++ b/playbooks/utility-install.yml @@ -49,7 +49,8 @@ - "venv changed" pre_tasks: - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal - name: Including os-log-dir-setup tasks diff --git a/playbooks/zookeeper-install.yml b/playbooks/zookeeper-install.yml index 2b536a56c8..3db72b057b 100644 --- a/playbooks/zookeeper-install.yml +++ b/playbooks/zookeeper-install.yml @@ -29,7 +29,8 @@ - name: Including os-log-dir-setup tasks include_tasks: common-tasks/os-log-dir-setup.yml - name: Including container-setup tasks - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + include_role: + name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" when: not is_metal vars: list_of_bind_mounts: "{{ zookeeper_container_bind_mounts }}"