Fix linters to satisfy ansible-lint 6.18

With update of ansible-lint to version >=6.0.0 a lot of new
linters were added, that enabled by default. In order to comply
with linter rules we're applying changes to the role.

Update of linters version is required for bumping ansible-core
version.

Change-Id: Icb7d9906bdc3dcb50c44c67881c2078ade8b72f2
This commit is contained in:
Dmitriy Rabotyagov 2023-06-20 20:44:40 +02:00 committed by Dmitriy Rabotyagov
parent 84c074b6ee
commit 5ea6f419c7
59 changed files with 423 additions and 201 deletions

View File

@ -65,7 +65,8 @@
tags: tags:
- always - always
- import_tasks: common-tasks/ceph-server.yml - name: Importing ceph-server tasks
import_tasks: common-tasks/ceph-server.yml
- name: Create systemd service directory - name: Create systemd service directory
file: file:
@ -84,6 +85,7 @@
content: | content: |
[Service] [Service]
PrivateDevices=false PrivateDevices=false
mode: "0640"
when: when:
- ansible_facts['pkg_mgr'] == 'dnf' - ansible_facts['pkg_mgr'] == 'dnf'
- ansible_facts['service_mgr'] == 'systemd' - ansible_facts['service_mgr'] == 'systemd'
@ -145,7 +147,8 @@
tags: tags:
- always - always
- import_tasks: common-tasks/ceph-server.yml - name: Importing ceph-server tasks
import_tasks: common-tasks/ceph-server.yml
roles: roles:
- role: ceph-defaults - role: ceph-defaults

View File

@ -42,7 +42,7 @@
path: /var/log/ganesha path: /var/log/ganesha
owner: root owner: root
group: root group: root
mode: 0755 mode: "0755"
state: directory state: directory
roles: roles:
- role: ceph-defaults - role: ceph-defaults

View File

@ -13,7 +13,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- import_playbook: ceph-rgw-keystone-setup.yml - name: Importing ceph-rgw-keystone-setup playbook
import_playbook: ceph-rgw-keystone-setup.yml
when: (groups[rgw_group_name] is defined and groups[rgw_group_name] | length > 0) or (ceph_rgws | length > 0) when: (groups[rgw_group_name] is defined and groups[rgw_group_name] | length > 0) or (ceph_rgws | length > 0)
- name: Gather ceph-rgw facts - name: Gather ceph-rgw facts
@ -30,7 +31,8 @@
- "defaults/{{ install_method }}_install.yml" - "defaults/{{ install_method }}_install.yml"
pre_tasks: pre_tasks:
- import_tasks: common-tasks/ceph-server.yml - name: Importing ceph-server tasks
import_tasks: common-tasks/ceph-server.yml
- name: Gather ceph-mon facts - name: Gather ceph-mon facts
action: setup action: setup

View File

@ -21,7 +21,8 @@
vars: vars:
ansible_python_interpreter: >- ansible_python_interpreter: >-
{{ openstack_service_setup_host_python_interpreter | {{ openstack_service_setup_host_python_interpreter |
default((openstack_service_setup_host | default('localhost') == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }} default((openstack_service_setup_host |
default('localhost') == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}
tags: tags:
- ceph-rgw - ceph-rgw
- ceph-rgw-setup - ceph-rgw-setup

View File

@ -29,7 +29,8 @@
# config file changes which causes a container/service # config file changes which causes a container/service
# restart do not cause an unexpected outage, we drain # restart do not cause an unexpected outage, we drain
# the load balancer back end for this container. # the load balancer back end for this container.
- include_tasks: ../common-tasks/haproxy-endpoint-manage.yml - name: Disabling haproxy backends
include_tasks: ../common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: cinder_api-back haproxy_backend: cinder_api-back
haproxy_state: disabled haproxy_state: disabled
@ -64,11 +65,12 @@
- "not is_metal" - "not is_metal"
- "not ( 'cinder_volume' in group_names and cinder_backend_lvm_inuse | bool )" - "not ( 'cinder_volume' in group_names and cinder_backend_lvm_inuse | bool )"
- include_tasks: ../common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: ../common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
- name: Add volume group block device to cinder - name: Add volume group block device to cinder # noqa: no-changed-when
shell: | shell: |
set -o pipefail set -o pipefail
{% if item.value.volume_group is defined %} {% if item.value.volume_group is defined %}
@ -89,7 +91,7 @@
- cinder_backend_lvm_inuse | bool - cinder_backend_lvm_inuse | bool
delegate_to: "{{ physical_host }}" delegate_to: "{{ physical_host }}"
- name: udevadm trigger - name: Trigger udevadm # noqa: no-changed-when
command: udevadm trigger command: udevadm trigger
delegate_to: "{{ physical_host }}" delegate_to: "{{ physical_host }}"
when: cinder_backend_lvm_inuse | bool when: cinder_backend_lvm_inuse | bool
@ -106,7 +108,8 @@
# Now that container changes are done, we can set # Now that container changes are done, we can set
# the load balancer back end for this container # the load balancer back end for this container
# to available again. # to available again.
- include_tasks: ../common-tasks/haproxy-endpoint-manage.yml - name: Enabling haproxy backends
include_tasks: ../common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: cinder_api-back haproxy_backend: cinder_api-back
haproxy_state: enabled haproxy_state: enabled

View File

@ -22,17 +22,19 @@
# After haproxy is configured, refresh_inventory is triggered to restore the # After haproxy is configured, refresh_inventory is triggered to restore the
# original inventory state. # original inventory state.
- hosts: "{{ service_group }}" - name: Adding hosts haproxy_service variables to haproxy
hosts: "{{ service_group }}"
gather_facts: false gather_facts: false
run_once: true run_once: true
tasks: tasks:
- name: "Temporarily copy haproxy_service_configs value from {{ service_group }} to haproxy_all" - name: "Temporarily copy haproxy_service_configs value to haproxy_all from {{ service_group }}"
add_host: add_host:
name: "{{ item }}" name: "{{ item }}"
haproxy_service_configs: "{{ hostvars[inventory_hostname][service_variable] }}" haproxy_service_configs: "{{ hostvars[inventory_hostname][service_variable] }}"
with_items: "{{ groups['haproxy_all'] }}" with_items: "{{ groups['haproxy_all'] }}"
- hosts: haproxy_all - name: Configuring haproxy for the service
hosts: haproxy_all
serial: "{{ haproxy_serial | default('50%') }}" serial: "{{ haproxy_serial | default('50%') }}"
tasks: tasks:
- name: Configure haproxy for the service - name: Configure haproxy for the service

View File

@ -29,7 +29,8 @@
# config file changes which causes a container/service # config file changes which causes a container/service
# restart do not cause an unexpected outage, we drain # restart do not cause an unexpected outage, we drain
# the load balancer back end for this container. # the load balancer back end for this container.
- include_tasks: ../common-tasks/haproxy-endpoint-manage.yml - name: Disabling haproxy backends
include_tasks: ../common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: neutron_server-back haproxy_backend: neutron_server-back
haproxy_state: disabled haproxy_state: disabled
@ -64,7 +65,8 @@
- "not is_metal" - "not is_metal"
- "'neutron_agent' not in group_names" - "'neutron_agent' not in group_names"
- include_tasks: ../common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: ../common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
@ -79,7 +81,8 @@
# Now that container changes are done, we can set # Now that container changes are done, we can set
# the load balancer back end for this container # the load balancer back end for this container
# to available again. # to available again.
- include_tasks: ../common-tasks/haproxy-endpoint-manage.yml - name: Enabling haproxy backends
include_tasks: ../common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: neutron_server-back haproxy_backend: neutron_server-back
haproxy_state: enabled haproxy_state: enabled

View File

@ -43,7 +43,8 @@
# config file changes which causes a container/service # config file changes which causes a container/service
# restart do not cause an unexpected outage, we drain # restart do not cause an unexpected outage, we drain
# the load balancer back end for this container. # the load balancer back end for this container.
- include_tasks: ../common-tasks/haproxy-endpoint-manage.yml - name: Disabling haproxy backends
include_tasks: ../common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: "{{ backend_name }}-back" haproxy_backend: "{{ backend_name }}-back"
haproxy_state: disabled haproxy_state: disabled
@ -64,7 +65,8 @@
extra_container_config_no_restart: extra_container_config_no_restart:
- "lxc.start.order=39" - "lxc.start.order=39"
- include_tasks: ../common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: ../common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
@ -85,7 +87,7 @@
tags: tags:
- always - always
- name: Add net/tun device to the compute - name: Add net/tun device to the compute # noqa: no-changed-when
command: | command: |
lxc-device -n {{ container_name }} add /dev/net/tun /dev/net/tun lxc-device -n {{ container_name }} add /dev/net/tun /dev/net/tun
delegate_to: "{{ physical_host }}" delegate_to: "{{ physical_host }}"
@ -137,7 +139,8 @@
# Now that container changes are done, we can set # Now that container changes are done, we can set
# the load balancer back end for this container # the load balancer back end for this container
# to available again. # to available again.
- include_tasks: ../common-tasks/haproxy-endpoint-manage.yml - name: Enabling haproxy backends
include_tasks: ../common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: "{{ backend_name }}-back" haproxy_backend: "{{ backend_name }}-back"
haproxy_state: enabled haproxy_state: enabled

View File

@ -22,7 +22,7 @@
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
#TODO: mgariepy, revisit to use include_role when https://github.com/ansible/ansible/issues/20077 is fixed # TODO: mgariepy, revisit to use include_role when https://github.com/ansible/ansible/issues/20077 is fixed
- name: Ensure Ansible can work with SELinux - name: Ensure Ansible can work with SELinux
package: package:
name: libselinux-python3 name: libselinux-python3

View File

@ -13,8 +13,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
#create a sorted resolver list with affinity toward unbound container(s) # create a sorted resolver list with affinity toward unbound container(s)
#on the same physical_host # on the same physical_host
- name: Apply resolver sorting - name: Apply resolver sorting
set_fact: set_fact:
resolver_list: |- resolver_list: |-
@ -51,7 +51,7 @@
- resolver_list is defined - resolver_list is defined
- resolver_list | length > 0 - resolver_list | length > 0
#rotate is only used when no physical_host affinity is defined # rotate is only used when no physical_host affinity is defined
- name: Set resolver rotate when physical_host is not an unbound host - name: Set resolver rotate when physical_host is not an unbound host
set_fact: set_fact:
resolvconf_options: resolvconf_options:

View File

@ -13,5 +13,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- import_playbook: "containers-lxc-host.yml" - name: Import container hosts playbook
- import_playbook: "containers-lxc-create.yml" import_playbook: "containers-lxc-host.yml"
- name: Import containers create playbook
import_playbook: "containers-lxc-create.yml"

View File

@ -49,7 +49,8 @@
when: when:
- force_containers_destroy | bool - force_containers_destroy | bool
- include_tasks: "common-tasks/remove_container_journal.yml" - name: Including remove_container_journal tasks
include_tasks: "common-tasks/remove_container_journal.yml"
vars: vars:
container_machine_id: "{{ ((_container_machine_id.content | default('bm9uZQo=')) | b64decode).strip() }}" container_machine_id: "{{ ((_container_machine_id.content | default('bm9uZQo=')) | b64decode).strip() }}"

View File

@ -38,8 +38,9 @@
file: file:
path: "/openstack/log" path: "/openstack/log"
state: directory state: directory
mode: "0755"
- name: Move the existing folder to the log aggregation parent - name: Move the existing folder to the log aggregation parent
command: "mv /var/log/lxc /openstack/log/{{ inventory_hostname }}-lxc" command: "mv /var/log/lxc /openstack/log/{{ inventory_hostname }}-lxc" # noqa: no-changed-when
when: when:
- _lxc_log_dir.stat.isdir is defined - _lxc_log_dir.stat.isdir is defined
- _lxc_log_dir.stat.isdir | bool - _lxc_log_dir.stat.isdir | bool
@ -47,6 +48,7 @@
file: file:
path: "/openstack/log/{{ inventory_hostname }}-lxc" path: "/openstack/log/{{ inventory_hostname }}-lxc"
state: directory state: directory
mode: "0755"
- name: Create the LXC service log aggregation link - name: Create the LXC service log aggregation link
file: file:
src: "/openstack/log/{{ inventory_hostname }}-lxc" src: "/openstack/log/{{ inventory_hostname }}-lxc"

View File

@ -14,7 +14,7 @@
# limitations under the License. # limitations under the License.
# #
# (c) 2018, Jean-Philippe Evrard <jean-philippe@evrard.me> # (c) 2018, Jean-Philippe Evrard <jean-philippe@evrard.me>
#ansible_python_interpreter: "{{ ansible_playbook_python }}" # ansible_python_interpreter: "{{ ansible_playbook_python }}"
glance_images: glance_images:
- url: "https://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img" - url: "https://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img"
dest: "/tmp/cirros-0.5.1.img" dest: "/tmp/cirros-0.5.1.img"

View File

@ -38,16 +38,19 @@
serial: "{{ galera_serial | default(1) }}" serial: "{{ galera_serial | default(1) }}"
user: root user: root
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
vars: vars:
list_of_bind_mounts: "{{ galera_container_bind_mounts }}" list_of_bind_mounts: "{{ galera_container_bind_mounts }}"
extra_container_config_no_restart: extra_container_config_no_restart:
- "lxc.start.order=10" - "lxc.start.order=10"
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: galera-back haproxy_backend: galera-back
haproxy_state: drain haproxy_state: drain
@ -62,7 +65,8 @@
tags: tags:
- crontab - crontab
post_tasks: post_tasks:
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: galera-back haproxy_backend: galera-back
haproxy_state: enabled haproxy_state: enabled

View File

@ -23,15 +23,17 @@
tags: tags:
- always - always
- name: haproxy base config - name: HAProxy base config
hosts: haproxy hosts: haproxy
gather_facts: false gather_facts: false
serial: "{{ haproxy_serial | default('50%') }}" serial: "{{ haproxy_serial | default('50%') }}"
user: root user: root
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
- name: Remove legacy haproxy configuration files - name: Remove legacy haproxy configuration files
@ -44,7 +46,7 @@
- name: "heat_api_cloudwatch" - name: "heat_api_cloudwatch"
when: "yes" when: "yes"
when: when:
- "item.when | bool" - "item.when | bool"
tags: tags:
- haproxy-config # this tag is present because the task is ONLY a config task - haproxy-config # this tag is present because the task is ONLY a config task

View File

@ -53,6 +53,7 @@
get_url: get_url:
url: https://opendev.org/openstack/openstack-ansible/raw/ansible-role-requirements.yml url: https://opendev.org/openstack/openstack-ansible/raw/ansible-role-requirements.yml
dest: /tmp/osa-master-requirements dest: /tmp/osa-master-requirements
mode: "0600"
environment: "{{ deployment_environment_variables | default({}) }}" environment: "{{ deployment_environment_variables | default({}) }}"
# Test extra settings before setup-infrastructure # Test extra settings before setup-infrastructure
@ -120,7 +121,7 @@
- "'ebtables' in modules_content" - "'ebtables' in modules_content"
- "'vm.swappiness' in sysctl_content" - "'vm.swappiness' in sysctl_content"
- "'172.29.236.100 {{ ansible_facts['fqdn'] }} {{ ansible_facts['hostname'] }}' in hosts_content" - "'172.29.236.100 {{ ansible_facts['fqdn'] }} {{ ansible_facts['hostname'] }}' in hosts_content"
- "'{{ hostvars[groups['galera_all'][0]]['management_address'] }} {{ hostvars[groups['galera_all'][0]]['ansible_facts']['hostname'] }}.openstack.local {{ hostvars[groups['galera_all'][0]]['ansible_facts']['hostname'] ~ ((hostvars[groups['galera_all'][0]]['ansible_facts']['hostname'] != groups['galera_all'][0]) | ternary(' ' ~ groups['galera_all'][0], '')) }}' in hosts_content" - "'{{ hostvars[groups['galera_all'][0]]['management_address'] }} {{ hostvars[groups['galera_all'][0]]['ansible_facts']['hostname'] }}.openstack.local {{ hostvars[groups['galera_all'][0]]['ansible_facts']['hostname'] ~ ((hostvars[groups['galera_all'][0]]['ansible_facts']['hostname'] != groups['galera_all'][0]) | ternary(' ' ~ groups['galera_all'][0], '')) }}' in hosts_content" # noqa: yaml[line-length]
- "release_file.stat.exists" - "release_file.stat.exists"
- "systat_file.stat.exists" - "systat_file.stat.exists"
- "'PATH=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' in environment_content" - "'PATH=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' in environment_content"

View File

@ -55,7 +55,8 @@
changed_when: false changed_when: false
when: groups['haproxy'] | length > 1 when: groups['haproxy'] | length > 1
- package: - name: Install netcat
package:
name: "{% if ansible_facts['os_family'] | lower == 'redhat' %}nmap-ncat{% else %}netcat-openbsd{% endif %}" name: "{% if ansible_facts['os_family'] | lower == 'redhat' %}nmap-ncat{% else %}netcat-openbsd{% endif %}"
state: present state: present
@ -126,12 +127,13 @@
delegate_facts: true delegate_facts: true
with_items: "{{ groups['memcached'] }}" with_items: "{{ groups['memcached'] }}"
- package: - name: Install netcat
package:
name: "{% if ansible_facts['os_family'] | lower == 'redhat' %}nmap-ncat{% else %}netcat-openbsd{% endif %}" name: "{% if ansible_facts['os_family'] | lower == 'redhat' %}nmap-ncat{% else %}netcat-openbsd{% endif %}"
state: present state: present
- name: Connect to remote memcache servers (full mesh testing) - name: Connect to remote memcache servers (full mesh testing)
shell: "echo stats | nc -w 3 {{ hostvars[memcached_host]['management_address'] }} {{ memcached_port }}" shell: "echo stats | nc -w 3 {{ hostvars[memcached_host]['management_address'] }} {{ memcached_port }}"
changed_when: false changed_when: false
register: memcache_stats register: memcache_stats
with_items: "{{ groups['memcached'] }}" with_items: "{{ groups['memcached'] }}"
@ -265,6 +267,7 @@
-u osa-tester \ -u osa-tester \
OSA-test \ OSA-test \
-e "SHOW TABLES;" -e "SHOW TABLES;"
changed_when: false
when: inventory_hostname == groups['galera_all'][-1] when: inventory_hostname == groups['galera_all'][-1]
- name: Remove created user - name: Remove created user
@ -335,7 +338,7 @@
copy: copy:
src: "../scripts/rabbitmq-test.py" src: "../scripts/rabbitmq-test.py"
dest: "{{ venv_path }}/rabbitmq-test.py" dest: "{{ venv_path }}/rabbitmq-test.py"
mode: 0755 mode: "0755"
- name: Connect to rabbitmq - name: Connect to rabbitmq
command: "{{ venv_path }}/bin/python {{ venv_path }}/rabbitmq-test.py {{ hostvars[groups['rabbitmq_all'][0]]['management_address'] }}" command: "{{ venv_path }}/bin/python {{ venv_path }}/rabbitmq-test.py {{ hostvars[groups['rabbitmq_all'][0]]['management_address'] }}"
changed_when: false changed_when: false

View File

@ -56,6 +56,7 @@
url: "{{ item.url }}" url: "{{ item.url }}"
dest: "{{ item.dest }}" dest: "{{ item.dest }}"
checksum: "{{ item.checksum | default(omit) }}" checksum: "{{ item.checksum | default(omit) }}"
mode: "0640"
with_items: "{{ glance_images }}" with_items: "{{ glance_images }}"
register: fetch_url register: fetch_url
until: fetch_url is success until: fetch_url is success
@ -98,7 +99,7 @@
display_name: "{{ item.name }}" display_name: "{{ item.name }}"
size: "{{ item.size }}" size: "{{ item.size }}"
snapshot_id: "{{ item.snapshot_id | default(omit) }}" snapshot_id: "{{ item.snapshot_id | default(omit) }}"
timeout: "{{ item.timeout | default(600) }}" #By default it's 180 but that's low. timeout: "{{ item.timeout | default(600) }}" # By default it's 180 but that's low.
volume: "{{ item.volume | default(omit) }}" volume: "{{ item.volume | default(omit) }}"
volume_type: "{{ item.volume_type | default(omit) }}" volume_type: "{{ item.volume_type | default(omit) }}"
with_items: "{{ cinder_volumes }}" with_items: "{{ cinder_volumes }}"
@ -125,7 +126,8 @@
with_dict: "{{ neutron_networks }}" with_dict: "{{ neutron_networks }}"
register: _create_net register: _create_net
- fail: - name: Fail if network was not created successfully
fail:
msg: "Creating network failure" msg: "Creating network failure"
with_items: "{{ _create_net.results }}" with_items: "{{ _create_net.results }}"
when: when:
@ -155,7 +157,7 @@
cidr: "{{ item[1].cidr }}" cidr: "{{ item[1].cidr }}"
gateway_ip: "{{ item[1].gateway_ip | default(omit) }}" gateway_ip: "{{ item[1].gateway_ip | default(omit) }}"
enable_dhcp: "{{ item[1].enable_dhcp | default(false) }}" enable_dhcp: "{{ item[1].enable_dhcp | default(false) }}"
allocation_pool_start: "{{ item[1].allocation_pool_start | default(omit) }}" allocation_pool_start: "{{ item[1].allocation_pool_start | default(omit) }}"
allocation_pool_end: "{{ item[1].allocation_pool_end | default(omit) }}" allocation_pool_end: "{{ item[1].allocation_pool_end | default(omit) }}"
dns_nameservers: "{{ item[1].dns_nameservers | default([]) }}" dns_nameservers: "{{ item[1].dns_nameservers | default([]) }}"
project: "{{ item[0].project | default(omit) }}" project: "{{ item[0].project | default(omit) }}"
@ -186,6 +188,7 @@
get_url: get_url:
url: "{{ heat_stack['source_url'] }}" url: "{{ heat_stack['source_url'] }}"
dest: "{{ heat_stack['dest_file'] }}" dest: "{{ heat_stack['dest_file'] }}"
mode: "0640"
- name: Create heat stack - name: Create heat stack
ignore_errors: True ignore_errors: True
@ -307,6 +310,7 @@
- name: Ensure connection to node works - name: Ensure connection to node works
command: "scp -o StrictHostKeyChecking=no -i {{ ssh_key }} cirros@{{ _floating_ip[0] }}:/etc/fstab /tmp/fstab" command: "scp -o StrictHostKeyChecking=no -i {{ ssh_key }} cirros@{{ _floating_ip[0] }}:/etc/fstab /tmp/fstab"
changed_when: false
when: when:
- "groups['nova_all'] | length > 0" - "groups['nova_all'] | length > 0"
@ -381,7 +385,8 @@
vars_files: vars_files:
- defaults/healthchecks-vars.yml - defaults/healthchecks-vars.yml
tasks: tasks:
- block: - name: Teardown images tests
block:
- name: Remove glance downloads - name: Remove glance downloads
file: file:
state: absent state: absent
@ -402,7 +407,8 @@
tags: tags:
- healthchecks-teardown-glance - healthchecks-teardown-glance
- block: - name: Teardown volumes tests
block:
- name: Detach volume if attached - name: Detach volume if attached
when: "groups['nova_all'] | length > 0" when: "groups['nova_all'] | length > 0"
openstack.cloud.server_volume: openstack.cloud.server_volume:
@ -427,7 +433,8 @@
tags: tags:
- healthchecks-teardown-cinder - healthchecks-teardown-cinder
- block: - name: Teardown heat tests
block:
- name: Remove heat downloads - name: Remove heat downloads
file: file:
path: "{{ heat_stack['dest_file'] }}" path: "{{ heat_stack['dest_file'] }}"
@ -452,7 +459,8 @@
tags: tags:
- healthchecks-teardown-heat - healthchecks-teardown-heat
- block: - name: Teardown nova tests
block:
- name: Remove nova flavor - name: Remove nova flavor
openstack.cloud.compute_flavor: openstack.cloud.compute_flavor:
cloud: default cloud: default
@ -493,7 +501,8 @@
tags: tags:
- healthchecks-teardown-nova - healthchecks-teardown-nova
- block: - name: Teardown swift tests
block:
- name: Teardown swift data - name: Teardown swift data
openstack.cloud.object: openstack.cloud.object:
cloud: default cloud: default

View File

@ -21,7 +21,7 @@
register: listening_ports register: listening_ports
changed_when: false changed_when: false
- name: create report - name: Create report
copy: copy:
content: | content: |
{% for host in ansible_play_hosts %} {% for host in ansible_play_hosts %}
@ -33,5 +33,6 @@
{% endfor %} {% endfor %}
dest: /tmp/listening_port_report.txt dest: /tmp/listening_port_report.txt
mode: "0640"
delegate_to: localhost delegate_to: localhost
run_once: true run_once: true

View File

@ -25,9 +25,11 @@
serial: "{{ memcached_serial | default(['1','100%']) }}" serial: "{{ memcached_serial | default(['1','100%']) }}"
user: root user: root
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:

View File

@ -47,7 +47,8 @@
# config file changes which causes a container/service # config file changes which causes a container/service
# restart do not cause an unexpected outage, we drain # restart do not cause an unexpected outage, we drain
# the load balancer back end for this container. # the load balancer back end for this container.
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: adjutant_api-back haproxy_backend: adjutant_api-back
haproxy_state: disabled haproxy_state: disabled
@ -55,18 +56,20 @@
- "'adjutant_api' in group_names" - "'adjutant_api' in group_names"
- "groups['adjutant_api'] | length > 1" - "groups['adjutant_api'] | length > 1"
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:
- role: "os_adjutant" - role: "os_adjutant"
post_tasks: post_tasks:
# Now that container changes are done, we can set # Now that container changes are done, we can set
# the load balancer back end for this container # the load balancer back end for this container
# to available again. # to available again.
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: adjutant_api-back haproxy_backend: adjutant_api-back
haproxy_state: enabled haproxy_state: enabled

View File

@ -43,10 +43,12 @@
tags: tags:
- aodh - aodh
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool

View File

@ -43,10 +43,12 @@
tags: tags:
- barbican - barbican
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:

View File

@ -43,10 +43,12 @@
tags: tags:
- blazar - blazar
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool

View File

@ -31,10 +31,12 @@
vars_files: vars_files:
- "defaults/{{ install_method }}_install.yml" - "defaults/{{ install_method }}_install.yml"
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:

View File

@ -48,7 +48,8 @@
# config file changes which causes a container/service # config file changes which causes a container/service
# restart do not cause an unexpected outage, we drain # restart do not cause an unexpected outage, we drain
# the load balancer back end for this container. # the load balancer back end for this container.
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: cloudkitty_api-back haproxy_backend: cloudkitty_api-back
haproxy_state: disabled haproxy_state: disabled
@ -56,22 +57,23 @@
- "'cloudkitty_api' in group_names" - "'cloudkitty_api' in group_names"
- "groups['cloudkitty_api'] | length > 1" - "groups['cloudkitty_api'] | length > 1"
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:
- role: "os_cloudkitty" - role: "os_cloudkitty"
post_tasks: post_tasks:
# Now that container changes are done, we can set # Now that container changes are done, we can set
# the load balancer back end for this container # the load balancer back end for this container
# to available again. # to available again.
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: cloudkitty_api-back haproxy_backend: cloudkitty_api-back
haproxy_state: enabled haproxy_state: enabled
when: when:
- "'cloudkitty_api' in group_names" - "'cloudkitty_api' in group_names"
- "groups['cloudkitty_api'] | length > 1" - "groups['cloudkitty_api'] | length > 1"

View File

@ -46,10 +46,12 @@
tags: tags:
- designate - designate
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:

View File

@ -47,7 +47,8 @@
# config file changes which causes a container/service # config file changes which causes a container/service
# restart do not cause an unexpected outage, we drain # restart do not cause an unexpected outage, we drain
# the load balancer back end for this container. # the load balancer back end for this container.
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: glance_api-back haproxy_backend: glance_api-back
haproxy_state: disabled haproxy_state: disabled
@ -70,7 +71,8 @@
- not is_metal - not is_metal
- (glance_default_store != "file") or (glance_remote_client is defined) - (glance_default_store != "file") or (glance_remote_client is defined)
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
@ -84,7 +86,8 @@
# Now that container changes are done, we can set # Now that container changes are done, we can set
# the load balancer back end for this container # the load balancer back end for this container
# to available again. # to available again.
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: glance_api-back haproxy_backend: glance_api-back
haproxy_state: enabled haproxy_state: enabled

View File

@ -43,14 +43,16 @@
tags: tags:
- gnocchi - gnocchi
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
vars: vars:
list_of_bind_mounts: "{{ gnocchi_container_bind_mounts }}" list_of_bind_mounts: "{{ gnocchi_container_bind_mounts }}"
when: when:
- not is_metal - not is_metal
- (gnocchi_storage_driver | default('file')) != "file" - (gnocchi_storage_driver | default('file')) != "file"
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:

View File

@ -43,10 +43,12 @@
vars_files: vars_files:
- "defaults/{{ install_method }}_install.yml" - "defaults/{{ install_method }}_install.yml"
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:

View File

@ -43,9 +43,11 @@
tags: tags:
- horizon - horizon
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:

View File

@ -43,10 +43,12 @@
tags: tags:
- ironic - ironic
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:

View File

@ -75,7 +75,8 @@
# config file changes which causes a container/service # config file changes which causes a container/service
# restart do not cause an unexpected outage, we drain # restart do not cause an unexpected outage, we drain
# the load balancer back end for this container. # the load balancer back end for this container.
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: "keystone_service-back" haproxy_backend: "keystone_service-back"
haproxy_state: disabled haproxy_state: disabled
@ -88,7 +89,8 @@
- "lxc.start.order=19" - "lxc.start.order=19"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
@ -102,7 +104,8 @@
# Now that container changes are done, we can set # Now that container changes are done, we can set
# the load balancer back end for this container # the load balancer back end for this container
# to available again. # to available again.
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: "keystone_service-back" haproxy_backend: "keystone_service-back"
haproxy_state: enabled haproxy_state: enabled
@ -122,7 +125,7 @@
tags: tags:
- keystone - keystone
tasks: tasks:
- name: refresh local facts - name: Refresh local facts
setup: setup:
filter: ansible_local filter: ansible_local
gather_subset: "!all" gather_subset: "!all"
@ -157,7 +160,7 @@
run_once: yes run_once: yes
- name: Perform a Keystone DB sync contract - name: Perform a Keystone DB sync contract
command: "{{ keystone_bin }}/keystone-manage db_sync --contract" command: "{{ keystone_bin }}/keystone-manage db_sync --contract" # noqa: no-changed-when
become: yes become: yes
become_user: "{{ keystone_system_user_name | default('keystone') }}" become_user: "{{ keystone_system_user_name | default('keystone') }}"
when: when:
@ -172,6 +175,7 @@
section: keystone section: keystone
option: "need_db_contract" option: "need_db_contract"
value: "False" value: "False"
mode: "0644"
when: when:
- "dbsync_contract is succeeded" - "dbsync_contract is succeeded"
@ -191,4 +195,3 @@
include_role: include_role:
name: os_keystone name: os_keystone
tasks_from: main_keystone_federation_sp_idp_setup.yml tasks_from: main_keystone_federation_sp_idp_setup.yml

View File

@ -46,10 +46,12 @@
tags: tags:
- magnum - magnum
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool

View File

@ -55,7 +55,8 @@
# config file changes which causes a container/service # config file changes which causes a container/service
# restart do not cause an unexpected outage, we drain # restart do not cause an unexpected outage, we drain
# the load balancer back end for this container. # the load balancer back end for this container.
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: manila-back haproxy_backend: manila-back
haproxy_state: disabled haproxy_state: disabled
@ -63,18 +64,20 @@
- "'manila_api' in group_names" - "'manila_api' in group_names"
- "groups['manila_api'] | length > 1" - "groups['manila_api'] | length > 1"
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:
- role: "os_manila" - role: "os_manila"
post_tasks: post_tasks:
# Now that container changes are done, we can set # Now that container changes are done, we can set
# the load balancer back end for this container # the load balancer back end for this container
# to available again. # to available again.
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: manila-back haproxy_backend: manila-back
haproxy_state: enabled haproxy_state: enabled
@ -93,9 +96,10 @@
- manila - manila
pre_tasks: pre_tasks:
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:
- role: "os_manila" - role: "os_manila"

View File

@ -74,7 +74,8 @@
# config file changes which causes a container/service # config file changes which causes a container/service
# restart do not cause an unexpected outage, we drain # restart do not cause an unexpected outage, we drain
# the load balancer back end for this container. # the load balancer back end for this container.
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: masakari_api-back haproxy_backend: masakari_api-back
haproxy_state: disabled haproxy_state: disabled
@ -82,10 +83,12 @@
- "'masakari_api' in group_names" - "'masakari_api' in group_names"
- "groups['masakari_api'] | length > 1" - "groups['masakari_api'] | length > 1"
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
@ -96,7 +99,8 @@
# Now that container changes are done, we can set # Now that container changes are done, we can set
# the load balancer back end for this container # the load balancer back end for this container
# to available again. # to available again.
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: masakari_api-back haproxy_backend: masakari_api-back
haproxy_state: enabled haproxy_state: enabled

View File

@ -43,10 +43,12 @@
tags: tags:
- mistral - mistral
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool

View File

@ -43,10 +43,12 @@
tags: tags:
- murano - murano
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool

View File

@ -38,7 +38,8 @@
tags: tags:
- neutron - neutron
tasks: tasks:
- import_tasks: common-tasks/dynamic-grouping.yml - name: Importing dynamic-grouping tasks
import_tasks: common-tasks/dynamic-grouping.yml
vars: vars:
src_group: "nova_compute" src_group: "nova_compute"
dest_group: "neutron_l3_agent, neutron_metadata_agent" dest_group: "neutron_l3_agent, neutron_metadata_agent"

View File

@ -43,10 +43,12 @@
tags: tags:
- octavia - octavia
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:

View File

@ -43,10 +43,12 @@
tags: tags:
- placement - placement
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:

View File

@ -33,7 +33,8 @@
meta: end_play meta: end_play
when: when:
- (not (rally_install | default(false)) | bool) - (not (rally_install | default(false)) | bool)
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:

View File

@ -41,10 +41,12 @@
tags: tags:
- sahara - sahara
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:

View File

@ -47,7 +47,8 @@
# config file changes which causes a container/service # config file changes which causes a container/service
# restart do not cause an unexpected outage, we drain # restart do not cause an unexpected outage, we drain
# the load balancer back end for this container. # the load balancer back end for this container.
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: senlin_api-back haproxy_backend: senlin_api-back
haproxy_state: disabled haproxy_state: disabled
@ -55,18 +56,20 @@
- "'senlin_api' in group_names" - "'senlin_api' in group_names"
- "groups['senlin_api'] | length > 1" - "groups['senlin_api'] | length > 1"
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:
- role: "os_senlin" - role: "os_senlin"
post_tasks: post_tasks:
# Now that container changes are done, we can set # Now that container changes are done, we can set
# the load balancer back end for this container # the load balancer back end for this container
# to available again. # to available again.
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: senlin_api-back haproxy_backend: senlin_api-back
haproxy_state: enabled haproxy_state: enabled

View File

@ -39,13 +39,15 @@
vars_files: vars_files:
- "defaults/{{ install_method }}_install.yml" - "defaults/{{ install_method }}_install.yml"
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
vars: vars:
extra_container_config_no_restart: extra_container_config_no_restart:
- "lxc.start.order=39" - "lxc.start.order=39"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool

View File

@ -43,7 +43,8 @@
tags: tags:
- tacker - tacker
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
roles: roles:
- role: "os_tacker" - role: "os_tacker"

View File

@ -46,10 +46,12 @@
tags: tags:
- trove - trove
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:

View File

@ -61,7 +61,8 @@
# config file changes which causes a container/service # config file changes which causes a container/service
# restart do not cause an unexpected outage, we drain # restart do not cause an unexpected outage, we drain
# the load balancer back end for this container. # the load balancer back end for this container.
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: zun_api-back haproxy_backend: zun_api-back
haproxy_state: disabled haproxy_state: disabled
@ -69,10 +70,12 @@
- "'zun_api' in group_names" - "'zun_api' in group_names"
- "groups['zun_api'] | length > 1" - "groups['zun_api'] | length > 1"
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
@ -83,7 +86,8 @@
# Now that container changes are done, we can set # Now that container changes are done, we can set
# the load balancer back end for this container # the load balancer back end for this container
# to available again. # to available again.
- include_tasks: common-tasks/haproxy-endpoint-manage.yml - name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars: vars:
haproxy_backend: zun_api-back haproxy_backend: zun_api-back
haproxy_state: enabled haproxy_state: enabled

View File

@ -28,13 +28,15 @@
tags: tags:
- qdrouterd - qdrouterd
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
vars: vars:
extra_container_config_no_restart: extra_container_config_no_restart:
- "lxc.start.order=19" - "lxc.start.order=19"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:

View File

@ -25,13 +25,15 @@
gather_facts: false gather_facts: false
user: root user: root
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
vars: vars:
extra_container_config_no_restart: extra_container_config_no_restart:
- "lxc.start.order=19" - "lxc.start.order=19"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
roles: roles:
@ -80,10 +82,10 @@
tasks: tasks:
- name: Create rabbitmq user for monitoring GUI - name: Create rabbitmq user for monitoring GUI
rabbitmq_user: rabbitmq_user:
user: "{{ rabbitmq_monitoring_userid|default('monitoring') }}" user: "{{ rabbitmq_monitoring_userid | default('monitoring') }}"
password: "{{ rabbitmq_monitoring_password }}" password: "{{ rabbitmq_monitoring_password }}"
tags: "{{ rabbitmq_monitoring_tag | default('monitoring') }}" tags: "{{ rabbitmq_monitoring_tag | default('monitoring') }}"
state: "present" state: "present"
no_log: true no_log: true
when: rabbitmq_monitoring_password is defined when: rabbitmq_monitoring_password is defined
environment: "{{ deployment_environment_variables | default({}) }}" environment: "{{ deployment_environment_variables | default({}) }}"

View File

@ -30,12 +30,14 @@
when: when:
- (install_method | default('source')) != "source" - (install_method | default('source')) != "source"
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
vars: vars:
list_of_bind_mounts: "{{ repo_container_bind_mounts }}" list_of_bind_mounts: "{{ repo_container_bind_mounts }}"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
environment: "{{ deployment_environment_variables | default({}) }}" environment: "{{ deployment_environment_variables | default({}) }}"

View File

@ -13,6 +13,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- import_playbook: setup-hosts.yml - name: Importing setup-hosts playbook
- import_playbook: setup-infrastructure.yml import_playbook: setup-hosts.yml
- import_playbook: setup-openstack.yml
- name: Importing setup-infrastructure playbook
import_playbook: setup-infrastructure.yml
- name: Importing setup-openstack playbook
import_playbook: setup-openstack.yml

View File

@ -13,9 +13,20 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- import_playbook: certificate-authority.yml - name: Importing certificate-authority playbook
- import_playbook: certificate-ssh-authority.yml import_playbook: certificate-authority.yml
- import_playbook: certificate-generate.yml
- import_playbook: openstack-hosts-setup.yml - name: Importing certificate-ssh-authority playbook
- import_playbook: containers-deploy.yml import_playbook: certificate-ssh-authority.yml
- import_playbook: security-hardening.yml
- name: Importing certificate-generate playbook
import_playbook: certificate-generate.yml
- name: Importing openstack-hosts-setup playbook
import_playbook: openstack-hosts-setup.yml
- name: Importing containers-deploy playbook
import_playbook: containers-deploy.yml
- name: Importing security-hardening playbook
import_playbook: security-hardening.yml

View File

@ -13,20 +13,42 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- import_playbook: unbound-install.yml - name: Importing unbound-install playbook
- import_playbook: haproxy-install.yml import_playbook: unbound-install.yml
- import_playbook: repo-install.yml
- import_playbook: memcached-install.yml - name: Importing haproxy-install playbook
- import_playbook: galera-install.yml import_playbook: haproxy-install.yml
- import_playbook: qdrouterd-install.yml
- import_playbook: rabbitmq-install.yml - name: Importing repo-install playbook
- import_playbook: utility-install.yml import_playbook: repo-install.yml
- import_playbook: zookeeper-install.yml
- import_playbook: ceph-install.yml - name: Importing memcached-install playbook
- import_playbook: ceph-nfs-install.yml import_playbook: memcached-install.yml
- name: Importing galera-install playbook
import_playbook: galera-install.yml
- name: Importing qdrouterd-install playbook
import_playbook: qdrouterd-install.yml
- name: Importing rabbitmq-install playbook
import_playbook: rabbitmq-install.yml
- name: Importing utility-install playbook
import_playbook: utility-install.yml
- name: Importing zookeeper-install playbook
import_playbook: zookeeper-install.yml
- name: Importing ceph-install playbook
import_playbook: ceph-install.yml
- name: Importing ceph-nfs-install playbook
import_playbook: ceph-nfs-install.yml
# The journald-remote should be disabled by default until # The journald-remote should be disabled by default until
# https://github.com/systemd/systemd/issues/2376 has been # https://github.com/systemd/systemd/issues/2376 has been
# incorporated in current systemd packages # incorporated in current systemd packages
- import_playbook: infra-journal-remote.yml - name: Importing infra-journal-remote playbook
import_playbook: infra-journal-remote.yml
when: journald_remote_enabled | default (false) | bool when: journald_remote_enabled | default (false) | bool

View File

@ -13,38 +13,100 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- import_playbook: os-keystone-install.yml - name: Importing os-keystone-install playbook
- import_playbook: os-barbican-install.yml import_playbook: os-keystone-install.yml
- import_playbook: os-placement-install.yml
- import_playbook: os-glance-install.yml - name: Importing os-barbican-install playbook
- import_playbook: os-cinder-install.yml import_playbook: os-barbican-install.yml
- import_playbook: os-nova-install.yml
- import_playbook: os-neutron-install.yml - name: Importing os-placement-install playbook
- import_playbook: os-heat-install.yml import_playbook: os-placement-install.yml
- import_playbook: os-horizon-install.yml
- import_playbook: os-designate-install.yml - name: Importing os-glance-install playbook
- import_playbook: os-swift-install.yml import_playbook: os-glance-install.yml
- import_playbook: os-adjutant-install.yml
- import_playbook: os-gnocchi-install.yml - name: Importing os-cinder-install playbook
- import_playbook: os-ceilometer-install.yml import_playbook: os-cinder-install.yml
- import_playbook: os-aodh-install.yml
- import_playbook: os-cloudkitty-install.yml - name: Importing os-nova-install playbook
- import_playbook: os-ironic-install.yml import_playbook: os-nova-install.yml
- import_playbook: os-magnum-install.yml
- import_playbook: os-trove-install.yml - name: Importing os-neutron-install playbook
- import_playbook: os-sahara-install.yml import_playbook: os-neutron-install.yml
- import_playbook: os-senlin-install.yml
- import_playbook: os-octavia-install.yml - name: Importing os-heat-install playbook
- import_playbook: os-tacker-install.yml import_playbook: os-heat-install.yml
- import_playbook: os-blazar-install.yml
- import_playbook: os-masakari-install.yml - name: Importing os-horizon-install playbook
- import_playbook: os-manila-install.yml import_playbook: os-horizon-install.yml
- import_playbook: os-mistral-install.yml
- import_playbook: os-murano-install.yml - name: Importing os-designate-install playbook
- import_playbook: os-zun-install.yml import_playbook: os-designate-install.yml
- name: Importing os-swift-install playbook
import_playbook: os-swift-install.yml
- name: Importing os-adjutant-install playbook
import_playbook: os-adjutant-install.yml
- name: Importing os-gnocchi-install playbook
import_playbook: os-gnocchi-install.yml
- name: Importing os-ceilometer-install playbook
import_playbook: os-ceilometer-install.yml
- name: Importing os-aodh-install playbook
import_playbook: os-aodh-install.yml
- name: Importing os-cloudkitty-install playbook
import_playbook: os-cloudkitty-install.yml
- name: Importing os-ironic-install playbook
import_playbook: os-ironic-install.yml
- name: Importing os-magnum-install playbook
import_playbook: os-magnum-install.yml
- name: Importing os-trove-install playbook
import_playbook: os-trove-install.yml
- name: Importing os-sahara-install playbook
import_playbook: os-sahara-install.yml
- name: Importing os-senlin-install playbook
import_playbook: os-senlin-install.yml
- name: Importing os-octavia-install playbook
import_playbook: os-octavia-install.yml
- name: Importing os-tacker-install playbook
import_playbook: os-tacker-install.yml
- name: Importing os-blazar-install playbook
import_playbook: os-blazar-install.yml
- name: Importing os-masakari-install playbook
import_playbook: os-masakari-install.yml
- name: Importing os-manila-install playbook
import_playbook: os-manila-install.yml
- name: Importing os-mistral-install playbook
import_playbook: os-mistral-install.yml
- name: Importing os-murano-install playbook
import_playbook: os-murano-install.yml
- name: Importing os-zun-install playbook
import_playbook: os-zun-install.yml
# This is not an OpenStack service, but integrates with Keystone and must be # This is not an OpenStack service, but integrates with Keystone and must be
# deployed afterward. # deployed afterward.
- import_playbook: ceph-rgw-install.yml - name: Importing ceph-rgw-install playbook
- import_playbook: os-tempest-install.yml import_playbook: ceph-rgw-install.yml
- import_playbook: os-rally-install.yml
- name: Importing os-tempest-install playbook
import_playbook: os-tempest-install.yml
- name: Importing os-rally-install playbook
import_playbook: os-rally-install.yml

View File

@ -25,8 +25,10 @@
serial: "{{ unbound_serial | default(['1','100%']) }}" serial: "{{ unbound_serial | default(['1','100%']) }}"
user: root user: root
pre_tasks: pre_tasks:
- include_tasks: common-tasks/os-log-dir-setup.yml - name: Including os-log-dir-setup tasks
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" 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"
when: not is_metal when: not is_metal
roles: roles:
- role: "unbound" - role: "unbound"
@ -42,7 +44,8 @@
- "{{ openstack_host_group|default('hosts') }}" - "{{ openstack_host_group|default('hosts') }}"
user: root user: root
tasks: tasks:
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
environment: "{{ deployment_environment_variables | default({}) }}" environment: "{{ deployment_environment_variables | default({}) }}"

View File

@ -40,7 +40,7 @@
mode: "0755" mode: "0755"
listen: listen:
- "venv changed" - "venv changed"
- name: Create openstack client bash_completion script - name: Create openstack client bash_completion script # noqa: no-changed-when
shell: >- shell: >-
openstack complete > /etc/bash_completion.d/openstack_client openstack complete > /etc/bash_completion.d/openstack_client
args: args:
@ -48,16 +48,19 @@
listen: listen:
- "venv changed" - "venv changed"
pre_tasks: pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - name: Including container-setup tasks
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal when: not is_metal
- include_tasks: common-tasks/os-log-dir-setup.yml - name: Including os-log-dir-setup tasks
include_tasks: common-tasks/os-log-dir-setup.yml
vars: vars:
log_dirs: log_dirs:
- src: "/openstack/log/{{ inventory_hostname }}-utility" - src: "/openstack/log/{{ inventory_hostname }}-utility"
dest: "/var/log/utility" dest: "/var/log/utility"
- include_tasks: common-tasks/unbound-clients.yml - name: Including unbound-clients tasks
include_tasks: common-tasks/unbound-clients.yml
when: when:
- hostvars['localhost']['resolvconf_enabled'] | bool - hostvars['localhost']['resolvconf_enabled'] | bool
@ -66,6 +69,7 @@
dest: "/var/log/utility" dest: "/var/log/utility"
state: "directory" state: "directory"
force: "yes" force: "yes"
mode: "0755"
when: not is_metal | bool when: not is_metal | bool
roles: roles:
@ -98,7 +102,7 @@
copy: copy:
content: "{{ utility_ssh_private_key }}" content: "{{ utility_ssh_private_key }}"
dest: /root/.ssh/id_rsa dest: /root/.ssh/id_rsa
mode: 0600 mode: "0600"
owner: root owner: root
group: root group: root
when: utility_ssh_private_key is defined when: utility_ssh_private_key is defined
@ -149,7 +153,7 @@
- name: Create list of binaries to symlink - name: Create list of binaries to symlink
set_fact: set_fact:
_openstack_client_to_symlink: >- _openstack_client_to_symlink: |-
{%- set binary_list = [] %} {%- set binary_list = [] %}
{%- for l in _openstack_client_list %} {%- for l in _openstack_client_list %}
{%- set _ = binary_list.append(l | regex_replace('^(?:python-)?(\w*)(?:client)$', '\\1')) %} {%- set _ = binary_list.append(l | regex_replace('^(?:python-)?(\w*)(?:client)$', '\\1')) %}

View File

@ -26,8 +26,10 @@
user: root user: root
environment: "{{ deployment_environment_variables | default({}) }}" environment: "{{ deployment_environment_variables | default({}) }}"
pre_tasks: pre_tasks:
- include_tasks: common-tasks/os-log-dir-setup.yml - name: Including os-log-dir-setup tasks
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" 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"
when: not is_metal when: not is_metal
vars: vars:
list_of_bind_mounts: "{{ zookeeper_container_bind_mounts }}" list_of_bind_mounts: "{{ zookeeper_container_bind_mounts }}"