Performance: use filters for service dicts

Most roles are not leveraging the jinja filters available.
According to [1] filtering the list of services makes the execution
faster than skipping the tasks.

This patchset also includes some cosmetic changes to genconfig.
Individual services are now also using a jinja filter. This has
no impact on performance, just makes the tasks look cleaner.

Naming of some vars in genconfig was changed to "service" to make
the tasks more uniform as some were previously using
the service name and some were using "service".

Three metrics from the deployment were taken and those were
- overall deployment time [s]
- time spent on the specific role [s]
- CPU usage (measured with perf) [-]
Overall genconfig time went down on avg. from 209s to 195s
Time spent on the loadbalancer role went down on avg. from 27s to 23s
Time spent on the neutron role went down on avg from 102s to 95s
Time spent on the nova-cell role went down on avg. from 54s to 52s
Also the average CPUs utilized reported by perf went down
from 3.31 to 3.15.
For details of how this was measured see the comments in gerrit.

[1] - https://github.com/stackhpc/ansible-scaling/blob/master/doc/skip.md

Change-Id: Ib0f00aadb6c7022de6e8b455ac4b9b8cd6be5b1b
Signed-off-by: Roman Krček <roman.krcek@tietoevry.com>
This commit is contained in:
Roman Krček 2024-03-30 22:22:43 +01:00
parent 6e88d3dc79
commit fb3a8f5fa9
126 changed files with 532 additions and 1449 deletions

View File

@ -9,9 +9,6 @@
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ aodh_services }}"
with_dict: "{{ aodh_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ aodh_services }}"
with_dict: "{{ aodh_services | select_services_enabled_and_mapped_to_host }}"
- name: Check if policies shall be overwritten
stat:
@ -39,9 +36,7 @@
become: true
when:
- aodh_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ aodh_services }}"
with_dict: "{{ aodh_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -55,10 +50,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ aodh_services }}"
with_dict: "{{ aodh_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -75,10 +67,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/aodh.conf"
mode: "0660"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ aodh_services }}"
with_dict: "{{ aodh_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -90,8 +79,6 @@
dest: "{{ node_config_directory }}/aodh-api/wsgi-aodh.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart aodh-api container"

View File

@ -9,9 +9,6 @@
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ barbican_services }}"
with_dict: "{{ barbican_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ barbican_services }}"
with_dict: "{{ barbican_services | select_services_enabled_and_mapped_to_host }}"
- name: Ensuring vassals config directories exist
vars:
@ -22,9 +19,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_items:
- "barbican-api/vassals"
@ -57,10 +52,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ barbican_services }}"
with_dict: "{{ barbican_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -75,9 +67,7 @@
dest: "{{ node_config_directory }}/barbican-api/vassals/barbican-api.ini"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart barbican-api container
@ -89,9 +79,7 @@
run_once: True
delegate_to: localhost
register: check_barbican_api_paste_ini
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
- name: Copying over barbican-api-paste.ini
vars:
@ -102,8 +90,7 @@
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
- check_barbican_api_paste_ini.stat.exists
notify:
- Restart barbican-api container
@ -121,10 +108,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/barbican.conf"
mode: "0660"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ barbican_services }}"
with_dict: "{{ barbican_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -136,8 +120,6 @@
become: true
when:
- barbican_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ barbican_services }}"
with_dict: "{{ barbican_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container

View File

@ -9,9 +9,6 @@
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ blazar_services }}"
with_dict: "{{ blazar_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ blazar_services }}"
with_dict: "{{ blazar_services | select_services_enabled_and_mapped_to_host }}"
- name: Check if policies shall be overwritten
stat:
@ -41,10 +38,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ blazar_services }}"
with_dict: "{{ blazar_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -61,10 +55,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/blazar.conf"
mode: "0660"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ blazar_services }}"
with_dict: "{{ blazar_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -76,8 +67,6 @@
become: true
when:
- blazar_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ blazar_services }}"
with_dict: "{{ blazar_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container

View File

@ -10,9 +10,6 @@
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ceilometer_services }}"
with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ceilometer_services }}"
with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}"
- name: Check if the folder for custom meter definitions exist
stat:
@ -42,11 +39,9 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
with_dict: "{{ ceilometer_services }}"
with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}"
when:
- should_copy_custom_meter_definitions
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
- name: Copying custom meter definitions to Ceilometer
copy:
@ -57,9 +52,7 @@
become: true
when:
- should_copy_custom_meter_definitions
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ceilometer_services }}"
with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -118,9 +111,7 @@
become: true
when:
- ceilometer_polling_file.stat.exists
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ceilometer_services }}"
with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -145,9 +136,7 @@
become: true
when:
- ceilometer_gnocchi_resources_file.stat.exists
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ceilometer_services }}"
with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -186,10 +175,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ceilometer_services }}"
with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -206,10 +192,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/ceilometer.conf"
mode: "0660"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ ceilometer_services }}"
with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -231,8 +214,7 @@
register: ceilometer_event_definitions_overwriting
when:
- ceilometer_event_definitions_file.stat.exists
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
notify:
- Restart ceilometer-notification container
@ -246,8 +228,7 @@
become: true
register: ceilometer_event_definitions
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
- not ceilometer_event_definitions_file.stat.exists
notify:
- Restart ceilometer-notification container
@ -263,9 +244,7 @@
dest: "{{ node_config_directory }}/ceilometer-notification/event_pipeline.yaml"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart ceilometer-notification container
@ -290,10 +269,8 @@
register: ceilometer_pipeline_overwriting
when:
- ceilometer_pipeline_file.stat.exists
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
- item.key in services_require_pipeline
with_dict: "{{ ceilometer_services }}"
with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -309,11 +286,9 @@
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
- item.key in services_require_pipeline
- not ceilometer_pipeline_file.stat.exists
with_dict: "{{ ceilometer_services }}"
with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -328,8 +303,7 @@
when:
- nova_compute_virt_type == "vmware"
- not vmware_vcenter_insecure | bool
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
notify:
- Restart ceilometer-compute container
@ -341,8 +315,6 @@
become: true
when:
- ceilometer_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ceilometer_services }}"
with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -12,9 +12,6 @@
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
privileged: "{{ item.value.privileged | default(False) }}"
ipc_mode: "{{ item.value.ipc_mode | default('') }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ cinder_services }}"
with_dict: "{{ cinder_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ cinder_services }}"
with_dict: "{{ cinder_services | select_services_enabled_and_mapped_to_host }}"
- include_tasks: external_ceph.yml
when:
@ -47,10 +44,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ cinder_services }}"
with_dict: "{{ cinder_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -66,9 +60,7 @@
- "{{ node_custom_config }}/cinder/{{ inventory_hostname }}/cinder-wsgi.conf"
- "{{ node_custom_config }}/cinder/cinder-wsgi.conf"
- "cinder-wsgi.conf.j2"
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart cinder-api container
@ -85,10 +77,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/cinder.conf"
mode: "0660"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ cinder_services }}"
with_dict: "{{ cinder_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -101,9 +90,7 @@
dest: "{{ node_config_directory }}/cinder-volume/hostnqn"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart cinder-volume container
@ -114,14 +101,14 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ cinder_policy_file }}"
mode: "0660"
when:
- item.value.enabled | bool
- cinder_policy_file is defined
- inventory_hostname in groups[item.value.group]
with_dict: "{{ cinder_services }}"
with_dict: "{{ cinder_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
- name: Copying over nfs_shares files for cinder_volume
vars:
service: "{{ cinder_services['cinder-volume'] }}"
become: true
template:
src: "{{ item }}"
@ -138,6 +125,6 @@
- "{{ node_custom_config }}/cinder/cinder-volume/nfs_shares"
- "{{ node_custom_config }}/cinder/{{ inventory_hostname }}/nfs_shares"
skip: "{{ not enable_cinder_backend_nfs | bool and not enable_cinder_backend_hnas_nfs | bool }}"
when: inventory_hostname in groups['cinder-volume']
when: service | service_enabled_and_mapped_to_host
notify:
- Restart cinder-volume container

View File

@ -9,9 +9,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_items:
- "cinder-volume"
- "cinder-backup"
@ -32,8 +30,7 @@
mode: "0660"
become: true
when:
- service.enabled | bool
- inventory_hostname in groups[service.group]
- service | service_enabled_and_mapped_to_host
- service_name in services_need_config
with_nested:
- "{{ cinder_services | dict2items }}"
@ -44,6 +41,7 @@
- name: Copy over Ceph keyring files for cinder-volume
vars:
keyring: "{{ item.cluster }}.{{ ceph_cinder_keyring }}"
service: "{{ cinder_services['cinder-volume'] }}"
template:
src: "{{ node_custom_config }}/cinder/cinder-volume/{{ keyring }}"
dest: "{{ node_config_directory }}/cinder-volume/ceph/{{ keyring }}"
@ -52,12 +50,13 @@
with_items: "{{ cinder_ceph_backends }}"
when:
- external_ceph_cephx_enabled | bool
- inventory_hostname in groups['cinder-volume']
- cinder_services['cinder-volume'].enabled | bool
- service | service_enabled_and_mapped_to_host
notify:
- Restart cinder-volume container
- name: Copy over Ceph keyring files for cinder-backup
vars:
service: "{{ cinder_services['cinder-backup'] }}"
template:
src: "{{ node_custom_config }}/cinder/cinder-backup/{{ item }}"
dest: "{{ node_config_directory }}/cinder-backup/ceph/{{ item }}"
@ -69,8 +68,7 @@
- "{{ cinder_backup_ceph_backend.cluster }}.{{ ceph_cinder_backup_keyring }}"
when:
- external_ceph_cephx_enabled | bool
- inventory_hostname in groups['cinder-backup']
- cinder_services['cinder-backup'].enabled | bool
- service | service_enabled_and_mapped_to_host
notify:
- Restart cinder-backup container

View File

@ -9,9 +9,6 @@
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ cloudkitty_services }}"
with_dict: "{{ cloudkitty_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ cloudkitty_services }}"
with_dict: "{{ cloudkitty_services | select_services_enabled_and_mapped_to_host }}"
- name: Check if policies shall be overwritten
stat:
@ -45,9 +42,7 @@
become: true
when:
- cloudkitty_custom_metrics_file.stat.exists
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ cloudkitty_services }}"
with_dict: "{{ cloudkitty_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -65,10 +60,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ cloudkitty_services }}"
with_dict: "{{ cloudkitty_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -85,10 +77,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/cloudkitty.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ cloudkitty_services }}"
with_dict: "{{ cloudkitty_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -100,9 +89,7 @@
dest: "{{ node_config_directory }}/cloudkitty-api/wsgi-cloudkitty.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart cloudkitty-api container
@ -114,8 +101,6 @@
become: true
when:
- cloudkitty_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ cloudkitty_services }}"
with_dict: "{{ cloudkitty_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container

View File

@ -9,9 +9,6 @@
privileged: "{{ item.value.privileged | default(False) }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ collectd_services }}"
with_dict: "{{ collectd_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ collectd_services }}"
with_dict: "{{ collectd_services | select_services_enabled_and_mapped_to_host }}"
- name: Ensuring Plugin directory exist
file:
@ -20,10 +17,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ collectd_services }}"
with_dict: "{{ collectd_services | select_services_enabled_and_mapped_to_host }}"
- name: Copying over config.json files for services
template:
@ -31,10 +25,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ collectd_services }}"
with_dict: "{{ collectd_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart collectd container
@ -51,8 +42,6 @@
- "{{ node_custom_config }}/collectd/collectd.conf"
- "{{ node_custom_config }}/collectd.conf"
- "collectd.conf.j2"
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart collectd container

View File

@ -10,8 +10,6 @@
dimensions: "{{ item.value.dimensions }}"
privileged: "{{ item.value.privileged | default(False) }}"
environment: "{{ item.value.environment }}"
when:
- item.value | service_enabled_and_mapped_to_host
with_dict: "{{ common_services }}"
with_dict: "{{ common_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -96,8 +96,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when: item.value | service_enabled_and_mapped_to_host
with_dict: "{{ common_services }}"
with_dict: "{{ common_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -289,9 +288,8 @@
mode: "0770"
ignore_errors: "{{ ansible_check_mode }}"
when:
- item.value | service_enabled_and_mapped_to_host
- item.key != "kolla-toolbox"
with_dict: "{{ common_services }}"
with_dict: "{{ common_services | select_services_enabled_and_mapped_to_host }}"
- name: Copy rabbitmq-env.conf to kolla toolbox
template:

View File

@ -10,9 +10,6 @@
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ cyborg_services }}"
with_dict: "{{ cyborg_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ cyborg_services }}"
with_dict: "{{ cyborg_services | select_services_enabled_and_mapped_to_host }}"
- name: Check if policies shall be overwritten
stat:
@ -39,9 +36,7 @@
become: true
when:
- cyborg_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ cyborg_services }}"
with_dict: "{{ cyborg_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -55,10 +50,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ cyborg_services }}"
with_dict: "{{ cyborg_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -75,10 +67,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/cyborg.conf"
mode: "0660"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ cyborg_services }}"
with_dict: "{{ cyborg_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -92,8 +81,6 @@
dest: "{{ node_config_directory }}/cyborg-api/api-paste.ini"
mode: "0660"
become: true
when:
- inventory_hostname in groups['cyborg-api']
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart cyborg-api container

View File

@ -8,9 +8,7 @@
when:
- designate_backend_external == 'bind9'
- item.key in [ "designate-worker" ]
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
with_dict: "{{ designate_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -23,8 +21,6 @@
when:
- designate_backend_external == 'bind9'
- item.key in [ "designate-worker" ]
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
with_dict: "{{ designate_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container

View File

@ -9,9 +9,6 @@
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
with_dict: "{{ designate_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
with_dict: "{{ designate_services | select_services_enabled_and_mapped_to_host }}"
- name: Check if policies shall be overwritten
stat:
@ -41,10 +38,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
with_dict: "{{ designate_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -61,10 +55,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/designate.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
with_dict: "{{ designate_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -76,9 +67,7 @@
dest: "{{ node_config_directory }}/designate-worker/pools.yaml"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_first_found:
- "{{ node_custom_config }}/designate/pools.yaml"
- "{{ role_path }}/templates/pools.yaml.j2"
@ -95,8 +84,7 @@
become: true
when:
- designate_backend == 'bind9'
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
with_first_found:
- "{{ node_custom_config }}/designate/designate-backend-bind9/{{ inventory_hostname }}/named.conf"
- "{{ node_custom_config }}/designate/designate-backend-bind9/named.conf"
@ -114,9 +102,7 @@
when:
- designate_backend == 'bind9' and designate_backend_external == 'no'
- item.key in [ "designate-backend-bind9", "designate-worker" ]
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
with_dict: "{{ designate_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -129,9 +115,7 @@
when:
- designate_backend == 'bind9' and designate_backend_external == 'no'
- item.key in [ "designate-backend-bind9", "designate-worker" ]
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
with_dict: "{{ designate_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -146,8 +130,6 @@
become: true
when:
- designate_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
with_dict: "{{ designate_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container

View File

@ -9,9 +9,6 @@
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
environment: "{{ item.value.environment }}"
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ etcd_services }}"
with_dict: "{{ etcd_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ etcd_services }}"
with_dict: "{{ etcd_services | select_services_enabled_and_mapped_to_host }}"
- name: Copying over config.json files for services
template:
@ -18,10 +15,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ etcd_services }}"
with_dict: "{{ etcd_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container

View File

@ -11,9 +11,6 @@
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- item.value.host_in_groups | bool
- item.value.enabled | bool
with_dict: "{{ glance_services }}"
with_dict: "{{ glance_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- item.value.host_in_groups | bool
- item.value.enabled | bool
with_dict: "{{ glance_services }}"
with_dict: "{{ glance_services | select_services_enabled_and_mapped_to_host }}"
- include_tasks: external_ceph.yml
when:
@ -41,7 +38,7 @@
- name: Creating TLS backend PEM File
vars:
glance_tls_proxy: "{{ glance_services['glance-tls-proxy'] }}"
service: "{{ glance_services['glance-tls-proxy'] }}"
assemble:
src: "{{ node_config_directory }}/glance-tls-proxy/"
dest: "{{ node_config_directory }}/glance-tls-proxy/glance-cert-and-key.pem"
@ -49,9 +46,7 @@
regexp: "^glance-(cert|key)\\.pem$"
remote_src: true
become: true
when:
- glance_tls_proxy.enabled | bool
- glance_tls_proxy.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
- name: Copying over config.json files for services
template:
@ -59,16 +54,13 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- item.value.enabled | bool
- item.value.host_in_groups | bool
with_dict: "{{ glance_services }}"
with_dict: "{{ glance_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
- name: Copying over glance-api.conf
vars:
glance_api: "{{ glance_services['glance-api'] }}"
service: "{{ glance_services['glance-api'] }}"
merge_configs:
sources:
- "{{ role_path }}/templates/glance-api.conf.j2"
@ -79,15 +71,13 @@
dest: "{{ node_config_directory }}/glance-api/glance-api.conf"
mode: "0660"
become: true
when:
- glance_api.enabled | bool
- glance_api.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart glance-api container
- name: Copying over glance-cache.conf for glance_api
vars:
glance_api: "{{ glance_services['glance-api'] }}"
service: "{{ glance_services['glance-api'] }}"
merge_configs:
sources:
- "{{ role_path }}/templates/glance-cache.conf.j2"
@ -98,15 +88,14 @@
mode: "0660"
become: true
when:
- glance_api.enabled | bool
- glance_api.host_in_groups | bool
- service | service_enabled_and_mapped_to_host
- enable_glance_image_cache | bool
notify:
- Restart glance-api container
- name: Copying over glance-swift.conf for glance_api
vars:
glance_api: "{{ glance_services['glance-api'] }}"
service: "{{ glance_services['glance-api'] }}"
merge_configs:
sources:
- "{{ role_path }}/templates/glance-swift.conf.j2"
@ -117,45 +106,42 @@
mode: "0660"
become: true
when:
- glance_api.enabled | bool
- glance_api.host_in_groups | bool
- service | service_enabled_and_mapped_to_host
- glance_backend_swift | bool
notify:
- Restart glance-api container
- name: Copying over glance-image-import.conf
vars:
glance_api: "{{ glance_services['glance-api'] }}"
service: "{{ glance_services['glance-api'] }}"
copy:
src: "{{ node_custom_config }}/glance/glance-image-import.conf"
dest: "{{ node_config_directory }}/glance-api/glance-image-import.conf"
mode: "0660"
become: true
when:
- glance_api.enabled | bool
- inventory_hostname in groups[glance_api.group]
- service | service_enabled_and_mapped_to_host
- glance_enable_interoperable_image_import | bool
notify:
- Restart glance-api container
- name: Copying over property-protections-rules.conf
vars:
glance_api: "{{ glance_services['glance-api'] }}"
service: "{{ glance_services['glance-api'] }}"
copy:
src: "{{ node_custom_config }}/glance/property-protections-rules.conf"
dest: "{{ node_config_directory }}/glance-api/property-protections-rules.conf"
mode: "0660"
become: true
when:
- glance_api.enabled | bool
- inventory_hostname in groups[glance_api.group]
- service | service_enabled_and_mapped_to_host
- glance_enable_property_protection | bool
notify:
- Restart glance-api container
- name: Copying over existing policy file
vars:
glance_api: "{{ glance_services['glance-api'] }}"
service: "{{ glance_services['glance-api'] }}"
template:
src: "{{ glance_policy_file_path }}"
dest: "{{ node_config_directory }}/glance-api/{{ glance_policy_file }}"
@ -163,14 +149,13 @@
become: true
when:
- glance_policy_file is defined
- glance_api.host_in_groups | bool
- glance_api.enabled | bool
- service | service_enabled_and_mapped_to_host
notify:
- Restart glance-api container
- name: Copying over glance-haproxy-tls.cfg
vars:
glance_tls_proxy: "{{ glance_services['glance-tls-proxy'] }}"
service: "{{ glance_services['glance-tls-proxy'] }}"
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/glance-tls-proxy/glance-tls-proxy.cfg"
@ -180,8 +165,6 @@
- "{{ node_custom_config }}/glance/{{ inventory_hostname }}/glance-tls-proxy.cfg"
- "{{ node_custom_config }}/glance/glance-tls-proxy.cfg"
- "glance-tls-proxy.cfg.j2"
when:
- glance_tls_proxy.enabled | bool
- glance_tls_proxy.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart glance-tls-proxy container

View File

@ -9,9 +9,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
- name: Copy over multiple ceph configs for Glance
merge_configs:

View File

@ -14,6 +14,8 @@
register: container_facts
- name: Checking free port for Glance API
vars:
service: "{{ glance_services['glance-api'] }}"
wait_for:
host: "{{ api_interface_address }}"
port: "{{ glance_api_listen_port }}"
@ -21,8 +23,7 @@
timeout: 1
state: stopped
when:
- glance_services['glance-api'].host_in_groups | bool
- glance_services['glance-api'].enabled | bool
- service | service_enabled_and_mapped_to_host
- container_facts['glance_api'] is not defined
- name: Check if S3 configurations are defined

View File

@ -1,12 +1,10 @@
---
- name: Stop glance service
vars:
glance_api: "{{ glance_services['glance-api'] }}"
service: "{{ glance_services['glance-api'] }}"
become: true
kolla_container:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "{{ glance_api.container_name }}"
when:
- glance_api.host_in_groups | bool
- glance_api.enabled | bool
name: "{{ service.container_name }}"
when: service | service_enabled_and_mapped_to_host

View File

@ -9,9 +9,6 @@
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ gnocchi_services }}"
with_dict: "{{ gnocchi_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ gnocchi_services }}"
with_dict: "{{ gnocchi_services | select_services_enabled_and_mapped_to_host }}"
- include_tasks: external_ceph.yml
when:
@ -45,10 +42,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ gnocchi_services }}"
with_dict: "{{ gnocchi_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -65,10 +59,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/gnocchi.conf"
mode: "0660"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ gnocchi_services }}"
with_dict: "{{ gnocchi_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -80,9 +71,7 @@
dest: "{{ node_config_directory }}/{{ item }}/wsgi-gnocchi.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups['gnocchi-api']
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_items:
- "gnocchi-api"
notify:
@ -96,8 +85,6 @@
become: true
when:
- gnocchi_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ gnocchi_services }}"
with_dict: "{{ gnocchi_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
with_dict: "{{ gnocchi_services }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ gnocchi_services | select_services_enabled_and_mapped_to_host }}"
- name: Copy over ceph config for Gnocchi
merge_configs:
@ -20,10 +17,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/ceph/{{ gnocchi_ceph_cluster }}.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ gnocchi_services }}"
with_dict: "{{ gnocchi_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -33,10 +27,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/ceph/{{ gnocchi_ceph_cluster }}.{{ ceph_gnocchi_keyring }}"
mode: "0660"
become: true
with_dict: "{{ gnocchi_services }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ gnocchi_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -47,7 +38,4 @@
recurse: yes
owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ gnocchi_services }}"
with_dict: "{{ gnocchi_services | select_services_enabled_and_mapped_to_host }}"

View File

@ -8,9 +8,6 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ grafana_services }}"
with_dict: "{{ grafana_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ grafana_services }}"
with_dict: "{{ grafana_services | select_services_enabled_and_mapped_to_host }}"
- name: Check if extra configuration file exists
find:
@ -30,10 +27,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ grafana_services }}"
with_dict: "{{ grafana_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -48,10 +42,7 @@
dest: "{{ node_config_directory }}/grafana/grafana.ini"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ grafana_services }}"
with_dict: "{{ grafana_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -94,8 +85,7 @@
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
- enable_prometheus | bool
with_first_found:
- "{{ node_custom_config }}/grafana/{{ inventory_hostname }}/prometheus.yaml"
@ -112,9 +102,7 @@
dest: "{{ node_config_directory }}/grafana/provisioning.yaml"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_first_found:
- "{{ node_custom_config }}/grafana/{{ inventory_hostname }}/provisioning.yaml"
- "{{ node_custom_config }}/grafana/provisioning.yaml"
@ -136,9 +124,7 @@
file:
state: absent
path: "{{ node_config_directory }}/grafana/dashboards/"
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
- name: Copying over custom dashboards
vars:
@ -151,7 +137,6 @@
when:
- grafana_custom_dashboards_folder.stat.exists
- grafana_custom_dashboards_folder.stat.isdir
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
notify:
- Restart grafana container

View File

@ -10,7 +10,7 @@
- name: Ensure remote node is added
vars:
pacemaker_service: "{{ hacluster_services['hacluster-pacemaker'] }}"
pacemaker_remote_service: "{{ hacluster_services['hacluster-pacemaker-remote'] }}"
service: "{{ hacluster_services['hacluster-pacemaker-remote'] }}"
shell: >
{{ kolla_container_engine }} exec {{ pacemaker_service.container_name }}
cibadmin --modify --scope resources -X '
@ -27,6 +27,4 @@
'
become: true
delegate_to: "{{ groups[pacemaker_service.group][0] }}"
when:
- inventory_hostname in groups[pacemaker_remote_service.group]
- pacemaker_remote_service.enabled | bool
when: service | service_enabled_and_mapped_to_host

View File

@ -7,10 +7,7 @@
owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}"
mode: "0770"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ hacluster_services }}"
with_dict: "{{ hacluster_services | select_services_enabled_and_mapped_to_host }}"
- name: Copying over config.json files for services
become: true
@ -19,10 +16,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
register: config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ hacluster_services }}"
with_dict: "{{ hacluster_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -34,9 +28,7 @@
dest: "{{ node_config_directory }}/hacluster-corosync/corosync.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_first_found:
- "{{ node_custom_config }}/hacluster-corosync/{{ inventory_hostname }}/corosync.conf"
- "{{ node_custom_config }}/hacluster-corosync/corosync.conf"
@ -52,9 +44,7 @@
dest: "{{ node_config_directory }}/hacluster-corosync/authkey"
mode: "0600"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_first_found:
- "{{ node_custom_config }}/hacluster-corosync/{{ inventory_hostname }}/authkey"
- "{{ node_custom_config }}/hacluster-corosync/authkey"
@ -69,9 +59,7 @@
dest: "{{ node_config_directory }}//hacluster-pacemaker/authkey"
mode: "0600"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_first_found:
- "{{ node_custom_config }}/hacluster-pacemaker/{{ inventory_hostname }}/authkey"
- "{{ node_custom_config }}/hacluster-pacemaker/authkey"
@ -86,9 +74,7 @@
dest: "{{ node_config_directory }}/hacluster-pacemaker-remote/authkey"
mode: "0600"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_first_found:
- "{{ node_custom_config }}/hacluster-pacemaker/{{ inventory_hostname }}/authkey"
- "{{ node_custom_config }}/hacluster-pacemaker/authkey"

View File

@ -9,9 +9,6 @@
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ heat_services }}"
with_dict: "{{ heat_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}"
mode: "0770"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ heat_services }}"
with_dict: "{{ heat_services | select_services_enabled_and_mapped_to_host }}"
- name: Check if policies shall be overwritten
stat:
@ -41,10 +38,7 @@
src: "{{ item.key }}.json.j2"
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ heat_services }}"
with_dict: "{{ heat_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -61,10 +55,7 @@
- "{{ node_custom_config }}/heat/{{ inventory_hostname }}/heat.conf"
dest: "{{ node_config_directory }}/{{ item.key }}/heat.conf"
mode: "0660"
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ heat_services }}"
with_dict: "{{ heat_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -76,9 +67,7 @@
mode: "0660"
when:
- heat_policy_file is defined
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ heat_services }}"
with_dict: "{{ heat_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -90,9 +79,7 @@
dest: "{{ node_config_directory }}/heat-api/wsgi-heat-api.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service['group']]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart heat-api container
@ -104,8 +91,6 @@
dest: "{{ node_config_directory }}/heat-api-cfn/wsgi-heat-api-cfn.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service['group']]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart heat-api-cfn container

View File

@ -1,20 +1,15 @@
---
- name: Deploy horizon container
vars:
horizon: "{{ horizon_services['horizon'] }}"
become: true
kolla_container:
action: "compare_container"
common_options: "{{ docker_common_options }}"
name: "{{ horizon.container_name }}"
image: "{{ horizon.image }}"
environment: "{{ horizon.environment }}"
volumes: "{{ horizon.volumes }}"
dimensions: "{{ horizon.dimensions }}"
healthcheck: "{{ horizon.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[horizon.group]
- horizon.enabled | bool
with_dict: "{{ horizon_services }}"
name: "{{ item.value.container_name }}"
image: "{{ item.value.image }}"
environment: "{{ item.value.environment }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
with_dict: "{{ horizon_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}"
mode: "0770"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ horizon_services }}"
with_dict: "{{ horizon_services | select_services_enabled_and_mapped_to_host }}"
- name: Set empty custom policy
set_fact:
@ -43,21 +40,19 @@
- name: Copying over config.json files for services
become: true
vars:
horizon: "{{ horizon_services['horizon'] }}"
service: "{{ horizon_services['horizon'] }}"
template:
src: "horizon.json.j2"
dest: "{{ node_config_directory }}/horizon/config.json"
mode: "0660"
when:
- horizon.enabled | bool
- inventory_hostname in groups[horizon.group]
when: service | service_enabled_and_mapped_to_host
notify:
- Restart horizon container
- name: Copying over horizon.conf
become: true
vars:
horizon: "{{ horizon_services['horizon'] }}"
service: "{{ horizon_services['horizon'] }}"
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/horizon/horizon.conf"
@ -66,16 +61,14 @@
- "{{ node_custom_config }}/horizon/{{ inventory_hostname }}/horizon.conf"
- "{{ node_custom_config }}/horizon/horizon.conf"
- "horizon.conf.j2"
when:
- horizon.enabled | bool
- inventory_hostname in groups[horizon.group]
when: service | service_enabled_and_mapped_to_host
notify:
- Restart horizon container
- name: Copying over kolla-settings.py
become: true
vars:
horizon: "{{ horizon_services['horizon'] }}"
service: "{{ horizon_services['horizon'] }}"
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/horizon/_9998-kolla-settings.py"
@ -84,16 +77,14 @@
- "{{ node_custom_config }}/horizon/{{ inventory_hostname }}/_9998-kolla-settings.py"
- "{{ node_custom_config }}/horizon/_9998-kolla-settings.py"
- "_9998-kolla-settings.py.j2"
when:
- horizon.enabled | bool
- inventory_hostname in groups[horizon.group]
when: service | service_enabled_and_mapped_to_host
notify:
- Restart horizon container
- name: Copying over custom-settings.py
become: true
vars:
horizon: "{{ horizon_services['horizon'] }}"
service: "{{ horizon_services['horizon'] }}"
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/horizon/_9999-custom-settings.py"
@ -102,23 +93,19 @@
- "{{ node_custom_config }}/horizon/{{ inventory_hostname }}/_9999-custom-settings.py"
- "{{ node_custom_config }}/horizon/_9999-custom-settings.py"
- "_9999-custom-settings.py.j2"
when:
- horizon.enabled | bool
- inventory_hostname in groups[horizon.group]
when: service | service_enabled_and_mapped_to_host
notify:
- Restart horizon container
- name: Copying over existing policy file
become: true
vars:
horizon: "{{ horizon_services['horizon'] }}"
service: "{{ horizon_services['horizon'] }}"
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/horizon/{{ item | basename }}"
mode: "0660"
when:
- horizon.enabled | bool
- inventory_hostname in groups[horizon.group]
when: service | service_enabled_and_mapped_to_host
with_items: "{{ custom_policy }}"
notify:
- Restart horizon container
@ -126,14 +113,13 @@
- name: Copying over custom themes
become: true
vars:
horizon: "{{ horizon_services['horizon'] }}"
service: "{{ horizon_services['horizon'] }}"
copy:
src: "{{ node_custom_config }}/horizon/themes/{{ item.name }}"
dest: "{{ node_config_directory }}/horizon/themes/"
mode: 0660
when:
- horizon.enabled | bool
- inventory_hostname in groups[horizon.group]
- service | service_enabled_and_mapped_to_host
- horizon_custom_themes | length > 0
with_items: "{{ horizon_custom_themes }}"
notify:

View File

@ -8,9 +8,6 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ influxdb_services }}"
with_dict: "{{ influxdb_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ influxdb_services }}"
with_dict: "{{ influxdb_services | select_services_enabled_and_mapped_to_host }}"
- name: Copying over config.json files
template:
@ -18,10 +15,7 @@
dest: "{{ node_config_directory }}/influxdb/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ influxdb_services }}"
with_dict: "{{ influxdb_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart influxdb container
@ -33,9 +27,7 @@
dest: "{{ node_config_directory }}/influxdb/influxdb.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_first_found:
- "{{ node_custom_config }}/influxdb/{{ inventory_hostname }}/influxdb.conf"
- "{{ node_custom_config }}/influxdb.conf"

View File

@ -47,7 +47,7 @@
- name: Running ironic-tftp bootstrap container
vars:
ironic_tftp: "{{ ironic_services['ironic-tftp'] }}"
service: "{{ ironic_services['ironic-tftp'] }}"
become: true
kolla_container:
action: "start_container"
@ -58,12 +58,10 @@
HTTPBOOT_PATH: /var/lib/ironic/httpboot
KOLLA_BOOTSTRAP:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
image: "{{ ironic_tftp.image }}"
image: "{{ service.image }}"
labels:
BOOTSTRAP:
name: "bootstrap_ironic_tftp"
restart_policy: oneshot
volumes: "{{ ironic_tftp.volumes }}"
when:
- inventory_hostname in groups[ironic_tftp.group]
- ironic_tftp.enabled | bool
volumes: "{{ service.volumes }}"
when: service | service_enabled_and_mapped_to_host

View File

@ -12,9 +12,6 @@
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ironic_services }}"
with_dict: "{{ ironic_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ironic_services }}"
with_dict: "{{ ironic_services | select_services_enabled_and_mapped_to_host }}"
- name: Check if Ironic policies shall be overwritten
stat:
@ -60,10 +57,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ironic_services }}"
with_dict: "{{ ironic_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -82,9 +76,7 @@
become: true
when:
- item.key in [ "ironic-api", "ironic-conductor", "ironic-prometheus-exporter" ]
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ironic_services }}"
with_dict: "{{ ironic_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -101,9 +93,7 @@
dest: "{{ node_config_directory }}/ironic-inspector/inspector.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart ironic-inspector container
@ -115,9 +105,7 @@
dest: "{{ node_config_directory }}/ironic-dnsmasq/dnsmasq.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_first_found:
- "{{ node_custom_config }}/ironic/ironic-dnsmasq.conf"
- "{{ node_custom_config }}/ironic/{{ inventory_hostname }}/ironic-dnsmasq.conf"
@ -140,8 +128,7 @@
when:
# Only required when Ironic inspector is in use.
- groups['ironic-inspector'] | length > 0
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
- not ironic_dnsmasq_serve_ipxe | bool
notify:
- Restart ironic-tftp container
@ -160,8 +147,7 @@
when:
# Only required when Ironic inspector is in use.
- groups['ironic-inspector'] | length > 0
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
- not ironic_dnsmasq_serve_ipxe | bool
notify:
- Restart ironic-tftp container
@ -180,8 +166,7 @@
when:
# Only required when Ironic inspector is in use.
- groups['ironic-inspector'] | length > 0
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
notify:
- Restart ironic-http container
@ -200,8 +185,7 @@
when:
# Only required when Ironic inspector is in use.
- groups['ironic-inspector'] | length > 0
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
notify:
- Restart ironic-http container
@ -216,9 +200,7 @@
with_first_found:
- "{{ node_custom_config }}/ironic/ironic-http-httpd.conf"
- "ironic-http-httpd.conf.j2"
when:
- service.enabled | bool
- inventory_hostname in groups[service.group]
when: service | service_enabled_and_mapped_to_host
notify:
- Restart ironic-http container
@ -234,9 +216,7 @@
- "{{ node_config_directory }}/ironic/{{ inventory_hostname }}/ironic-prometheus-exporter-wsgi.conf"
- "{{ node_config_directory }}/ironic/ironic-prometheus-exporter-wsgi.conf"
- "ironic-prometheus-exporter-wsgi.conf.j2"
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart ironic-prometheus-exporter container"
@ -253,9 +233,7 @@
when:
- ironic_policy_file is defined
- item.key in services_require_policy_json
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ironic_services }}"
with_dict: "{{ ironic_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -271,20 +249,18 @@
when:
- ironic_inspector_policy_file is defined
- item.key in services_require_inspector_policy_json
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ironic_services }}"
with_dict: "{{ ironic_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
- name: Copying over ironic-api-wsgi.conf
vars:
service: "{{ ironic_services['ironic-api'] }}"
template:
src: "ironic-api-wsgi.conf.j2"
dest: "{{ node_config_directory }}/ironic-api/ironic-api-wsgi.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups["ironic-api"]
- ironic_services["ironic-api"].enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart ironic-api container"

View File

@ -10,9 +10,6 @@
privileged: "{{ item.value.privileged | default(False) }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ iscsi_services }}"
with_dict: "{{ iscsi_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ iscsi_services }}"
with_dict: "{{ iscsi_services | select_services_enabled_and_mapped_to_host }}"
- name: Copying over config.json files for services
template:
@ -18,9 +15,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ iscsi_services }}"
with_dict: "{{ iscsi_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -9,9 +9,6 @@
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ keystone_services }}"
with_dict: "{{ keystone_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ keystone_services }}"
with_dict: "{{ keystone_services | select_services_enabled_and_mapped_to_host }}"
- name: Check if policies shall be overwritten
stat:
@ -48,10 +45,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
with_dict: "{{ keystone_services }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ keystone_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -68,39 +62,34 @@
dest: "{{ node_config_directory }}/{{ item.key }}/keystone.conf"
mode: "0660"
become: true
with_dict: "{{ keystone_services }}"
with_dict: "{{ keystone_services | select_services_enabled_and_mapped_to_host }}"
when:
- inventory_hostname in groups[item.value.group]
- item.key in [ "keystone", "keystone-fernet" ]
- item.value.enabled | bool
notify:
- Restart {{ item.key }} container
- name: Copying keystone-startup script for keystone
vars:
keystone: "{{ keystone_services['keystone'] }}"
service: "{{ keystone_services['keystone'] }}"
template:
src: "keystone-startup.sh.j2"
dest: "{{ node_config_directory }}/keystone/keystone-startup.sh"
mode: "0660"
become: true
when:
- inventory_hostname in groups[keystone.group]
- keystone.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart keystone container
- name: Create Keystone domain-specific config directory
vars:
keystone: "{{ keystone_services.keystone }}"
service: "{{ keystone_services['keystone'] }}"
file:
dest: "{{ node_config_directory }}/keystone/domains/"
state: "directory"
mode: "0770"
become: true
when:
- inventory_hostname in groups[keystone.group]
- keystone.enabled | bool
- service | service_enabled_and_mapped_to_host
- keystone_domain_directory.stat.exists
- name: Get file list in custom domains folder
@ -114,7 +103,7 @@
- name: Copying Keystone Domain specific settings
vars:
keystone: "{{ keystone_services.keystone }}"
service: "{{ keystone_services['keystone'] }}"
template:
src: "{{ item.path }}"
dest: "{{ node_config_directory }}/keystone/domains/"
@ -122,8 +111,7 @@
become: true
register: keystone_domains
when:
- inventory_hostname in groups[keystone.group]
- keystone.enabled | bool
- service | service_enabled_and_mapped_to_host
- keystone_domain_directory.stat.exists
with_items: "{{ keystone_domains.files | default([]) }}"
notify:
@ -136,11 +124,9 @@
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.key in [ "keystone", "keystone-fernet" ]
- item.value.enabled | bool
- keystone_policy_file is defined
with_dict: "{{ keystone_services }}"
with_dict: "{{ keystone_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -150,15 +136,13 @@
- name: Copying over wsgi-keystone.conf
vars:
keystone: "{{ keystone_services.keystone }}"
service: "{{ keystone_services['keystone'] }}"
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/keystone/wsgi-keystone.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[keystone.group]
- keystone.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_first_found:
- "{{ node_custom_config }}/keystone/{{ inventory_hostname }}/wsgi-keystone.conf"
- "{{ node_custom_config }}/keystone/wsgi-keystone.conf"
@ -168,26 +152,24 @@
- name: Checking whether keystone-paste.ini file exists
vars:
keystone: "{{ keystone_services.keystone }}"
service: "{{ keystone_services['keystone'] }}"
stat:
path: "{{ node_custom_config }}/keystone/keystone-paste.ini"
delegate_to: localhost
run_once: True
register: check_keystone_paste_ini
when:
- keystone.enabled | bool
when: service | service_enabled_and_mapped_to_host
- name: Copying over keystone-paste.ini
vars:
keystone: "{{ keystone_services.keystone }}"
service: "{{ keystone_services['keystone'] }}"
template:
src: "{{ node_custom_config }}/keystone/keystone-paste.ini"
dest: "{{ node_config_directory }}/keystone/keystone-paste.ini"
mode: "0660"
become: true
when:
- inventory_hostname in groups[keystone.group]
- keystone.enabled | bool
- service | service_enabled_and_mapped_to_host
- check_keystone_paste_ini.stat.exists
notify:
- Restart keystone container
@ -211,7 +193,7 @@
- name: Copying files for keystone-fernet
vars:
keystone_fernet: "{{ keystone_services['keystone-fernet'] }}"
service: "{{ keystone_services['keystone-fernet'] }}"
template:
src: "{{ item.src }}"
dest: "{{ node_config_directory }}/keystone-fernet/{{ item.dest }}"
@ -226,15 +208,13 @@
- { src: "fernet-healthcheck.sh.j2", dest: "fernet-healthcheck.sh" }
- { src: "id_rsa", dest: "id_rsa" }
- { src: "ssh_config.j2", dest: "ssh_config" }
when:
- inventory_hostname in groups[keystone_fernet.group]
- keystone_fernet.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart keystone-fernet container
- name: Copying files for keystone-ssh
vars:
keystone_ssh: "{{ keystone_services['keystone-ssh'] }}"
service: "{{ keystone_services['keystone-ssh'] }}"
template:
src: "{{ item.src }}"
dest: "{{ node_config_directory }}/keystone-ssh/{{ item.dest }}"
@ -243,8 +223,6 @@
with_items:
- { src: "sshd_config.j2", dest: "sshd_config" }
- { src: "id_rsa.pub", dest: "id_rsa.pub" }
when:
- inventory_hostname in groups[keystone_ssh.group]
- keystone_ssh.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart keystone-ssh container

View File

@ -11,9 +11,6 @@
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ kuryr_services }}"
with_dict: "{{ kuryr_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ kuryr_services }}"
with_dict: "{{ kuryr_services | select_services_enabled_and_mapped_to_host }}"
- name: Check if policies shall be overwritten
stat:
@ -41,10 +38,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ kuryr_services }}"
with_dict: "{{ kuryr_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart kuryr container
@ -61,10 +55,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/kuryr.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ kuryr_services }}"
with_dict: "{{ kuryr_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart kuryr container
@ -76,9 +67,7 @@
dest: "{{ node_config_directory }}/{{ item }}/kuryr.spec"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_items:
- "kuryr"
notify:
@ -92,8 +81,6 @@
become: true
when:
- kuryr_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ kuryr_services }}"
with_dict: "{{ kuryr_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart kuryr container

View File

@ -10,9 +10,6 @@
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
environment: "{{ item.value.environment | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ letsencrypt_services }}"
with_dict: "{{ letsencrypt_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ letsencrypt_services }}"
with_dict: "{{ letsencrypt_services | select_services_enabled_and_mapped_to_host }}"
- name: Copying over config.json files for services
template:
@ -18,10 +15,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ letsencrypt_services }}"
with_dict: "{{ letsencrypt_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -37,9 +31,7 @@
- "{{ node_custom_config }}/letsencrypt/{{ inventory_hostname }}/letsencrypt-webserver.conf"
- "{{ node_custom_config }}/letsencrypt/letsencrypt-webserver.conf"
- "letsencrypt-webserver.conf.j2"
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart letsencrypt-webserver container
@ -55,9 +47,7 @@
- { src: "crontab.j2", dest: "crontab" }
- { src: "id_rsa.j2", dest: "id_rsa" }
- { src: "letsencrypt-lego-run.sh.j2", dest: "letsencrypt-lego-run.sh" }
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart letsencrypt-lego container

View File

@ -18,8 +18,7 @@
state: stopped
when:
- container_facts['letsencrypt_webserver'] is not defined
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
- name: Validating letsencrypt email variable
run_once: true

View File

@ -10,9 +10,6 @@
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
privileged: "{{ item.value.privileged | default(False) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ loadbalancer_services }}"
with_dict: "{{ loadbalancer_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ loadbalancer_services }}"
with_dict: "{{ loadbalancer_services | select_services_enabled_and_mapped_to_host }}"
- name: Ensuring haproxy service config subdir exists
vars:
@ -22,9 +19,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
- name: Ensuring proxysql service config subdirectories exist
vars:
@ -39,9 +34,7 @@
with_items:
- "users"
- "rules"
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
- name: Ensuring keepalived checks subdir exists
vars:
@ -53,9 +46,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
- name: Remove mariadb.cfg if proxysql enabled
vars:
@ -65,8 +56,7 @@
state: absent
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
- loadbalancer_services.proxysql.enabled | bool
notify:
- Restart haproxy container
@ -81,12 +71,11 @@
with_dict: "{{ loadbalancer_services }}"
when:
- keepalived_track_script_enabled | bool
- inventory_hostname in groups[service.group]
- item.key != 'keepalived'
- item.key != 'haproxy-ssh'
- not item.value.enabled | bool
or not inventory_hostname in groups[item.value.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
notify:
- Restart keepalived container
@ -101,12 +90,11 @@
with_dict: "{{ loadbalancer_services }}"
when:
- keepalived_track_script_enabled | bool
- inventory_hostname in groups[service.group]
- inventory_hostname in groups[item.value.group]
- item.key != 'keepalived'
- item.key != 'haproxy-ssh'
- item.value.enabled | bool
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
notify:
- Restart keepalived container
@ -116,10 +104,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ loadbalancer_services }}"
with_dict: "{{ loadbalancer_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -131,9 +116,7 @@
dest: "{{ node_config_directory }}/haproxy/haproxy.cfg"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_first_found:
- "{{ node_custom_config }}/haproxy/{{ inventory_hostname }}/haproxy_main.cfg"
- "{{ node_custom_config }}/haproxy/haproxy_main.cfg"
@ -149,9 +132,7 @@
dest: "{{ node_config_directory }}/proxysql/proxysql.yaml"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_first_found:
- "{{ node_custom_config }}/proxysql/{{ inventory_hostname }}/proxysql.yaml"
- "{{ node_custom_config }}/proxysql/proxysql.yaml"
@ -168,8 +149,7 @@
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
- haproxy_single_external_frontend | bool
notify:
- Restart haproxy container
@ -182,9 +162,7 @@
dest: "{{ node_config_directory }}/haproxy/services.d/"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_fileglob:
- "{{ node_custom_config }}/haproxy/services.d/*.cfg"
notify:
@ -198,9 +176,7 @@
dest: "{{ node_config_directory }}/keepalived/keepalived.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_first_found:
- "{{ node_custom_config }}/keepalived/{{ inventory_hostname }}/keepalived.conf"
- "{{ node_custom_config }}/keepalived/keepalived.conf"
@ -220,8 +196,7 @@
- not enable_letsencrypt | bool
- kolla_enable_tls_external | bool
- not kolla_externally_managed_cert | bool
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
with_items:
- "haproxy.pem"
notify:
@ -239,8 +214,7 @@
- not enable_letsencrypt | bool
- kolla_enable_tls_internal | bool
- not kolla_externally_managed_cert | bool
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
with_items:
- "haproxy-internal.pem"
notify:
@ -258,9 +232,7 @@
dest: "{{ node_config_directory }}/haproxy/haproxy_run.sh"
mode: "0770"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_first_found:
- "{{ node_custom_config }}/haproxy/{{ inventory_hostname }}/haproxy_run.sh"
- "{{ node_custom_config }}/haproxy/haproxy_run.sh"
@ -276,9 +248,7 @@
dest: "{{ node_config_directory }}/proxysql/proxysql_run.sh"
mode: "0770"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_first_found:
- "{{ node_custom_config }}/proxysql/{{ inventory_hostname }}/proxysql_run.sh"
- "{{ node_custom_config }}/proxysql/proxysql_run.sh"
@ -288,7 +258,7 @@
- name: Copying files for haproxy-ssh
vars:
haproxy_ssh: "{{ loadbalancer_services['haproxy-ssh'] }}"
service: "{{ loadbalancer_services['haproxy-ssh'] }}"
template:
src: "{{ item.src }}"
dest: "{{ node_config_directory }}/haproxy-ssh/{{ item.dest }}"
@ -297,8 +267,6 @@
with_items:
- { src: "haproxy-ssh/sshd_config.j2", dest: "sshd_config" }
- { src: "haproxy-ssh/id_rsa.pub", dest: "id_rsa.pub" }
when:
- inventory_hostname in groups[haproxy_ssh.group]
- haproxy_ssh.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart haproxy-ssh container

View File

@ -10,9 +10,6 @@
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
environment: "{{ item.value.environment }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ magnum_services }}"
with_dict: "{{ magnum_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ magnum_services }}"
with_dict: "{{ magnum_services | select_services_enabled_and_mapped_to_host }}"
- name: Check if policies shall be overwritten
stat:
@ -45,10 +42,8 @@
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
- magnum_kubeconfig_file.stat.exists
with_dict: "{{ magnum_services }}"
with_dict: "{{ magnum_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -68,10 +63,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ magnum_services }}"
with_dict: "{{ magnum_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -88,10 +80,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/magnum.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ magnum_services }}"
with_dict: "{{ magnum_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -103,8 +92,6 @@
become: true
when:
- magnum_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ magnum_services }}"
with_dict: "{{ magnum_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container

View File

@ -10,9 +10,6 @@
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ manila_services }}"
with_dict: "{{ manila_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ manila_services }}"
with_dict: "{{ manila_services | select_services_enabled_and_mapped_to_host }}"
- include_tasks: external_ceph.yml
when:
@ -46,10 +43,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ manila_services }}"
with_dict: "{{ manila_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -68,9 +62,7 @@
become: true
when:
- item.key in [ "manila-api", "manila-data", "manila-scheduler" ]
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ manila_services }}"
with_dict: "{{ manila_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -90,9 +82,7 @@
dest: "{{ node_config_directory }}/{{ item }}/manila.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_items:
- "manila-share"
notify:
@ -105,8 +95,6 @@
mode: "0660"
when:
- manila_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ manila_services }}"
with_dict: "{{ manila_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -9,9 +9,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
- name: Copy over multiple ceph configs for Manila
merge_configs:

View File

@ -10,9 +10,6 @@
dimensions: "{{ item.value.dimensions }}"
environment: "{{ item.value.environment | default(omit) }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ mariadb_services }}"
with_dict: "{{ mariadb_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "restart {{ item.key }}"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ mariadb_services }}"
with_dict: "{{ mariadb_services | select_services_enabled_and_mapped_to_host }}"
- name: Ensuring database backup config directory exists
file:
@ -45,10 +42,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ mariadb_services }}"
with_dict: "{{ mariadb_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "restart {{ item.key }}"
@ -76,8 +70,6 @@
dest: "{{ node_config_directory }}/{{ service_name }}/galera.cnf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- restart mariadb

View File

@ -10,9 +10,6 @@
privileged: "{{ item.value.privileged | default(False) }}"
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ masakari_services }}"
with_dict: "{{ masakari_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ masakari_services }}"
with_dict: "{{ masakari_services | select_services_enabled_and_mapped_to_host }}"
- name: Check if policies shall be overwritten
stat:
@ -39,9 +36,7 @@
become: true
when:
- masakari_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ masakari_services }}"
with_dict: "{{ masakari_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -51,10 +46,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ masakari_services }}"
with_dict: "{{ masakari_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -76,9 +68,7 @@
dest: "{{ node_config_directory }}/{{ service_name }}/masakari.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_items:
- masakari-api
- masakari-engine
@ -99,9 +89,7 @@
dest: "{{ node_config_directory }}/{{ service_name }}/masakari-monitors.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_items:
- masakari-instancemonitor
- masakari-hostmonitor
@ -116,9 +104,7 @@
dest: "{{ node_config_directory }}/masakari-api/wsgi-masakari.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart masakari-api container
@ -132,9 +118,7 @@
dest: "{{ node_config_directory }}/masakari-api/masakari-api-paste.ini"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart masakari-api container
@ -149,8 +133,7 @@
mode: "0660"
when:
- libvirt_enable_sasl | bool
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
with_items:
- { src: "auth.conf.j2", dest: "auth.conf", service: "masakari-instancemonitor" }
notify:

View File

@ -11,7 +11,5 @@
volumes: "{{ service.volumes }}"
dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify: Restart memcached container

View File

@ -20,7 +20,5 @@
become: true
with_items:
- "memcached"
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify: Restart memcached container

View File

@ -9,9 +9,6 @@
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ mistral_services }}"
with_dict: "{{ mistral_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ mistral_services }}"
with_dict: "{{ mistral_services | select_services_enabled_and_mapped_to_host }}"
- name: Check if policies shall be overwritten
stat:
@ -41,10 +38,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ mistral_services }}"
with_dict: "{{ mistral_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -61,10 +55,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/mistral.conf"
mode: "0660"
become: true
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ mistral_services }}"
with_dict: "{{ mistral_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -76,9 +67,7 @@
become: true
when:
- mistral_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ mistral_services }}"
with_dict: "{{ mistral_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
@ -90,9 +79,7 @@
src: "{{ item }}"
dest: "{{ node_config_directory }}/mistral-event-engine/event_definitions.yaml"
mode: "0660"
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_first_found:
- "{{ node_custom_config }}/mistral/{{ inventory_hostname }}/event_definitions.yaml"
- "{{ node_custom_config }}/mistral/event_definitions.yaml"

View File

@ -9,9 +9,6 @@
ipc_mode: "{{ item.value.ipc_mode }}"
privileged: "{{ item.value.privileged | default(False) }}"
volumes: "{{ item.value.volumes }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ multipathd_services }}"
with_dict: "{{ multipathd_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ multipathd_services }}"
with_dict: "{{ multipathd_services | select_services_enabled_and_mapped_to_host }}"
- name: Copying over config.json files for services
template:
@ -18,10 +15,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ multipathd_services }}"
with_dict: "{{ multipathd_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart multipathd container
@ -37,8 +31,6 @@
- "{{ node_custom_config }}/multipath/{{ inventory_hostname }}/multipath.conf"
- "{{ node_custom_config }}/multipath.conf"
- "multipath.conf.j2"
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart multipathd container

View File

@ -11,9 +11,6 @@
dimensions: "{{ item.value.dimensions }}"
environment: "{{ item.value.environment | default(omit) }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- item.value.enabled | bool
- item.value.host_in_groups | bool
with_dict: "{{ neutron_services }}"
with_dict: "{{ neutron_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -21,7 +21,7 @@
include_role:
name: sysctl
vars:
neutron_l3_agent: "{{ neutron_services['neutron-l3-agent'] }}"
service: "{{ neutron_services['neutron-l3-agent'] }}"
settings:
- { name: "net.ipv4.neigh.default.gc_thresh1", value: "{{ neutron_l3_agent_host_ipv4_neigh_gc_thresh1 }}"}
- { name: "net.ipv4.neigh.default.gc_thresh2", value: "{{ neutron_l3_agent_host_ipv4_neigh_gc_thresh2 }}"}
@ -31,4 +31,4 @@
- { name: "net.ipv6.neigh.default.gc_thresh3", value: "{{ neutron_l3_agent_host_ipv6_neigh_gc_thresh3 }}"}
when:
- set_sysctl | bool
- (neutron_l3_agent.enabled | bool and neutron_l3_agent.host_in_groups | bool)
- service | service_enabled_and_mapped_to_host

View File

@ -7,10 +7,7 @@
owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}"
mode: "0770"
when:
- item.value.enabled | bool
- item.value.host_in_groups | bool
with_dict: "{{ neutron_services }}"
with_dict: "{{ neutron_services | select_services_enabled_and_mapped_to_host }}"
- name: Check if extra ml2 plugins exists
find:
@ -26,7 +23,7 @@
- name: Creating TLS backend PEM File
vars:
neutron_tls_proxy: "{{ neutron_services['neutron-tls-proxy'] }}"
service: "{{ neutron_services['neutron-tls-proxy'] }}"
assemble:
src: "{{ node_config_directory }}/neutron-tls-proxy/"
dest: "{{ node_config_directory }}/neutron-tls-proxy/neutron-cert-and-key.pem"
@ -34,9 +31,7 @@
regexp: "^neutron-(cert|key)\\.pem$"
remote_src: true
become: true
when:
- neutron_tls_proxy.enabled | bool
- neutron_tls_proxy.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
- name: Check if policies shall be overwritten
stat:
@ -65,9 +60,7 @@
become: true
when:
- neutron_policy_file is defined
- item.value.enabled | bool
- item.value.host_in_groups | bool
with_dict: "{{ neutron_services }}"
with_dict: "{{ neutron_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -77,10 +70,7 @@
src: "{{ item.key }}.json.j2"
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
when:
- item.value.enabled | bool
- item.value.host_in_groups | bool
with_dict: "{{ neutron_services }}"
with_dict: "{{ neutron_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -114,10 +104,8 @@
dest: "{{ node_config_directory }}/{{ item.key }}/neutron.conf"
mode: "0660"
when:
- item.value.enabled | bool
- item.value.host_in_groups | bool
- item.key in services_need_neutron_conf
with_dict: "{{ neutron_services }}"
with_dict: "{{ neutron_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -136,24 +124,20 @@
dest: "{{ node_config_directory }}/{{ item.key }}/neutron_vpnaas.conf"
mode: "0660"
when:
- item.value.enabled | bool
- item.value.host_in_groups | bool
- item.key in services_need_neutron_vpnaas_conf
with_dict: "{{ neutron_services }}"
with_dict: "{{ neutron_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
- name: Copying over ssh key
become: true
vars:
neutron_server: "{{ neutron_services['neutron-server'] }}"
service: "{{ neutron_services['neutron-server'] }}"
template:
src: "id_rsa"
dest: "{{ node_config_directory }}/neutron-server/id_rsa"
mode: 0600
when:
- neutron_server.enabled | bool
- neutron_server.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
- name: Copying over ml2_conf.ini
become: true
@ -171,9 +155,7 @@
mode: "0660"
when:
- item.key in services_need_ml2_conf_ini
- item.value.enabled | bool
- item.value.host_in_groups | bool
with_dict: "{{ neutron_services }}"
with_dict: "{{ neutron_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -181,6 +163,7 @@
become: true
vars:
service_name: "neutron-linuxbridge-agent"
service: "{{ neutron_services[service_name] }}"
merge_configs:
sources:
- "{{ role_path }}/templates/linuxbridge_agent.ini.j2"
@ -188,9 +171,7 @@
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/linuxbridge_agent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/linuxbridge_agent.ini"
mode: "0660"
when:
- neutron_services[service_name].enabled | bool
- neutron_services[service_name].host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart {{ service_name }} container"
@ -198,6 +179,7 @@
become: true
vars:
service_name: "neutron-openvswitch-agent"
service: "{{ neutron_services[service_name] }}"
merge_configs:
sources:
- "{{ role_path }}/templates/openvswitch_agent.ini.j2"
@ -205,9 +187,7 @@
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/openvswitch_agent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/openvswitch_agent.ini"
mode: "0660"
when:
- neutron_services[service_name].enabled | bool
- neutron_services[service_name].host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart {{ service_name }} container"
@ -215,7 +195,7 @@
become: true
vars:
service_name: "neutron-sriov-agent"
neutron_sriov_agent: "{{ neutron_services[service_name] }}"
service: "{{ neutron_services[service_name] }}"
merge_configs:
sources:
- "{{ role_path }}/templates/sriov_agent.ini.j2"
@ -223,9 +203,7 @@
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/sriov_agent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/sriov_agent.ini"
mode: "0660"
when:
- neutron_sriov_agent.enabled | bool
- neutron_sriov_agent.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart {{ service_name }} container"
@ -233,7 +211,7 @@
become: true
vars:
service_name: "neutron-mlnx-agent"
neutron_mlnx_agent: "{{ neutron_services[service_name] }}"
service: "{{ neutron_services[service_name] }}"
merge_configs:
sources:
- "{{ role_path }}/templates/mlnx_agent.ini.j2"
@ -241,9 +219,7 @@
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/mlnx_agent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/mlnx_agent.ini"
mode: "0660"
when:
- neutron_mlnx_agent.enabled | bool
- neutron_mlnx_agent.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart {{ service_name }} container"
@ -251,7 +227,7 @@
become: true
vars:
service_name: "neutron-eswitchd"
neutron_eswitchd: "{{ neutron_services[service_name] }}"
service: "{{ neutron_services[service_name] }}"
merge_configs:
sources:
- "{{ role_path }}/templates/eswitchd.conf.j2"
@ -259,9 +235,7 @@
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/eswitchd.conf"
dest: "{{ node_config_directory }}/{{ service_name }}/eswitchd.conf"
mode: "0660"
when:
- neutron_eswitchd.enabled | bool
- neutron_eswitchd.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart {{ service_name }} container"
@ -269,7 +243,7 @@
become: true
vars:
service_name: "neutron-dhcp-agent"
neutron_dhcp_agent: "{{ neutron_services[service_name] }}"
service: "{{ neutron_services[service_name] }}"
merge_configs:
sources:
- "{{ role_path }}/templates/dhcp_agent.ini.j2"
@ -277,9 +251,7 @@
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/dhcp_agent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/dhcp_agent.ini"
mode: "0660"
when:
- neutron_dhcp_agent.enabled | bool
- neutron_dhcp_agent.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart {{ service_name }} container"
@ -287,7 +259,7 @@
become: true
vars:
service_name: "neutron-dhcp-agent"
neutron_dhcp_agent: "{{ neutron_services[service_name] }}"
service: "{{ neutron_services[service_name] }}"
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/{{ service_name }}/dnsmasq.conf"
@ -296,9 +268,7 @@
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/dnsmasq.conf"
- "{{ node_custom_config }}/neutron/dnsmasq.conf"
- "dnsmasq.conf.j2"
when:
- neutron_dhcp_agent.enabled | bool
- neutron_dhcp_agent.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart {{ service_name }} container"
@ -317,9 +287,7 @@
mode: "0660"
when:
- item.key in services_need_l3_agent_ini
- item.value.enabled | bool
- item.value.host_in_groups | bool
with_dict: "{{ neutron_services }}"
with_dict: "{{ neutron_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -339,9 +307,7 @@
when:
- enable_neutron_fwaas | bool
- item.key in services_need_fwaas_driver_ini
- item.value.enabled | bool
- item.value.host_in_groups | bool
with_dict: "{{ neutron_services }}"
with_dict: "{{ neutron_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -349,16 +315,14 @@
become: true
vars:
service_name: "neutron-metadata-agent"
neutron_metadata_agent: "{{ neutron_services[service_name] }}"
service: "{{ neutron_services[service_name] }}"
merge_configs:
sources:
- "{{ role_path }}/templates/metadata_agent.ini.j2"
- "{{ node_custom_config }}/neutron/metadata_agent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/metadata_agent.ini"
mode: "0660"
when:
- neutron_metadata_agent.enabled | bool
- neutron_metadata_agent.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart {{ service_name }} container"
@ -366,16 +330,14 @@
become: true
vars:
service_name: "neutron-ovn-metadata-agent"
neutron_ovn_metadata_agent: "{{ neutron_services[service_name] }}"
service: "{{ neutron_services[service_name] }}"
merge_configs:
sources:
- "{{ role_path }}/templates/neutron_ovn_metadata_agent.ini.j2"
- "{{ node_custom_config }}/neutron/neutron_ovn_metadata_agent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/neutron_ovn_metadata_agent.ini"
mode: "0660"
when:
- neutron_ovn_metadata_agent.enabled | bool
- neutron_ovn_metadata_agent.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart {{ service_name }} container"
@ -383,16 +345,14 @@
become: true
vars:
service_name: "neutron-metering-agent"
neutron_metering_agent: "{{ neutron_services[service_name] }}"
service: "{{ neutron_services[service_name] }}"
merge_configs:
sources:
- "{{ role_path }}/templates/metering_agent.ini.j2"
- "{{ node_custom_config }}/neutron/metering_agent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/metering_agent.ini"
mode: "0660"
when:
- neutron_metering_agent.enabled | bool
- neutron_metering_agent.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart {{ service_name }} container"
@ -400,16 +360,14 @@
become: true
vars:
service_name: "ironic-neutron-agent"
ironic_neutron_agent: "{{ neutron_services[service_name] }}"
service: "{{ neutron_services[service_name] }}"
merge_configs:
sources:
- "{{ role_path }}/templates/ironic_neutron_agent.ini.j2"
- "{{ node_custom_config }}/neutron/ironic_neutron_agent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/ironic_neutron_agent.ini"
mode: "0660"
when:
- ironic_neutron_agent.enabled | bool
- ironic_neutron_agent.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart {{ service_name }} container"
@ -417,16 +375,14 @@
become: true
vars:
service_name: "neutron-bgp-dragent"
neutron_bgp_dragent: "{{ neutron_services[service_name] }}"
service: "{{ neutron_services[service_name] }}"
merge_configs:
sources:
- "{{ role_path }}/templates/bgp_dragent.ini.j2"
- "{{ node_custom_config }}/neutron/bgp_dragent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/bgp_dragent.ini"
mode: "0660"
when:
- neutron_bgp_dragent.enabled | bool
- neutron_bgp_dragent.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart {{ service_name }} container"
@ -434,16 +390,14 @@
become: true
vars:
service_name: "neutron-ovn-agent"
neutron_ovn_agent: "{{ neutron_services[service_name] }}"
service: "{{ neutron_services[service_name] }}"
merge_configs:
sources:
- "{{ role_path }}/templates/ovn_agent.ini.j2"
- "{{ node_custom_config }}/neutron/ovn_agent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/ovn_agent.ini"
mode: "0660"
when:
- neutron_ovn_agent.enabled | bool
- neutron_ovn_agent.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart {{ service_name }} container"
@ -451,7 +405,7 @@
become: true
vars:
service_name: "neutron-server"
neutron_server: "{{ neutron_services[service_name] }}"
service: "{{ neutron_services[service_name] }}"
merge_configs:
sources:
- "{{ role_path }}/templates/nsx.ini.j2"
@ -460,8 +414,7 @@
dest: "{{ node_config_directory }}/{{ service_name }}/nsx.ini"
mode: "0660"
when:
- neutron_server.enabled | bool
- neutron_server.host_in_groups | bool
- service | service_enabled_and_mapped_to_host
- neutron_plugin_agent in ['vmware_nsxv', 'vmware_nsxv3', 'vmware_nsxp', 'vmware_dvs']
notify:
- "Restart {{ service_name }} container"
@ -475,9 +428,7 @@
src: neutron-l3-agent-wrapper.sh.j2
dest: "{{ node_config_directory }}/{{ service_name }}/neutron-l3-agent-wrapper.sh"
mode: "0770"
when:
- service.enabled | bool
- service.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart {{ service_name }} container"
@ -506,7 +457,7 @@
- name: Copying over neutron-tls-proxy.cfg
vars:
neutron_tls_proxy: "{{ neutron_services['neutron-tls-proxy'] }}"
service: "{{ neutron_services['neutron-tls-proxy'] }}"
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/neutron-tls-proxy/neutron-tls-proxy.cfg"
@ -516,9 +467,7 @@
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/neutron-tls-proxy.cfg"
- "{{ node_custom_config }}/neutron/neutron-tls-proxy.cfg"
- "neutron-tls-proxy.cfg.j2"
when:
- neutron_tls_proxy.enabled | bool
- neutron_tls_proxy.host_in_groups | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart neutron-tls-proxy container
@ -538,9 +487,7 @@
mode: "0660"
when:
- enable_neutron_taas | bool
- item.value.enabled | bool
- item.value.host_in_groups | bool
- item.key in services_need_neutron_taas_conf
with_dict: "{{ neutron_services }}"
with_dict: "{{ neutron_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -45,8 +45,8 @@
- name: Stopping all neutron-server for contract db
vars:
neutron_server: "{{ neutron_services['neutron-server'] }}"
first_neutron_server_host: "{{ groups[neutron_server.group][0] }}"
service: "{{ neutron_services['neutron-server'] }}"
first_neutron_server_host: "{{ groups[service.group][0] }}"
results_of_check_pending_contract_scripts: "{{ hostvars[first_neutron_server_host]['neutron_check_contract_db_stdout'] }}"
# NOTE(hrw): no idea
filter_rc: "results[?rc!=`0`]"
@ -55,9 +55,9 @@
kolla_container:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "{{ neutron_server.container_name }}"
name: "{{ service.container_name }}"
when:
- neutron_server.host_in_groups | bool
- service.host_in_groups | bool
- is_stop_neutron_server | length > 0
notify:
- "Restart neutron-server container"

View File

@ -14,9 +14,6 @@
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ nova_cell_services }}"
with_dict: "{{ nova_cell_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -1,46 +1,29 @@
---
- name: Copying over libvirt TLS keys (nova-libvirt)
- name: Copying over libvirt TLS keys to services
become: true
vars:
service: "{{ nova_cell_services['nova-libvirt'] }}"
service_name: nova-libvirt
paths:
- "{{ node_custom_config }}/nova/nova-libvirt/{{ inventory_hostname }}/{{ item }}"
- "{{ node_custom_config }}/nova/nova-libvirt/{{ item }}"
copy:
src: "{{ lookup('first_found', paths) }}"
dest: "{{ node_config_directory }}/{{ service_name }}/{{ item }}"
mode: "0600"
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
with_items:
services:
- "nova-compute"
- "nova-libvirt"
key_files:
- cacert.pem
- clientcert.pem
- clientkey.pem
- servercert.pem
- serverkey.pem
- clientcert.pem
- clientkey.pem
notify:
- Restart {{ service_name }} container
- name: Copying over libvirt TLS keys (nova-compute)
become: true
vars:
service: "{{ nova_cell_services['nova-compute'] }}"
service_name: nova-compute
service_name: "{{ item[0] }}"
filename: "{{ item[1] }}"
paths:
- "{{ node_custom_config }}/nova/nova-libvirt/{{ inventory_hostname }}/{{ item }}"
- "{{ node_custom_config }}/nova/nova-libvirt/{{ item }}"
- "{{ node_custom_config }}/nova/nova-libvirt/{{ inventory_hostname }}/{{ filename }}"
- "{{ node_custom_config }}/nova/nova-libvirt/{{ filename }}"
service: "{{ nova_cell_services[service_name] }}"
copy:
src: "{{ lookup('first_found', paths) }}"
dest: "{{ node_config_directory }}/{{ service_name }}/{{ item }}"
dest: "{{ node_config_directory }}/{{ service_name }}/{{ filename }}"
mode: "0600"
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
with_items:
- cacert.pem
- clientcert.pem
- clientkey.pem
- service | service_enabled_and_mapped_to_host
- not (service_name == 'nova-compute' and (filename == 'servercert.pem' or filename == 'serverkey.pem'))
loop: "{{ services | product(key_files) | list }}"
notify:
- Restart {{service_name }} container

View File

@ -7,10 +7,7 @@
owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}"
mode: "0770"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ nova_cell_services }}"
with_dict: "{{ nova_cell_services | select_services_enabled_and_mapped_to_host }}"
- include_tasks: copy-certs.yml
when:
@ -59,10 +56,7 @@
src: "{{ item.key }}.json.j2"
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ nova_cell_services }}"
with_dict: "{{ nova_cell_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -81,10 +75,8 @@
dest: "{{ node_config_directory }}/{{ item.key }}/nova.conf"
mode: "0660"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
- item.key in nova_cell_services_require_nova_conf
with_dict: "{{ nova_cell_services }}"
with_dict: "{{ nova_cell_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -97,9 +89,8 @@
dest: "{{ node_config_directory }}/nova-compute/provider_config.yaml"
mode: "0660"
when:
- inventory_hostname in groups[service.group]
- service | service_enabled_and_mapped_to_host
- nova_cell_compute_provider_config is defined
- service.enabled | bool
notify:
- Restart nova-compute container
@ -111,9 +102,7 @@
src: "{{ item.src }}"
dest: "{{ node_config_directory }}/nova-libvirt/{{ item.dest }}"
mode: "0660"
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_items:
- { src: "qemu.conf.j2", dest: "qemu.conf" }
- { src: "libvirtd.conf.j2", dest: "libvirtd.conf" }
@ -138,8 +127,7 @@
mode: "0660"
when:
- libvirt_enable_sasl | bool
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
with_items:
- { src: "auth.conf.j2", dest: "auth.conf", service: "nova-compute" }
- { src: "auth.conf.j2", dest: "auth.conf", service: "nova-libvirt" }
@ -155,9 +143,7 @@
src: "{{ item.src }}"
dest: "{{ node_config_directory }}/nova-ssh/{{ item.dest }}"
mode: "0660"
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_items:
- { src: "sshd_config.j2", dest: "sshd_config" }
- { src: "id_rsa", dest: "id_rsa" }
@ -176,8 +162,7 @@
when:
- nova_compute_virt_type == "vmware"
- not vmware_vcenter_insecure | bool
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
notify:
- Restart nova-compute container
@ -194,9 +179,7 @@
- "{{ node_custom_config }}/nova_compute/release"
- "{{ node_custom_config }}/nova/release"
skip: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart nova-compute container
@ -209,9 +192,7 @@
dest: "{{ node_config_directory }}/nova-compute/hostnqn"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart nova-compute container
@ -222,11 +203,9 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ nova_policy_file }}"
mode: "0660"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
- nova_policy_file is defined
- item.key in nova_cell_services_require_policy_json
with_dict: "{{ nova_cell_services }}"
with_dict: "{{ nova_cell_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -240,8 +219,7 @@
become: True
when:
- vendordata_file_path is defined
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
notify:
- "Restart {{ item }} container"
with_items:

View File

@ -98,8 +98,7 @@
- nova-compute
- nova-libvirt
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
- nova_backend == "rbd"
notify:
- Restart {{ item }} container
@ -146,8 +145,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[service.group]
when: service | service_enabled_and_mapped_to_host
- name: Pushing nova secret xml for libvirt
vars:
@ -159,9 +157,7 @@
group: "{{ config_owner_group }}"
mode: "0600"
become: true
when:
- inventory_hostname in groups[service.group]
- item.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_items:
- uuid: "{{ rbd_secret_uuid }}"
name: "client.nova secret"
@ -182,7 +178,7 @@
mode: "0600"
become: true
when:
- inventory_hostname in groups[service.group]
- service | service_enabled_and_mapped_to_host
- item.enabled | bool
- external_ceph_cephx_enabled | bool
with_items:

View File

@ -30,7 +30,7 @@
- name: Checking free port for Nova NoVNC Proxy
vars:
nova_novncproxy: "{{ nova_cell_services['nova-novncproxy'] }}"
service: "{{ nova_cell_services['nova-novncproxy'] }}"
wait_for:
host: "{{ api_interface_address }}"
port: "{{ nova_novncproxy_listen_port }}"
@ -39,12 +39,11 @@
state: stopped
when:
- container_facts['nova_novncproxy'] is not defined
- nova_novncproxy.enabled | bool
- inventory_hostname in groups[nova_novncproxy.group]
- service | service_enabled_and_mapped_to_host
- name: Checking free port for Nova Serial Proxy
vars:
nova_serialproxy: "{{ nova_cell_services['nova-serialproxy'] }}"
service: "{{ nova_cell_services['nova-serialproxy'] }}"
wait_for:
host: "{{ api_interface_address }}"
port: "{{ nova_serialproxy_listen_port }}"
@ -53,12 +52,11 @@
state: stopped
when:
- container_facts['nova_serialproxy'] is not defined
- nova_serialproxy.enabled | bool
- inventory_hostname in groups[nova_serialproxy.group]
- service | service_enabled_and_mapped_to_host
- name: Checking free port for Nova Spice HTML5 Proxy
vars:
nova_spicehtml5proxy: "{{ nova_cell_services['nova-spicehtml5proxy'] }}"
service: "{{ nova_cell_services['nova-spicehtml5proxy'] }}"
wait_for:
host: "{{ api_interface_address }}"
port: "{{ nova_spicehtml5proxy_listen_port }}"
@ -67,12 +65,11 @@
state: stopped
when:
- container_facts['nova_spicehtml5proxy'] is not defined
- nova_spicehtml5proxy.enabled | bool
- inventory_hostname in groups[nova_spicehtml5proxy.group]
- service | service_enabled_and_mapped_to_host
- name: Checking free port for Nova SSH (API interface)
vars:
nova_ssh: "{{ nova_cell_services['nova-ssh'] }}"
service: "{{ nova_cell_services['nova-ssh'] }}"
wait_for:
host: "{{ api_interface_address }}"
port: "{{ nova_ssh_port }}"
@ -81,12 +78,11 @@
state: stopped
when:
- container_facts['nova_ssh'] is not defined
- nova_ssh.enabled | bool
- inventory_hostname in groups[nova_ssh.group]
- service | service_enabled_and_mapped_to_host
- name: Checking free port for Nova SSH (migration interface)
vars:
nova_ssh: "{{ nova_cell_services['nova-ssh'] }}"
service: "{{ nova_cell_services['nova-ssh'] }}"
wait_for:
host: "{{ migration_interface_address }}"
port: "{{ nova_ssh_port }}"
@ -96,12 +92,11 @@
when:
- migration_interface_address != api_interface_address
- container_facts['nova_ssh'] is not defined
- nova_ssh.enabled | bool
- inventory_hostname in groups[nova_ssh.group]
- service | service_enabled_and_mapped_to_host
- name: Checking free port for Nova Libvirt
vars:
nova_libvirt: "{{ nova_cell_services['nova-libvirt'] }}"
service: "{{ nova_cell_services['nova-libvirt'] }}"
wait_for:
host: "{{ api_interface_address }}"
port: "{{ nova_libvirt_port }}"
@ -110,19 +105,17 @@
state: stopped
when:
- container_facts['nova_libvirt'] is not defined
- nova_libvirt.enabled | bool
- inventory_hostname in groups[nova_libvirt.group]
- service | service_enabled_and_mapped_to_host
- name: Checking that host libvirt is not running
vars:
nova_libvirt: "{{ nova_cell_services['nova-libvirt'] }}"
service: "{{ nova_cell_services['nova-libvirt'] }}"
stat: path=/var/run/libvirt/libvirt-sock
register: result
failed_when: result.stat.exists
when:
- container_facts['nova_libvirt'] is not defined
- nova_libvirt.enabled | bool
- inventory_hostname in groups[nova_libvirt.group]
- service | service_enabled_and_mapped_to_host
- name: Checking that nova_libvirt container is not running
vars:

View File

@ -36,6 +36,5 @@
healthcheck: "{{ service.healthcheck | default(omit) }}"
when:
- kolla_action == 'upgrade'
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
with_items: "{{ nova_cell_services_require_nova_conf }}"

View File

@ -5,12 +5,10 @@
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "{{ item.value.container_name }}"
with_dict: "{{ nova_cell_services }}"
with_dict: "{{ nova_cell_services | select_services_enabled_and_mapped_to_host }}"
when:
- "'nova-compute' not in item.key"
- item.key in nova_cell_services_require_nova_conf
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
- nova_safety_upgrade | bool
- import_tasks: rolling_upgrade.yml

View File

@ -13,9 +13,6 @@
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ nova_services }}"
with_dict: "{{ nova_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}"
mode: "0770"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ nova_services }}"
with_dict: "{{ nova_services | select_services_enabled_and_mapped_to_host }}"
- name: Check if policies shall be overwritten
stat:
@ -54,10 +51,7 @@
src: "{{ item.key }}.json.j2"
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ nova_services }}"
with_dict: "{{ nova_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -74,10 +68,7 @@
- "{{ node_custom_config }}/nova/{{ inventory_hostname }}/nova.conf"
dest: "{{ node_config_directory }}/{{ item.key }}/nova.conf"
mode: "0660"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ nova_services }}"
with_dict: "{{ nova_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -88,23 +79,21 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ nova_policy_file }}"
mode: "0660"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
- nova_policy_file is defined
- item.key in nova_services_require_policy_json
with_dict: "{{ nova_services }}"
with_dict: "{{ nova_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
- name: Copying over nova-api-wsgi.conf
vars:
service: "{{ nova_services['nova-api'] }}"
template:
src: "nova-api-wsgi.conf.j2"
dest: "{{ node_config_directory }}/nova-api/nova-api-wsgi.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups["nova-api"]
- nova_services["nova-api"].enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- "Restart nova-api container"
@ -118,7 +107,6 @@
become: True
when:
- vendordata_file_path is defined
- inventory_hostname in groups[service['group']]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
notify:
- "Restart nova-api container"

View File

@ -16,7 +16,7 @@
- name: Checking free port for Nova API
vars:
nova_api: "{{ nova_services['nova-api'] }}"
service: "{{ nova_services['nova-api'] }}"
wait_for:
host: "{{ api_interface_address }}"
port: "{{ nova_api_listen_port }}"
@ -25,12 +25,11 @@
state: stopped
when:
- container_facts['nova_api'] is not defined
- inventory_hostname in groups[nova_api.group]
- nova_api.enabled | bool
- service | service_enabled_and_mapped_to_host
- name: Checking free port for Nova Metadata
vars:
nova_api: "{{ nova_services['nova-api'] }}"
service: "{{ nova_services['nova-api'] }}"
wait_for:
host: "{{ api_interface_address }}"
port: "{{ nova_metadata_listen_port }}"
@ -39,5 +38,4 @@
state: stopped
when:
- container_facts['nova_api'] is not defined
- inventory_hostname in groups[nova_api.group]
- nova_api.enabled | bool
- service | service_enabled_and_mapped_to_host

View File

@ -17,8 +17,7 @@
healthcheck: "{{ service.healthcheck | default(omit) }}"
when:
- kolla_action == 'upgrade'
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
with_items:
- nova-scheduler
- nova-api

View File

@ -17,5 +17,4 @@
healthcheck: "{{ service.healthcheck | default(omit) }}"
when:
- kolla_action == 'upgrade'
- inventory_hostname in groups[service.group]
- service.enabled | bool
- service | service_enabled_and_mapped_to_host

View File

@ -44,10 +44,8 @@
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "{{ item.value.container_name }}"
with_dict: "{{ nova_services }}"
with_dict: "{{ nova_services | select_services_enabled_and_mapped_to_host }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
- nova_safety_upgrade | bool
- import_tasks: rolling_upgrade.yml

View File

@ -9,9 +9,6 @@
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ octavia_services }}"
with_dict: "{{ octavia_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -10,10 +10,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ octavia_services }}"
with_dict: "{{ octavia_services | select_services_enabled_and_mapped_to_host }}"
- name: Check if policies shall be overwritten
stat:
@ -42,9 +39,7 @@
become: true
when:
- octavia_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ octavia_services }}"
with_dict: "{{ octavia_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -58,10 +53,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ octavia_services }}"
with_dict: "{{ octavia_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -77,9 +69,7 @@
- "{{ node_custom_config }}/octavia/{{ inventory_hostname }}/octavia-wsgi.conf"
- "{{ node_custom_config }}/octavia/octavia-wsgi.conf"
- "octavia-wsgi.conf.j2"
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart octavia-api container
@ -96,10 +86,7 @@
dest: "{{ node_config_directory }}/{{ item.key }}/octavia.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ octavia_services }}"
with_dict: "{{ octavia_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -125,9 +112,7 @@
dest: "{{ node_config_directory }}/octavia-worker/{{ item }}"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_items: "{{ octavia_amphora_keys }}"
notify:
- Restart octavia-worker container
@ -140,9 +125,7 @@
dest: "{{ node_config_directory }}/octavia-housekeeping/{{ item }}"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_items: "{{ octavia_amphora_keys }}"
notify:
- Restart octavia-housekeeping container
@ -155,9 +138,7 @@
dest: "{{ node_config_directory }}/octavia-health-manager/{{ item }}"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
when: service | service_enabled_and_mapped_to_host
with_items: "{{ octavia_amphora_keys }}"
notify:
- Restart octavia-health-manager container

View File

@ -10,9 +10,6 @@
name: "{{ item.value.container_name }}"
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ opensearch_services }}"
with_dict: "{{ opensearch_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ opensearch_services }}"
with_dict: "{{ opensearch_services | select_services_enabled_and_mapped_to_host }}"
- include_tasks: copy-certs.yml
when:
@ -22,14 +19,13 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ opensearch_services }}"
with_dict: "{{ opensearch_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container
- name: Copying over opensearch service config file
vars:
service: "{{ opensearch_services['opensearch'] }}"
merge_yaml:
sources:
- "{{ role_path }}/templates/opensearch.yml.j2"
@ -39,15 +35,13 @@
dest: "{{ node_config_directory }}/opensearch/opensearch.yml"
mode: "0660"
become: true
when:
- inventory_hostname in groups['opensearch']
- opensearch_services['opensearch'].enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart opensearch container
- name: Copying over opensearch-dashboards config file
vars:
opensearch_dashboards: "{{ opensearch_services['opensearch-dashboards'] }}"
service: "{{ opensearch_services['opensearch-dashboards'] }}"
merge_yaml:
sources:
- "{{ role_path }}/templates/opensearch_dashboards.yml.j2"
@ -56,8 +50,6 @@
dest: "{{ node_config_directory }}/opensearch-dashboards/opensearch_dashboards.yml"
mode: "0660"
become: true
when:
- inventory_hostname in groups['opensearch-dashboards']
- opensearch_dashboards.enabled | bool
when: service | service_enabled_and_mapped_to_host
notify:
- Restart opensearch-dashboards container

View File

@ -10,9 +10,6 @@
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck }}"
when:
- item.value.enabled | bool
- item.value.host_in_groups | bool
with_dict: "{{ openvswitch_services }}"
with_dict: "{{ openvswitch_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,10 +7,7 @@
owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}"
mode: "0770"
when:
- item.value.enabled | bool
- item.value.host_in_groups | bool
with_dict: "{{ openvswitch_services }}"
with_dict: "{{ openvswitch_services | select_services_enabled_and_mapped_to_host }}"
- name: Copying over config.json files for services
become: true
@ -18,10 +15,7 @@
src: "{{ item.key }}.json.j2"
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
when:
- item.value.enabled | bool
- item.value.host_in_groups | bool
with_dict: "{{ openvswitch_services }}"
with_dict: "{{ openvswitch_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -34,6 +28,5 @@
mode: "0755"
become: true
when:
- service.host_in_groups | bool
- service.enabled | bool
- service | service_enabled_and_mapped_to_host
- openvswitch_ovs_vsctl_wrapper_enabled | bool

View File

@ -16,7 +16,7 @@
- name: Checking free port for OVSDB
vars:
openvswitch_db: "{{ openvswitch_services['openvswitch-db-server'] }}"
service: "{{ openvswitch_services['openvswitch-db-server'] }}"
wait_for:
host: "{{ api_interface_address }}"
port: "{{ ovsdb_port }}"
@ -25,5 +25,4 @@
state: stopped
when:
- container_facts['openvswitch_db'] is not defined
- inventory_hostname in groups[openvswitch_db.group]
- openvswitch_db.enabled | bool
- service | service_enabled_and_mapped_to_host

View File

@ -8,9 +8,6 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ovn_controller_services }}"
with_dict: "{{ ovn_controller_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ovn_controller_services }}"
with_dict: "{{ ovn_controller_services | select_services_enabled_and_mapped_to_host }}"
- name: Copying over config.json files for services
template:
@ -18,9 +15,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ovn_controller_services }}"
with_dict: "{{ ovn_controller_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container

View File

@ -8,9 +8,6 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ovn_db_services }}"
with_dict: "{{ ovn_db_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container

View File

@ -7,10 +7,7 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ovn_db_services }}"
with_dict: "{{ ovn_db_services | select_services_enabled_and_mapped_to_host }}"
- name: Copying over config.json files for services
template:
@ -18,9 +15,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ovn_db_services }}"
with_dict: "{{ ovn_db_services | select_services_enabled_and_mapped_to_host }}"
notify:
- Restart {{ item.key }} container

View File

@ -9,9 +9,6 @@
privileged: "{{ item.value.privileged | default(False) }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
when:
- item.value.enabled | bool
- item.value.host_in_groups | bool
with_dict: "{{ ovsdpdk_services }}"
with_dict: "{{ ovsdpdk_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

Some files were not shown because too many files have changed in this diff Show More