Simplify handler conditionals

Currently, we have a lot of logic for checking if a handler should run,
depending on whether config files have changed and whether the
container configuration has changed. As rm_work pointed out during
the recent haproxy refactor, these conditionals are typically
unnecessary - we can rely on Ansible's handler notification system
to only trigger handlers when they need to run. This removes a lot
of error prone code.

This patch removes conditional handler logic for all services. It is
important to ensure that we no longer trigger handlers when unnecessary,
because without these checks in place it will trigger a restart of the
containers.

Implements: blueprint simplify-handlers

Change-Id: I4f1aa03e9a9faaf8aecd556dfeafdb834042e4cd
This commit is contained in:
Mark Goddard 2019-03-26 09:56:29 +00:00
parent 85b9dabcd4
commit de00bf491d
136 changed files with 190 additions and 2315 deletions

View File

@ -3,10 +3,6 @@
vars:
service_name: "aodh-api"
service: "{{ aodh_services[service_name] }}"
config_json: "{{ aodh_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
aodh_conf: "{{ aodh_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ aodh_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
aodh_api_container: "{{ check_aodh_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,22 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or aodh_conf.changed | bool
or policy_overwriting.changed | bool
or aodh_conf_wsgi.changed | bool
or aodh_api_container.changed | bool
- name: Restart aodh-evaluator container
vars:
service_name: "aodh-evaluator"
service: "{{ aodh_services[service_name] }}"
config_json: "{{ aodh_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
aodh_conf: "{{ aodh_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ aodh_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
aodh_evaluator_container: "{{ check_aodh_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -43,21 +28,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or aodh_conf.changed | bool
or policy_overwriting.changed | bool
or aodh_evaluator_container.changed | bool
- name: Restart aodh-listener container
vars:
service_name: "aodh-listener"
service: "{{ aodh_services[service_name] }}"
config_json: "{{ aodh_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
aodh_conf: "{{ aodh_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ aodh_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
aodh_listener_container: "{{ check_aodh_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -68,21 +43,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or aodh_conf.changed | bool
or policy_overwriting.changed | bool
or aodh_listener_container.changed | bool
- name: Restart aodh-notifier container
vars:
service_name: "aodh-notifier"
service: "{{ aodh_services[service_name] }}"
config_json: "{{ aodh_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
aodh_conf: "{{ aodh_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ aodh_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
aodh_notifier_container: "{{ check_aodh_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -93,9 +58,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or aodh_conf.changed | bool
or policy_overwriting.changed | bool
or aodh_notifier_container.changed | bool

View File

@ -35,17 +35,13 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ aodh_policy_file }}"
mode: "0660"
become: true
register: aodh_policy_overwriting
when:
- aodh_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ aodh_services }}"
notify:
- Restart aodh-api container
- Restart aodh-evaluator container
- Restart aodh-listener container
- Restart aodh-notifier container
- "Restart {{ item.key }} container"
- name: Copying over config.json files for services
template:
@ -53,16 +49,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: aodh_config_jsons
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ aodh_services }}"
notify:
- Restart aodh-api container
- Restart aodh-evaluator container
- Restart aodh-listener container
- Restart aodh-notifier container
- "Restart {{ item.key }} container"
- name: Copying over aodh.conf
vars:
@ -77,16 +69,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/aodh.conf"
mode: "0660"
become: true
register: aodh_confs
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ aodh_services }}"
notify:
- Restart aodh-api container
- Restart aodh-evaluator container
- Restart aodh-listener container
- Restart aodh-notifier container
- "Restart {{ item.key }} container"
- name: Copying over wsgi-aodh files for services
vars:
@ -96,12 +84,11 @@
dest: "{{ node_config_directory }}/aodh-api/wsgi-aodh.conf"
mode: "0660"
become: true
register: aodh_conf_wsgi
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
notify:
- Restart aodh-api container
- "Restart aodh-api container"
- name: Check aodh containers
become: true
@ -112,14 +99,10 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
dimensions: "{{ item.value.dimensions }}"
register: check_aodh_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ aodh_services }}"
notify:
- Restart aodh-api container
- Restart aodh-evaluator container
- Restart aodh-listener container
- Restart aodh-notifier container
- "Restart {{ item.key }} container"

View File

@ -3,10 +3,6 @@
vars:
service_name: "barbican-api"
service: "{{ barbican_services[service_name] }}"
config_json: "{{ barbican_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
barbican_conf: "{{ barbican_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ barbican_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
barbican_api_container: "{{ check_barbican_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,23 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or barbican_conf.changed | bool
or policy_overwriting.changed | bool
or barbican_api_ini.changed | bool
or barbican_api_paste.changed | bool
or barbican_api_container.changed | bool
- name: Restart barbican-keystone-listener container
vars:
service_name: "barbican-keystone-listener"
service: "{{ barbican_services[service_name] }}"
config_json: "{{ barbican_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
barbican_conf: "{{ barbican_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ barbican_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
barbican_keystone_listener_container: "{{ check_barbican_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -44,21 +28,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or barbican_conf.changed | bool
or policy_overwriting.changed | bool
or barbican_keystone_listener_container.changed | bool
- name: Restart barbican-worker container
vars:
service_name: "barbican-worker"
service: "{{ barbican_services[service_name] }}"
config_json: "{{ barbican_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
barbican_conf: "{{ barbican_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ barbican_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
barbican_worker_container: "{{ check_barbican_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -69,9 +43,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or barbican_conf.changed | bool
or policy_overwriting.changed | bool
or barbican_worker_container.changed | bool

View File

@ -1,5 +1,20 @@
---
- name: Ensuring config directories exist
file:
path: "{{ node_config_directory }}/{{ item.key }}"
state: "directory"
owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ barbican_services }}"
- name: Ensuring vassals config directories exist
vars:
service: "{{ barbican_services['barbican-api'] }}"
file:
path: "{{ node_config_directory }}/{{ item }}"
state: "directory"
@ -7,10 +22,11 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
with_items:
- "barbican-api/vassals"
- "barbican-keystone-listener"
- "barbican-worker"
- name: Check if policies shall be overwritten
local_action: stat path="{{ item }}"
@ -35,7 +51,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: barbican_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -54,9 +69,8 @@
dest: "{{ node_config_directory }}/barbican-api/vassals/barbican-api.ini"
mode: "0660"
become: true
register: barbican_api_ini
when:
- inventory_hostname in groups['barbican-api']
- inventory_hostname in groups[service.group]
- service.enabled | bool
notify:
- Restart barbican-api container
@ -68,6 +82,7 @@
run_once: True
register: check_barbican_api_paste_ini
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
- name: Copying over barbican-api-paste.ini
@ -79,10 +94,9 @@
mode: "0660"
become: true
when:
- inventory_hostname in groups['barbican-api']
- inventory_hostname in groups[service.group]
- service.enabled | bool
- check_barbican_api_paste_ini.stat.exists
register: barbican_api_paste
notify:
- Restart barbican-api container
@ -99,7 +113,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/barbican.conf"
mode: "0660"
become: true
register: barbican_confs
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
@ -113,7 +126,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ barbican_policy_file }}"
mode: "0660"
become: true
register: barbican_policy_overwriting
when:
- barbican_policy_file is defined
- inventory_hostname in groups[item.value.group]
@ -131,7 +143,6 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
dimensions: "{{ item.value.dimensions }}"
register: check_barbican_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -3,10 +3,6 @@
vars:
service_name: "blazar-api"
service: "{{ blazar_services[service_name] }}"
config_json: "{{ blazar_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
blazar_conf: "{{ blazar_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ blazar_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
blazar_api_container: "{{ check_blazar_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,21 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or blazar_conf.changed | bool
or policy_overwriting | bool
or blazar_api_container.changed | bool
- name: Restart blazar-manager container
vars:
service_name: "blazar-manager"
service: "{{ blazar_services[service_name] }}"
config_json: "{{ blazar_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
blazar_conf: "{{ blazar_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ blazar_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
blazar_manager_container: "{{ check_blazar_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -42,9 +28,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or blazar_conf.changed | bool
or policy_overwriting.changed | bool
or blazar_manager_container.changed | bool

View File

@ -35,14 +35,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: blazar_config_jsons
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ blazar_services }}"
notify:
- Restart blazar-api container
- Restart blazar-manager container
- Restart {{ item.key }} container
- name: Copying over blazar.conf
vars:
@ -57,14 +55,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/blazar.conf"
mode: "0660"
become: true
register: blazar_confs
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ blazar_services }}"
notify:
- Restart blazar-api container
- Restart blazar-manager container
- Restart {{ item.key }} container
- name: Copying over existing policy file
template:
@ -72,14 +68,13 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ blazar_policy_file }}"
mode: "0660"
become: true
register: blazar_policy_overwriting
when:
- blazar_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ blazar_services }}"
notify:
- Restart blazar-api container
- Restart blazar-manager container
- Restart {{ item.key }} container
- name: Check blazar containers
become: true
@ -90,12 +85,10 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
dimensions: "{{ item.value.dimensions }}"
register: check_blazar_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ blazar_services }}"
notify:
- Restart blazar-api container
- Restart blazar-manager container
- Restart {{ item.key }} container

View File

@ -3,15 +3,6 @@
vars:
service_name: "ceilometer-notification"
service: "{{ ceilometer_services[service_name] }}"
config_json: "{{ ceilometer_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_conf: "{{ ceilometer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_pipeline: "{{ ceilometer_pipelines.results|selectattr('item.key', 'equalto', service_name)|first }}"
gnocchi_resources_overwriting: "{{ ceilometer_gnocchi_resources_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
pipeline_overwriting: "{{ ceilometer_pipeline_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ ceilometer_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
polling_overwriting: "{{ ceilometer_polling_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_notification_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
panko_conf: "{{ panko_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -22,34 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or ceilometer_conf.changed | bool
or ceilometer_event_definitions_overwriting.changed | bool
or ceilometer_event_pipeline_overwriting.changed | bool
or gnocchi_resources_overwriting.changed | bool
or pipeline_overwriting.changed | bool
or policy_overwriting.changed | bool
or polling_overwriting.changed | bool
or ceilometer_event_definitions.changed | bool
or ceilometer_event_pipeline.changed | bool
or ceilometer_pipeline.changed | bool
or ceilometer_notification_container.changed | bool
or panko_conf.changed | bool
- name: Restart ceilometer-central container
vars:
service_name: "ceilometer-central"
service: "{{ ceilometer_services[service_name] }}"
config_json: "{{ ceilometer_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_conf: "{{ ceilometer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_pipeline: "{{ ceilometer_pipelines.results|selectattr('item.key', 'equalto', service_name)|first }}"
gnocchi_resources_overwriting: "{{ ceilometer_gnocchi_resources_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
pipeline_overwriting: "{{ ceilometer_pipeline_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ ceilometer_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
polling_overwriting: "{{ ceilometer_polling_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_central_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -60,29 +28,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or ceilometer_conf.changed | bool
or ceilometer_pipeline.changed | bool
or gnocchi_resources_overwriting.changed | bool
or pipeline_overwriting.changed | bool
or policy_overwriting.changed | bool
or polling_overwriting.changed | bool
or ceilometer_central_container.changed | bool
- name: Restart ceilometer-compute container
vars:
service_name: "ceilometer-compute"
service: "{{ ceilometer_services[service_name] }}"
config_json: "{{ ceilometer_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_conf: "{{ ceilometer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_pipeline: "{{ ceilometer_pipelines.results|selectattr('item.key', 'equalto', service_name)|first }}"
gnocchi_resources_overwriting: "{{ ceilometer_gnocchi_resources_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
pipeline_overwriting: "{{ ceilometer_pipeline_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ ceilometer_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
polling_overwriting: "{{ ceilometer_polling_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_compute_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -94,29 +44,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or ceilometer_conf.changed | bool
or ceilometer_pipeline.changed | bool
or gnocchi_resources_overwriting.changed | bool
or pipeline_overwriting.changed | bool
or policy_overwriting.changed | bool
or polling_overwriting.changed | bool
or vcenter_ca_file.changed | bool
or ceilometer_compute_container.changed | bool
- name: Restart ceilometer-ipmi container
vars:
service_name: "ceilometer-ipmi"
service: "{{ ceilometer_services[service_name] }}"
config_json: "{{ ceilometer_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_conf: "{{ ceilometer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_pipeline: "{{ ceilometer_pipelines.results|selectattr('item.key', 'equalto', service_name)|first }}"
gnocchi_resources_overwriting: "{{ ceilometer_gnocchi_resources_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ ceilometer_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
polling_overwriting: "{{ ceilometer_polling_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_ipmi_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -127,12 +59,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or ceilometer_conf.changed | bool
or ceilometer_pipeline.changed | bool
or gnocchi_resources_overwriting.changed | bool
or policy_overwriting.changed | bool
or polling_overwriting.changed | bool
or ceilometer_ipmi_container.changed | bool

View File

@ -69,7 +69,6 @@
force: True
mode: "0660"
become: true
register: ceilometer_polling_overwriting
when:
- ceilometer_polling_file.stat.exists
- inventory_hostname in groups[item.value.group]
@ -95,7 +94,6 @@
force: True
mode: "0660"
become: true
register: ceilometer_gnocchi_resources_overwriting
when:
- ceilometer_gnocchi_resources_file.stat.exists
- inventory_hostname in groups[item.value.group]
@ -133,16 +131,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: ceilometer_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ceilometer_services }}"
notify:
- Restart ceilometer-notification container
- Restart ceilometer-central container
- Restart ceilometer-compute container
- Restart ceilometer-ipmi container
- "Restart {{ item.key }} container"
- name: Copying over ceilometer.conf
vars:
@ -157,16 +151,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/ceilometer.conf"
mode: "0660"
become: true
register: ceilometer_confs
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ ceilometer_services }}"
notify:
- Restart ceilometer-notification container
- Restart ceilometer-central container
- Restart ceilometer-compute container
- Restart ceilometer-ipmi container
- "Restart {{ item.key }} container"
- name: Check custom event_definitions.yaml exists
local_action: stat path="{{ node_custom_config }}/ceilometer/event_definitions.yaml"
@ -234,7 +224,6 @@
dest: "{{ node_config_directory }}/ceilometer-notification/event_pipeline.yaml"
mode: "0660"
become: true
register: ceilometer_event_pipeline
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -279,7 +268,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/pipeline.yaml"
mode: "0660"
become: true
register: ceilometer_pipelines
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -303,7 +291,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/panko.conf"
mode: "0660"
become: true
register: panko_confs
when:
- enable_panko | bool
- item.value.enabled | bool
@ -320,7 +307,6 @@
src: "{{ node_custom_config }}/vmware_ca"
dest: "{{ node_config_directory }}/ceilometer-compute/vmware_ca"
mode: "0660"
register: vcenter_ca_file
when:
- nova_compute_virt_type == "vmware"
- not vmware_vcenter_insecure | bool
@ -335,17 +321,13 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ ceilometer_policy_file }}"
mode: "0660"
become: true
register: ceilometer_policy_overwriting
when:
- ceilometer_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ceilometer_services }}"
notify:
- Restart ceilometer-notification container
- Restart ceilometer-central container
- Restart ceilometer-compute container
- Restart ceilometer-ipmi container
- "Restart {{ item.key }} container"
# check whether the containers parameter is changed. If yes, trigger the handler.
- name: Check ceilometer containers
@ -358,14 +340,10 @@
privileged: "{{ item.value.privileged | default(False) }}"
volumes: "{{ item.value.volumes | reject('equalto', '')|list }}"
dimensions: "{{ item.value.dimensions }}"
register: check_ceilometer_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ ceilometer_services }}"
notify:
- Restart ceilometer-notification container
- Restart ceilometer-central container
- Restart ceilometer-compute container
- Restart ceilometer-ipmi container
- "Restart {{ item.key }} container"

View File

@ -14,5 +14,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool

View File

@ -1,5 +1,8 @@
---
- name: Ensuring config directories exist
vars:
service_name: "chrony"
service: "{{ chrony_services[service_name] }}"
file:
path: "{{ node_config_directory }}/{{ item }}"
state: "directory"
@ -7,26 +10,41 @@
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
with_items:
- "chrony"
- name: Copying over config.json files for services
vars:
service_name: "chrony"
service: "{{ chrony_services[service_name] }}"
template:
src: "{{ item }}.json.j2"
dest: "{{ node_config_directory }}/{{ item }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
with_items:
- "chrony"
notify:
- Restart chrony container
- name: Copying over chrony.conf
vars:
service_name: "chrony"
service: "{{ chrony_services[service_name] }}"
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/chrony/chrony.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
with_first_found:
- "{{ node_custom_config }}/chrony/{{ inventory_hostname }}/chrony.conf"
- "{{ node_custom_config }}/chrony/chrony.conf"
@ -50,4 +68,4 @@
- item.value.enabled | bool
with_dict: "{{ chrony_services }}"
notify:
- Restart chrony container
- "Restart {{ item.key }} container"

View File

@ -3,10 +3,6 @@
vars:
service_name: "cinder-api"
service: "{{ cinder_services[service_name] }}"
config_json: "{{ cinder_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
cinder_conf: "{{ cinder_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ cinder_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
cinder_api_container: "{{ check_cinder_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,22 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or cinder_conf.changed | bool
or wsgi_cinder_api.changed | bool
or policy_overwriting.changed | bool
or cinder_api_container.changed | bool
- name: Restart cinder-scheduler container
vars:
service_name: "cinder-scheduler"
service: "{{ cinder_services[service_name] }}"
config_json: "{{ cinder_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
cinder_conf: "{{ cinder_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ cinder_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
cinder_scheduler_container: "{{ check_cinder_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -43,22 +28,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or cinder_conf.changed | bool
or policy_overwriting.changed | bool
or cinder_scheduler_container.changed | bool
- name: Restart cinder-volume container
vars:
service_name: "cinder-volume"
service: "{{ cinder_services[service_name] }}"
config_json: "{{ cinder_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
cinder_conf: "{{ cinder_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceph_conf: "{{ ceph_confs.results|selectattr('item.key', 'equalto', service_name)|first if ceph_confs is defined else none }}"
policy_overwriting: "{{ cinder_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
cinder_volume_container: "{{ check_cinder_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -71,24 +45,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or cinder_conf.changed | bool
or policy_overwriting.changed | bool
or cinder_volume_container.changed | bool
or ( ceph_conf is not none and ceph_conf.changed | bool )
or ( cinder_volume_ceph_keyring is defined and cinder_volume_ceph_keyring.changed | bool )
- name: Restart cinder-backup container
vars:
service_name: "cinder-backup"
service: "{{ cinder_services[service_name] }}"
config_json: "{{ cinder_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
cinder_conf: "{{ cinder_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceph_conf: "{{ ceph_confs.results|selectattr('item.key', 'equalto', service_name)|first if ceph_confs is defined else none }}"
policy_overwriting: "{{ cinder_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
cinder_backup_container: "{{ check_cinder_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -100,11 +61,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or cinder_conf.changed | bool
or policy_overwriting.changed | bool
or cinder_backup_container.changed | bool
or ( ceph_conf is not none and ceph_conf.changed | bool )
or ( cinder_backup_ceph_keyring is defined and cinder_backup_ceph_keyring.changed | bool )

View File

@ -12,7 +12,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/ceph.conf"
mode: "0660"
become: true
register: ceph_confs
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
@ -72,3 +71,5 @@
when:
- inventory_hostname in groups[item.service_name]
- cinder_services[item.service_name].enabled | bool
notify:
- "Restart {{ item.service_name }} container"

View File

@ -50,16 +50,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: cinder_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ cinder_services }}"
notify:
- Restart cinder-api container
- Restart cinder-scheduler container
- Restart cinder-volume container
- Restart cinder-backup container
- "Restart {{ item.key }} container"
- name: Copying over cinder-wsgi.conf
vars:
@ -73,7 +69,6 @@
- "{{ node_custom_config }}/cinder/{{ inventory_hostname }}/cinder-wsgi.conf"
- "{{ node_custom_config }}/cinder/cinder-wsgi.conf"
- "cinder-wsgi.conf.j2"
register: wsgi_cinder_api
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -93,16 +88,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/cinder.conf"
mode: "0660"
become: true
register: cinder_confs
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ cinder_services }}"
notify:
- Restart cinder-api container
- Restart cinder-scheduler container
- Restart cinder-volume container
- Restart cinder-backup container
- "Restart {{ item.key }} container"
- name: Copying over existing policy file
become: true
@ -110,17 +101,13 @@
src: "{{ cinder_policy_file_path }}"
dest: "{{ node_config_directory }}/{{ item.key }}/{{ cinder_policy_file }}"
mode: "0660"
register: cinder_policy_overwriting
when:
- item.value.enabled | bool
- cinder_policy_file is defined
- inventory_hostname in groups[item.value.group]
with_dict: "{{ cinder_services }}"
notify:
- Restart cinder-api container
- Restart cinder-scheduler container
- Restart cinder-volume container
- Restart cinder-backup container
- "Restart {{ item.key }} container"
- name: Copying over nfs_shares files for cinder_volume
become: true
@ -140,6 +127,8 @@
- "{{ 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']
notify:
- Restart cinder-volume container
- name: Check cinder containers
become: true
@ -152,14 +141,10 @@
dimensions: "{{ item.value.dimensions }}"
privileged: "{{ item.value.privileged | default(False) }}"
ipc_mode: "{{ item.value.ipc_mode | default('') }}"
register: check_cinder_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ cinder_services }}"
notify:
- Restart cinder-api container
- Restart cinder-scheduler container
- Restart cinder-volume container
- Restart cinder-backup container
- "Restart {{ item.key }} container"

View File

@ -11,7 +11,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/ceph.conf"
mode: "0660"
become: true
register: ceph_confs
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
@ -26,7 +25,6 @@
dest: "{{ node_config_directory }}/cinder-volume/"
mode: "0660"
become: true
register: cinder_volume_ceph_keyring
with_fileglob:
- "{{ node_custom_config }}/cinder/cinder-volume/ceph.client*"
when:

View File

@ -3,10 +3,6 @@
vars:
service_name: "cloudkitty-api"
service: "{{ cloudkitty_services[service_name] }}"
config_json: "{{ cloudkitty_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
cloudkitty_conf: "{{ cloudkitty_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ cloudkitty_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
cloudkitty_api_container: "{{ check_cloudkitty_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,22 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or cloudkitty_conf.changed | bool
or cloudkitty_conf_wsgi.changed | bool
or policy_overwriting.changed | bool
or cloudkitty_api_container.changed | bool
- name: Restart cloudkitty-processor container
vars:
service_name: "cloudkitty-processor"
service: "{{ cloudkitty_services[service_name] }}"
config_json: "{{ cloudkitty_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
cloudkitty_conf: "{{ cloudkitty_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ cloudkitty_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
cloudkitty_processor_container: "{{ check_cloudkitty_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -43,9 +28,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or cloudkitty_conf.changed | bool
or policy_overwriting.changed | bool
or cloudkitty_processor_container.changed | bool

View File

@ -57,14 +57,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: cloudkitty_config_jsons
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ cloudkitty_services }}"
notify:
- Restart cloudkitty-api container
- Restart cloudkitty-processor container
- Restart {{ item.key }} container
- name: Copying over cloudkitty.conf
vars:
@ -79,14 +77,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/cloudkitty.conf"
mode: "0660"
become: true
register: cloudkitty_confs
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ cloudkitty_services }}"
notify:
- Restart cloudkitty-api container
- Restart cloudkitty-processor container
- Restart {{ item.key }} container
- name: Copying over wsgi-cloudkitty.conf
vars:
@ -96,7 +92,6 @@
dest: "{{ node_config_directory }}/cloudkitty-api/wsgi-cloudkitty.conf"
mode: "0660"
become: true
register: cloudkitty_conf_wsgi
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -109,15 +104,13 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ cloudkitty_policy_file }}"
mode: "0660"
become: true
register: cloudkitty_policy_overwriting
when:
- cloudkitty_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ cloudkitty_services }}"
notify:
- Restart cloudkitty-api container
- Restart cloudkitty-processor container
- Restart {{ item.key }} container
- name: Check cloudkitty containers
become: true
@ -128,12 +121,10 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
dimensions: "{{ item.value.dimensions }}"
register: check_cloudkitty_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ cloudkitty_services }}"
notify:
- Restart cloudkitty-api container
- Restart cloudkitty-processor container
- Restart {{ item.key }} container

View File

@ -3,8 +3,6 @@
vars:
service_name: "collectd"
service: "{{ collectd_services[service_name] }}"
config_json: "{{ collectd_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
collectd_container: "{{ check_collectd_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -16,8 +14,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or collectd_conf.changed | bool
or collectd_container.changed | bool

View File

@ -31,7 +31,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: collectd_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -52,7 +51,6 @@
- "{{ node_custom_config }}/collectd/collectd.conf"
- "{{ node_custom_config }}/collectd.conf"
- "collectd.conf.j2"
register: collectd_conf
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -69,7 +67,6 @@
privileged: "{{ item.value.privileged | default(False) }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_collectd_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -3,8 +3,6 @@
vars:
service_name: "fluentd"
service: "{{ common_services[service_name] }}"
config_json: "{{ common_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
fluentd_container: "{{ check_common_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -16,25 +14,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- service.enabled | bool
- config_json.changed | bool
or fluentd_input.changed | bool
or fluentd_input_custom.changed | bool
or fluentd_output.changed | bool
or fluentd_output_custom.changed | bool
or fluentd_format.changed | bool
or fluentd_format_custom.changed | bool
or fluentd_filter.changed | bool
or fluentd_filter_custom.changed | bool
or fluentd_td_agent.changed | bool
or fluentd_container.changed | bool
- name: Restart kolla-toolbox container
vars:
service_name: "kolla-toolbox"
service: "{{ common_services[service_name] }}"
config_json: "{{ common_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
kolla_toolbox_container: "{{ check_common_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -47,9 +31,6 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- service.enabled | bool
- config_json.changed | bool
or kolla_toolbox_container.changed | bool
notify:
- Initializing toolbox container using normal user
@ -62,8 +43,6 @@
vars:
service_name: "cron"
service: "{{ common_services[service_name] }}"
config_json: "{{ common_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
cron_container: "{{ check_common_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -75,7 +54,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- service.enabled | bool
- config_json.changed | bool
or cron_confs.changed | bool
or cron_container.changed | bool

View File

@ -32,7 +32,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: common_config_jsons
when: item.value.enabled | bool
with_dict: "{{ common_services }}"
notify:
@ -44,7 +43,6 @@
dest: "{{ node_config_directory }}/fluentd/input/{{ item }}.conf"
mode: "0660"
become: true
register: fluentd_input
when: enable_fluentd | bool
with_items:
- "00-global"
@ -75,7 +73,6 @@
src: "{{ item.path }}"
dest: "{{ node_config_directory }}/fluentd/input/{{ item.path | basename }}"
mode: "0660"
register: fluentd_input_custom
when:
- enable_fluentd | bool
with_items: "{{ find_custom_fluentd_inputs.files }}"
@ -94,7 +91,6 @@
dest: "{{ node_config_directory }}/fluentd/output/{{ item.name }}.conf"
mode: "0660"
become: true
register: fluentd_output
when:
- enable_fluentd | bool
- item.enabled | bool
@ -140,7 +136,6 @@
dest: "{{ node_config_directory }}/fluentd/output/{{ item.path | basename }}"
mode: "0660"
become: true
register: fluentd_output_custom
when:
- enable_fluentd | bool
with_items: "{{ find_custom_fluentd_outputs.files }}"
@ -153,7 +148,6 @@
dest: "{{ node_config_directory }}/fluentd/format/{{ item }}.conf"
mode: "0660"
become: true
register: fluentd_format
with_items:
- "apache_access"
- "wsgi_access"
@ -176,7 +170,6 @@
src: "{{ item.path }}"
dest: "{{ node_config_directory }}/fluentd/format/{{ item.path | basename }}"
mode: "0660"
register: fluentd_format_custom
when:
- enable_fluentd | bool
with_items: "{{ find_custom_fluentd_format.files }}"
@ -189,7 +182,6 @@
dest: "{{ node_config_directory }}/fluentd/filter/{{ item.dest }}.conf"
mode: "0660"
become: true
register: fluentd_filter
with_items:
- src: 00-record_transformer
dest: 00-record_transformer
@ -214,7 +206,6 @@
dest: "{{ node_config_directory }}/fluentd/filter/{{ item.path | basename }}"
mode: "0660"
become: true
register: fluentd_filter_custom
with_items: "{{ find_custom_fluentd_filters.files }}"
when: enable_fluentd | bool
notify:
@ -226,7 +217,6 @@
dest: "{{ node_config_directory }}/{{ item }}/td-agent.conf"
mode: "0660"
become: true
register: fluentd_td_agent
with_items:
- "fluentd"
when: enable_fluentd | bool
@ -239,7 +229,6 @@
dest: "{{ node_config_directory }}/cron/logrotate/{{ item.name }}.conf"
mode: "0660"
become: true
register: cron_confs
when: item.enabled | bool
with_items:
- { name: "ansible", enabled: "yes" }
@ -332,7 +321,6 @@
dimensions: "{{ item.value.dimensions }}"
privileged: "{{ item.value.privileged | default(False) }}"
environment: "{{ item.value.environment }}"
register: check_common_containers
when:
- kolla_action != "config"
- item.value.enabled | bool

View File

@ -0,0 +1,6 @@
---
- name: Inspect common services
include_role:
name: inspect
vars:
inspect_services: "{{ common_services }}"

View File

@ -3,10 +3,6 @@
vars:
service_name: "congress-api"
service: "{{ congress_services[service_name] }}"
config_json: "{{ congress_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
congress_conf: "{{ congress_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ congress_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
congress_api_container: "{{ check_congress_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,21 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or congress_conf.changed | bool
or policy_overwriting.changed | bool
or congress_api_container.changed | bool
- name: Restart congress-policy-engine container
vars:
service_name: "congress-policy-engine"
service: "{{ congress_services[service_name] }}"
config_json: "{{ congress_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
congress_conf: "{{ congress_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ congress_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
congress_policy_engin_container: "{{ check_congress_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -42,21 +28,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or congress_conf.changed | bool
or policy_overwriting.changed | bool
or congress_policy_engin_container.changed | bool
- name: Restart congress-datasource container
vars:
service_name: "congress-datasource"
service: "{{ congress_services[service_name] }}"
config_json: "{{ congress_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
congress_conf: "{{ congress_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ congress_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
congress_datasource_container: "{{ check_congress_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -67,9 +43,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or congress_conf.changed | bool
or policy_overwriting.changed | bool
or congress_datasource_container.changed | bool

View File

@ -35,7 +35,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: congress_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -56,7 +55,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/congress.conf"
mode: "0660"
become: true
register: congress_confs
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -70,7 +68,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ congress_policy_file }}"
mode: "0660"
become: true
register: congress_policy_overwriting
when:
- congress_policy_file is defined
- inventory_hostname in groups[item.value.group]
@ -88,7 +85,6 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
dimensions: "{{ item.value.dimensions }}"
register: check_congress_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -3,10 +3,6 @@
vars:
service_name: "cyborg-api"
service: "{{ cyborg_services[service_name] }}"
config_json: "{{ cyborg_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
cyborg_conf: "{{ cyborg_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ cyborg_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
cyborg_api_container: "{{ check_cyborg_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,21 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or cyborg_conf.changed | bool
or policy_overwriting.changed | bool
or cyborg_api_container.changed | bool
- name: Restart cyborg-conductor container
vars:
service_name: "cyborg-conductor"
service: "{{ cyborg_services[service_name] }}"
config_json: "{{ cyborg_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
cyborg_conf: "{{ cyborg_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ cyborg_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
cyborg_conductor_container: "{{ check_cyborg_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -42,21 +28,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or cyborg_conf.changed | bool
or policy_overwriting.changed | bool
or cyborg_conductor_container.changed | bool
- name: Restart cyborg-agent container
vars:
service_name: "cyborg-agent"
service: "{{ cyborg_services[service_name] }}"
config_json: "{{ cyborg_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
cyborg_conf: "{{ cyborg_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ cyborg_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
cyborg_agent_container: "{{ check_cyborg_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -67,9 +43,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or cyborg_conf.changed | bool
or policy_overwriting.changed | bool
or cyborg_agent_container.changed | bool

View File

@ -35,16 +35,13 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ cyborg_policy_file }}"
mode: "0660"
become: true
register: cyborg_policy_overwriting
when:
- cyborg_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ cyborg_services }}"
notify:
- Restart cyborg-api container
- Restart cyborg-agent container
- Restart cyborg-conductor container
- Restart {{ item.key }} container
- name: Copying over config.json files for services
template:
@ -52,15 +49,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: cyborg_config_jsons
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ cyborg_services }}"
notify:
- Restart cyborg-api container
- Restart cyborg-agent container
- Restart cyborg-conductor container
- Restart {{ item.key }} container
- name: Copying over cyborg.conf
vars:
@ -75,15 +69,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/cyborg.conf"
mode: "0660"
become: true
register: cyborg_confs
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ cyborg_services }}"
notify:
- Restart cyborg-api container
- Restart cyborg-agent container
- Restart cyborg-conductor container
- Restart {{ item.key }} container
- name: Checking whether cyborg-api-paste.ini file exists
vars:
@ -100,11 +91,11 @@
template:
src: "{{ node_custom_config }}/cyborg/cyborg-api-paste.ini"
dest: "{{ node_config_directory }}/cyborg-api/api-paste.ini"
mode: "0660"
when:
- inventory_hostname in groups['cyborg-api']
- service.enabled | bool
- check_cyborg_api_paste_ini.stat.exists
register: cyborg_api_paste
notify:
- Restart cyborg-api container
@ -117,13 +108,10 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_cyborg_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ cyborg_services }}"
notify:
- Restart cyborg-api container
- Restart cyborg-agent container
- Restart cyborg-conductor container
- Restart {{ item.key }} container

View File

@ -3,8 +3,6 @@
vars:
service_name: "designate-backend-bind9"
service: "{{ designate_services[service_name] }}"
config_json: "{{ designate_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
designate_backend_bind9_container: "{{ check_designate_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -15,22 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or designate_rndc_conf.changed | bool
or designate_rndc_key_file.changed | bool
or designate_named.changed | bool
or designate_backend_bind9_container.changed | bool
- name: Restart designate-api container
vars:
service_name: "designate-api"
service: "{{ designate_services[service_name] }}"
config_json: "{{ designate_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
designate_conf: "{{ designate_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ designate_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
designate_api_container: "{{ check_designate_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -41,21 +28,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or designate_conf.changed | bool
or policy_overwriting.changed | bool
or designate_api_container.changed | bool
- name: Restart designate-central container
vars:
service_name: "designate-central"
service: "{{ designate_services[service_name] }}"
config_json: "{{ designate_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
designate_conf: "{{ designate_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ designate_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
designate_central_container: "{{ check_designate_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -66,21 +43,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or designate_conf.changed | bool
or policy_overwriting.changed | bool
or designate_central_container.changed | bool
- name: Restart designate-producer container
vars:
service_name: "designate-producer"
service: "{{ designate_services[service_name] }}"
config_json: "{{ designate_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
designate_conf: "{{ designate_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ designate_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
designate_producer_container: "{{ check_designate_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -91,21 +58,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or designate_conf.changed | bool
or policy_overwriting.changed | bool
or designate_producer_container.changed | bool
- name: Restart designate-mdns container
vars:
service_name: "designate-mdns"
service: "{{ designate_services[service_name] }}"
config_json: "{{ designate_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
designate_conf: "{{ designate_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ designate_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
designate_mdns_container: "{{ check_designate_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -116,21 +73,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or designate_conf.changed | bool
or policy_overwriting.changed | bool
or designate_mdns_container.changed | bool
- name: Restart designate-worker container
vars:
service_name: "designate-worker"
service: "{{ designate_services[service_name] }}"
config_json: "{{ designate_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
designate_conf: "{{ designate_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ designate_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
designate_worker_container: "{{ check_designate_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -141,24 +88,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or designate_conf.changed | bool
or designate_rndc_conf.changed | bool
or designate_rndc_key_file.changed | bool
or policy_overwriting.changed | bool
or designate_worker_container.changed | bool
or designate_pool.changed | bool
- name: Restart designate-sink container
vars:
service_name: "designate-sink"
service: "{{ designate_services[service_name] }}"
config_json: "{{ designate_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
designate_conf: "{{ designate_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ designate_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
designate_sink_container: "{{ check_designate_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -169,9 +103,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or designate_conf.changed | bool
or policy_overwriting.changed | bool
or designate_sink_container.changed | bool

View File

@ -4,7 +4,6 @@
src: "{{ node_custom_config }}/designate/rndc.conf"
dest: "{{ node_config_directory }}/{{ item.key }}/rndc.conf"
mode: "0660"
register: designate_rndc_conf
when:
- designate_backend_external == 'bind9'
- item.key in [ "designate-worker" ]
@ -12,14 +11,13 @@
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
notify:
- Restart designate-worker container
- Restart {{ item.key }} container
- name: Copying over rndc.key (designate_backend_external)
template:
src: "{{ node_custom_config }}/designate/rndc.key"
dest: "{{ node_config_directory }}/{{ item.key }}/rndc.key"
mode: "0660"
register: designate_rndc_key_file
when:
- designate_backend_external == 'bind9'
- item.key in [ "designate-worker" ]
@ -27,4 +25,4 @@
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
notify:
- Restart designate-worker container
- Restart {{ item.key }} container

View File

@ -35,19 +35,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: designate_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
notify:
- Restart designate-api container
- Restart designate-central container
- Restart designate-producer container
- Restart designate-mdns container
- Restart designate-sink container
- Restart designate-backend-bind9 container
- Restart designate-worker container
- Restart {{ item.key }} container
- name: Copying over designate.conf
vars:
@ -62,18 +55,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/designate.conf"
mode: "0660"
become: true
register: designate_confs
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
notify:
- Restart designate-api container
- Restart designate-central container
- Restart designate-producer container
- Restart designate-mdns container
- Restart designate-sink container
- Restart designate-worker container
- Restart {{ item.key }} container
- name: Copying over pools.yaml
vars:
@ -83,7 +70,6 @@
dest: "{{ node_config_directory }}/designate-worker/pools.yaml"
mode: "0660"
become: true
register: designate_pool
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -101,7 +87,6 @@
dest: "{{ node_config_directory }}/designate-backend-bind9/named.conf"
mode: "0660"
become: true
register: designate_named
when:
- designate_backend == 'bind9'
- inventory_hostname in groups[service.group]
@ -120,7 +105,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/rndc.conf"
mode: "0660"
become: true
register: designate_rndc_conf
when:
- designate_backend == 'bind9' and designate_backend_external == 'no'
- item.key in [ "designate-backend-bind9", "designate-worker" ]
@ -128,8 +112,7 @@
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
notify:
- Restart designate-backend-bind9 container
- Restart designate-worker container
- Restart {{ item.key }} container
- name: Copying over rndc.key
template:
@ -137,7 +120,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/rndc.key"
mode: "0660"
become: true
register: designate_rndc_key_file
when:
- designate_backend == 'bind9' and designate_backend_external == 'no'
- item.key in [ "designate-backend-bind9", "designate-worker" ]
@ -145,8 +127,7 @@
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
notify:
- Restart designate-backend-bind9 container
- Restart designate-worker container
- Restart {{ item.key }} container
- include_tasks: backend_external.yml
when: designate_backend_external == 'bind9'
@ -157,19 +138,13 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ designate_policy_file }}"
mode: "0660"
become: true
register: designate_policy_overwriting
when:
- designate_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
notify:
- Restart designate-api container
- Restart designate-central container
- Restart designate-producer container
- Restart designate-mdns container
- Restart designate-sink container
- Restart designate-worker container
- Restart {{ item.key }} container
- name: Check designate containers
become: true
@ -180,17 +155,10 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
dimensions: "{{ item.value.dimensions }}"
register: check_designate_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
notify:
- Restart designate-api container
- Restart designate-central container
- Restart designate-producer container
- Restart designate-mdns container
- Restart designate-sink container
- Restart designate-backend-bind9 container
- Restart designate-worker container
- Restart {{ item.key }} container

View File

@ -3,9 +3,6 @@
vars:
service_name: "elasticsearch"
service: "{{ elasticsearch_services[service_name] }}"
config_json: "{{ elasticsearch_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
elasticsearch_conf: "{{ elasticsearch_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
elasticsearch_container: "{{ check_elasticsearch_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,8 +14,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or elasticsearch_conf.changed | bool
or elasticsearch_container.changed | bool

View File

@ -27,13 +27,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: elasticsearch_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ elasticsearch_services }}"
notify:
- Restart elasticsearch container
- Restart {{ item.key }} container
- name: Copying over elasticsearch.yml
template:
@ -41,13 +40,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ item.key }}.yml"
mode: "0660"
become: true
register: elasticsearch_confs
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ elasticsearch_services }}"
notify:
- Restart elasticsearch container
- Restart {{ item.key }} container
- name: Check elasticsearch containers
become: true
@ -59,11 +57,10 @@
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
environment: "{{ item.value.environment }}"
register: check_elasticsearch_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ elasticsearch_services }}"
notify:
- Restart elasticsearch container
- Restart {{ item.key }} container

View File

@ -3,8 +3,6 @@
vars:
service_name: "etcd"
service: "{{ etcd_services[service_name] }}"
config_json: "{{ etcd_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
etcd_container: "{{ check_etcd_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -16,7 +14,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- service.enabled | bool
- inventory_hostname in groups[service.group]
- config_json.changed | bool
or etcd_container.changed | bool

View File

@ -18,13 +18,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: etcd_config_jsons
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ etcd_services }}"
notify:
- Restart etcd container
- Restart {{ item.key }} container
- name: Check etcd containers
become: true
@ -36,11 +35,10 @@
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
environment: "{{ item.value.environment }}"
register: check_etcd_containers
when:
- kolla_action != "config"
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ etcd_services }}"
notify:
- Restart etcd container
- Restart {{ item.key }} container

View File

@ -3,10 +3,6 @@
vars:
service_name: "freezer-api"
service: "{{ freezer_services[service_name] }}"
config_json: "{{ freezer_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
freezer_conf: "{{ freezer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ freezer_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
freezer_api_container: "{{ check_freezer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,22 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or wsgi_freezer_api.changed | bool
or freezer_conf.changed | bool
or policy_overwriting.changed | bool
or freezer_api_container.changed | bool
- name: Restart freezer-scheduler container
vars:
service_name: "freezer-scheduler"
service: "{{ freezer_services[service_name] }}"
config_json: "{{ freezer_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
freezer_conf: "{{ freezer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ freezer_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
freezer_scheduler_container: "{{ check_freezer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -43,9 +28,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or freezer_conf.changed | bool
or policy_overwriting.changed | bool
or freezer_scheduler_container.changed | bool

View File

@ -35,7 +35,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: freezer_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -51,7 +50,6 @@
dest: "{{ node_config_directory }}/freezer-api/wsgi-freezer-api.conf"
mode: "0660"
become: true
register: wsgi_freezer_api
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -71,7 +69,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/freezer.conf"
mode: "0660"
become: true
register: freezer_confs
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -85,7 +82,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ freezer_policy_file }}"
mode: "0660"
become: true
register: freezer_policy_overwriting
when:
- freezer_policy_file is defined
- inventory_hostname in groups[item.value.group]
@ -103,7 +99,6 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
dimensions: "{{ item.value.dimensions }}"
register: check_freezer_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -3,10 +3,6 @@
vars:
service_name: "glance-api"
service: "{{ glance_services[service_name] }}"
config_json: "{{ glance_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
glance_conf: "{{ glance_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ glance_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
glance_api_container: "{{ check_glance_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -18,13 +14,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in glance_api_hosts
- service.enabled | bool
- config_json.changed | bool
or glance_cache_conf.changed | bool
or glance_conf.changed | bool
or glance_swift_conf.changed | bool
or policy_overwriting.changed | bool
or glance_api_container.changed | bool
or ( glance_upgrading is defined and glance_upgrading | bool )
or ( glance_api_ceph_files is defined and glance_api_ceph_files.changed | bool )

View File

@ -9,6 +9,8 @@
mode: "0660"
become: true
when: inventory_hostname in groups['glance-api']
notify:
- Restart glance-api container
- include_tasks: ../../ceph_pools.yml
vars:
@ -37,6 +39,8 @@
mode: "0600"
become: true
when: inventory_hostname in groups['glance-api']
notify:
- Restart glance-api container
- name: Ensuring config directory has correct owner and permission
become: true

View File

@ -45,13 +45,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: glance_config_jsons
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ glance_services }}"
notify:
- Restart glance-api container
- Restart {{ item.key }} container
- name: Copying over glance-*.conf
vars:
@ -66,13 +65,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ item.key }}.conf"
mode: "0660"
become: true
register: glance_confs
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ glance_services }}"
notify:
- Restart glance-api container
- Restart {{ item.key }} container
- name: Copying over glance-cache.conf for glance_api
vars:
@ -86,7 +84,6 @@
dest: "{{ node_config_directory }}/glance-api/glance-cache.conf"
mode: "0660"
become: true
register: glance_cache_conf
when:
- glance_api.enabled | bool
- inventory_hostname in groups[glance_api.group]
@ -106,7 +103,6 @@
dest: "{{ node_config_directory }}/glance-api/glance-swift.conf"
mode: "0660"
become: true
register: glance_swift_conf
when:
- glance_api.enabled | bool
- inventory_hostname in groups[glance_api.group]
@ -120,14 +116,13 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ glance_policy_file }}"
mode: "0660"
become: true
register: glance_policy_overwriting
when:
- glance_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ glance_services }}"
notify:
- Restart glance-api container
- Restart {{ item.key }} container
- name: Check glance containers
become: true
@ -139,11 +134,10 @@
environment: "{{ item.value.environment | default(omit) }}"
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
dimensions: "{{ item.value.dimensions }}"
register: check_glance_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ glance_services }}"
notify:
- Restart glance-api container
- Restart {{ item.key }} container

View File

@ -5,7 +5,6 @@
dest: "{{ node_config_directory }}/glance-api/"
mode: "0660"
become: true
register: glance_api_ceph_files
when: inventory_hostname in groups['glance-api']
with_fileglob:
- "{{ node_custom_config }}/glance/ceph*"

View File

@ -3,10 +3,6 @@
vars:
service_name: "gnocchi-api"
service: "{{ gnocchi_services[service_name] }}"
config_json: "{{ gnocchi_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
gnocchi_conf: "{{ gnocchi_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ gnocchi_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
gnocchi_api_container: "{{ check_gnocchi_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,22 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or gnocchi_conf.changed | bool
or policy_overwriting.changed | bool
or gnocchi_wsgi_conf.changed | bool
or gnocchi_api_container.changed | bool
- name: Restart gnocchi-metricd container
vars:
service_name: "gnocchi-metricd"
service: "{{ gnocchi_services[service_name] }}"
config_json: "{{ gnocchi_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
gnocchi_conf: "{{ gnocchi_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ gnocchi_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
gnocchi_metricd_container: "{{ check_gnocchi_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -43,21 +28,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or gnocchi_conf.changed | bool
or policy_overwriting.changed | bool
or gnocchi_metricd_container.changed | bool
- name: Restart gnocchi-statsd container
vars:
service_name: "gnocchi-statsd"
service: "{{ gnocchi_services[service_name] }}"
config_json: "{{ gnocchi_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
gnocchi_conf: "{{ gnocchi_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ gnocchi_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
gnocchi_statsd_container: "{{ check_gnocchi_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -68,9 +43,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or gnocchi_conf.changed | bool
or policy_overwriting.changed | bool
or gnocchi_statsd_container.changed | bool

View File

@ -13,6 +13,8 @@
- "gnocchi-api"
- "gnocchi-metricd"
- "gnocchi-statsd"
notify:
- Restart {{ item }} container
- include_tasks: ../../ceph_pools.yml
vars:
@ -45,3 +47,5 @@
- "gnocchi-api"
- "gnocchi-metricd"
- "gnocchi-statsd"
notify:
- Restart {{ item }} container

View File

@ -45,15 +45,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: gnocchi_config_jsons
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ gnocchi_services }}"
notify:
- Restart gnocchi-api container
- Restart gnocchi-metricd container
- Restart gnocchi-statsd container
- Restart {{ item.key }} container
- name: Copying over gnocchi.conf
vars:
@ -68,15 +65,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/gnocchi.conf"
mode: "0660"
become: true
register: gnocchi_confs
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ gnocchi_services }}"
notify:
- Restart gnocchi-api container
- Restart gnocchi-metricd container
- Restart gnocchi-statsd container
- Restart {{ item.key }} container
- name: Copying over wsgi-gnocchi.conf
vars:
@ -86,7 +80,6 @@
dest: "{{ node_config_directory }}/{{ item }}/wsgi-gnocchi.conf"
mode: "0660"
become: true
register: gnocchi_wsgi_conf
when:
- inventory_hostname in groups['gnocchi-api']
- service.enabled | bool
@ -101,16 +94,13 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ gnocchi_policy_file }}"
mode: "0660"
become: true
register: gnocchi_policy_overwriting
when:
- gnocchi_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ gnocchi_services }}"
notify:
- Restart gnocchi-api container
- Restart gnocchi-metricd container
- Restart gnocchi-statsd container
- Restart {{ item.key }} container
- name: Check gnocchi containers
become: true
@ -121,13 +111,10 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_gnocchi_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ gnocchi_services }}"
notify:
- Restart gnocchi-api container
- Restart gnocchi-metricd container
- Restart gnocchi-statsd container
- Restart {{ item.key }} container

View File

@ -11,9 +11,7 @@
- "gnocchi-metricd"
- "gnocchi-statsd"
notify:
- Restart gnocchi-api container
- Restart gnocchi-metricd container
- Restart gnocchi-statsd container
- Restart {{ item }} container
- name: Copy over ceph gnocchi keyring
copy:
@ -27,9 +25,7 @@
- "gnocchi-metricd"
- "gnocchi-statsd"
notify:
- Restart gnocchi-api container
- Restart gnocchi-metricd container
- Restart gnocchi-statsd container
- Restart {{ item }} container
- name: Ensuring config directory has correct owner and permission
become: true

View File

@ -3,9 +3,6 @@
vars:
service_name: "grafana"
service: "{{ grafana_services[service_name] }}"
config_json: "{{ grafana_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
grafana_conf: "{{ grafana_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
grafana_container: "{{ check_grafana_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -16,10 +13,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or grafana_conf.changed | bool
or grafana_container.changed | bool
or grafana_home_dashboard.changed | bool
or grafana_prometheus_data_source.changed | bool

View File

@ -24,13 +24,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: grafana_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ grafana_services }}"
notify:
- Restart grafana container
- Restart {{ item.key }} container
- name: Copying over grafana.ini
vars:
@ -43,13 +42,12 @@
dest: "{{ node_config_directory }}/grafana/grafana.ini"
mode: "0660"
become: true
register: grafana_confs
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ grafana_services }}"
notify:
- Restart grafana container
- Restart {{ item.key }} container
- name: Copying over extra configuration file
become: true
@ -62,7 +60,7 @@
with_items:
- "{{ check_extra_conf_grafana.files }}"
notify:
- Restart grafana container
- Restart {{ item.key }} container
- name: Check if custom grafana home dashboard exists
local_action: "stat path={{ node_custom_config }}/grafana/grafana_home_dashboard.json"
@ -74,10 +72,9 @@
src: "{{ node_custom_config }}/grafana/grafana_home_dashboard.json"
dest: "{{ node_config_directory }}/grafana/grafana_home_dashboard.json"
mode: "0660"
register: grafana_home_dashboard
when: grafana_custom_dashboard_file.stat.exists
notify:
- Restart grafana container
- Restart {{ item.key }} container
- name: Configuring Prometheus as data source for Grafana
vars:
@ -87,7 +84,6 @@
dest: "{{ node_config_directory }}/grafana/prometheus.yaml"
mode: "0660"
become: true
register: grafana_prometheus_data_source
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -97,7 +93,7 @@
- "{{ node_custom_config }}/grafana/prometheus.yaml"
- "prometheus.yaml.j2"
notify:
- Restart grafana container
- Restart {{ item.key }} container
- name: Check grafana containers
become: true
@ -108,11 +104,10 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_grafana_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ grafana_services }}"
notify:
- Restart grafana container
- Restart {{ item.key }} container

View File

@ -3,10 +3,6 @@
vars:
service_name: "heat-api"
service: "{{ heat_services[service_name] }}"
config_json: "{{ heat_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
heat_conf: "{{ heat_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ heat_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
heat_api_container: "{{ check_heat_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,21 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or heat_conf.changed | bool
or policy_overwriting.changed | bool
or heat_api_container.changed | bool
- name: Restart heat-api-cfn container
vars:
service_name: "heat-api-cfn"
service: "{{ heat_services[service_name] }}"
config_json: "{{ heat_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
heat_conf: "{{ heat_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ heat_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
heat_api_cfn_container: "{{ check_heat_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -42,21 +28,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or heat_conf.changed | bool
or policy_overwriting.changed | bool
or heat_api_cfn_container.changed | bool
- name: Restart heat-engine container
vars:
service_name: "heat-engine"
service: "{{ heat_services[service_name] }}"
config_json: "{{ heat_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
heat_conf: "{{ heat_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ heat_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
heat_engine_container: "{{ check_heat_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -67,9 +43,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or heat_conf.changed | bool
or policy_overwriting.changed | bool
or heat_engine_container.changed | bool

View File

@ -35,15 +35,12 @@
src: "{{ item.key }}.json.j2"
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
register: heat_config_jsons
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ heat_services }}"
notify:
- Restart heat-api container
- Restart heat-api-cfn container
- Restart heat-engine container
- Restart {{ item.key }} container
- name: Copying over the heat-engine environment file
become: true
@ -67,15 +64,12 @@
- "{{ node_custom_config }}/heat/{{ inventory_hostname }}/heat.conf"
dest: "{{ node_config_directory }}/{{ item.key }}/heat.conf"
mode: "0660"
register: heat_confs
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ heat_services }}"
notify:
- Restart heat-api container
- Restart heat-api-cfn container
- Restart heat-engine container
- Restart {{ item.key }} container
- name: Copying over existing policy file
become: true
@ -83,15 +77,13 @@
src: "{{ heat_policy_file_path }}"
dest: "{{ node_config_directory }}/{{ item.key }}/{{ heat_policy_file }}"
mode: "0660"
register: heat_policy_overwriting
when:
- heat_policy_file is defined
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ heat_services }}"
notify:
- Restart heat-api container
- Restart heat-api-cfn container
- Restart heat-engine container
- Restart {{ item.key }} container
- name: Check heat containers
become: true
@ -102,13 +94,10 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
dimensions: "{{ item.value.dimensions }}"
register: check_heat_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ heat_services }}"
notify:
- Restart heat-api container
- Restart heat-api-cfn container
- Restart heat-engine container
- Restart {{ item.key }} container

View File

@ -14,11 +14,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- horizon_config_json is changed
or horizon_conf is changed
or horizon_local_settings is changed
or horizon_custom_local_settings is changed
or policy_jsons is changed
or check_horizon_container is changed

View File

@ -54,7 +54,6 @@
src: "horizon.json.j2"
dest: "{{ node_config_directory }}/horizon/config.json"
mode: "0660"
register: horizon_config_json
when:
- horizon.enabled | bool
- inventory_hostname in groups[horizon.group]
@ -69,7 +68,6 @@
src: "{{ item }}"
dest: "{{ node_config_directory }}/horizon/horizon.conf"
mode: "0660"
register: horizon_conf
with_first_found:
- "{{ node_custom_config }}/horizon/{{ inventory_hostname }}/horizon.conf"
- "{{ node_custom_config }}/horizon/horizon.conf"
@ -92,7 +90,6 @@
- "{{ node_custom_config }}/horizon/{{ inventory_hostname }}/local_settings"
- "{{ node_custom_config }}/horizon/local_settings"
- "local_settings.j2"
register: horizon_local_settings
when:
- horizon.enabled | bool
- inventory_hostname in groups[horizon.group]
@ -111,7 +108,6 @@
- "{{ node_custom_config }}/horizon/{{ inventory_hostname }}/custom_local_settings"
- "{{ node_custom_config }}/horizon/custom_local_settings"
- "custom_local_settings.j2"
register: horizon_custom_local_settings
when:
- horizon.enabled | bool
- inventory_hostname in groups[horizon.group]
@ -126,7 +122,6 @@
src: "{{ item }}"
dest: "{{ node_config_directory }}/horizon/{{ item | basename }}"
mode: "0660"
register: policy_jsons
when:
- horizon.enabled | bool
- inventory_hostname in groups[horizon.group]
@ -146,7 +141,6 @@
environment: "{{ horizon.environment }}"
volumes: "{{ horizon.volumes }}"
dimensions: "{{ horizon.dimensions }}"
register: check_horizon_container
when:
- kolla_action != "config"
- inventory_hostname in groups[horizon.group]

View File

@ -3,8 +3,6 @@
vars:
service_name: "influxdb"
service: "{{ influxdb_services[service_name] }}"
config_json: "{{ influxdb_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
influxdb_container: "{{ check_influxdb_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -15,8 +13,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or influxdb_confs.changed | bool
or influxdb_container.changed | bool

View File

@ -18,7 +18,6 @@
dest: "{{ node_config_directory }}/influxdb/config.json"
mode: "0660"
become: true
register: influxdb_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -34,7 +33,6 @@
dest: "{{ node_config_directory }}/influxdb/influxdb.conf"
mode: "0660"
become: true
register: influxdb_confs
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -54,7 +52,6 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_influxdb_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -3,10 +3,6 @@
vars:
service_name: "ironic-conductor"
service: "{{ ironic_services[service_name] }}"
config_json: "{{ ironic_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ironic_conf: "{{ ironic_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ ironic_policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ironic_conductor_container: "{{ check_ironic_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -18,21 +14,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or ironic_conf.changed | bool
or policy_json.changed | bool
or ironic_conductor_container.changed | bool
- name: Restart ironic-api container
vars:
service_name: "ironic-api"
service: "{{ ironic_services[service_name] }}"
config_json: "{{ ironic_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ironic_conf: "{{ ironic_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ ironic_policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ironic_api_container: "{{ check_ironic_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -43,20 +29,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or ironic_conf.changed | bool
or policy_json.changed | bool
or ironic_api_container.changed | bool
- name: Restart ironic-inspector container
vars:
service_name: "ironic-inspector"
service: "{{ ironic_services[service_name] }}"
config_json: "{{ ironic_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ ironic_policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ironic_inspector_container: "{{ check_ironic_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -68,19 +45,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or ironic_inspector_confs.changed | bool
or policy_json.changed | bool
or ironic_inspector_container.changed | bool
- name: Restart ironic-pxe container
vars:
service_name: "ironic-pxe"
service: "{{ ironic_services[service_name] }}"
config_json: "{{ ironic_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ironic_pxe_container: "{{ check_ironic_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -91,20 +60,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or ironic_pxe_confs.changed | bool
or ironic_pxe_uefi_confs.changed | bool
or ironic_kernel.changed | bool
or ironic_pxe_container.changed | bool
- name: Restart ironic-ipxe container
vars:
service_name: "ironic-ipxe"
service: "{{ ironic_services[service_name] }}"
config_json: "{{ ironic_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ironic_ipxe_container: "{{ check_ironic_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -115,20 +75,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or ironic_ipxe_inspector_boot_script.changed | bool
or ironic_ipxe_apache_confs.changed | bool
or ironic_kernel_ipxe.changed | bool
or ironic_ipxe_container.changed | bool
- name: Restart ironic-dnsmasq container
vars:
service_name: "ironic-dnsmasq"
service: "{{ ironic_services[service_name] }}"
config_json: "{{ ironic_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ironic_dnsmasq_container: "{{ check_ironic_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -140,8 +91,3 @@
cap_add: "{{ service.cap_add }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or ironic_dnsmasq_confs.changed | bool
or ironic_dnsmasq_container.changed | bool

View File

@ -42,7 +42,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: ironic_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -63,7 +62,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/ironic.conf"
mode: "0660"
become: true
register: ironic_confs
when:
- item.key in [ "ironic-api", "ironic-conductor" ]
- inventory_hostname in groups[item.value.group]
@ -85,7 +83,6 @@
dest: "{{ node_config_directory }}/ironic-inspector/inspector.conf"
mode: "0660"
become: true
register: ironic_inspector_confs
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -100,7 +97,6 @@
dest: "{{ node_config_directory }}/ironic-dnsmasq/dnsmasq.conf"
mode: "0660"
become: true
register: ironic_dnsmasq_confs
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -119,7 +115,6 @@
dest: "{{ node_config_directory }}/ironic-pxe/default"
mode: "0660"
become: true
register: ironic_pxe_confs
with_first_found:
- "{{ node_custom_config }}/ironic/pxelinux.default"
- "{{ node_custom_config }}/ironic/{{ inventory_hostname }}/pxelinux.default"
@ -142,7 +137,6 @@
dest: "{{ node_config_directory }}/ironic-pxe/default"
mode: "0660"
become: true
register: ironic_pxe_uefi_confs
with_first_found:
- "{{ node_custom_config }}/ironic/ironic_pxe_uefi.default"
- "{{ node_custom_config }}/ironic/{{ inventory_hostname }}/ironic_pxe_uefi.default"
@ -162,14 +156,12 @@
dest: "{{ node_config_directory }}/ironic-pxe/{{ item }}"
mode: "0660"
become: true
register: ironic_kernel
with_items:
- "ironic-agent.kernel"
- "ironic-agent.initramfs"
when:
# Only required when Ironic inspector is in use.
- groups['ironic-inspector'] | length > 0
- inventory_hostname in groups['ironic-pxe']
- inventory_hostname in groups[service.group]
- service.enabled | bool
- not enable_ironic_pxe_uefi | bool
@ -185,7 +177,6 @@
dest: "{{ node_config_directory }}/ironic-ipxe/{{ item }}"
mode: "0660"
become: true
register: ironic_kernel_ipxe
with_items:
- "ironic-agent.kernel"
- "ironic-agent.initramfs"
@ -205,7 +196,6 @@
dest: "{{ node_config_directory }}/ironic-ipxe/inspector.ipxe"
mode: "0660"
become: true
register: ironic_ipxe_inspector_boot_script
with_first_found:
- "{{ node_custom_config }}/ironic/{{ inventory_hostname }}/inspector.ipxe"
- "{{ node_custom_config }}/ironic/inspector.ipxe"
@ -226,7 +216,6 @@
dest: "{{ node_config_directory }}/ironic-ipxe/httpd.conf"
mode: "0660"
become: true
register: ironic_ipxe_apache_confs
with_first_found:
- "{{ node_custom_config }}/ironic/ironic-ipxe-httpd.conf"
- "ironic-ipxe-httpd.conf.j2"
@ -247,7 +236,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ ironic_policy_file }}"
mode: "0660"
become: true
register: ironic_policy_jsons
when:
- ironic_policy_file is defined
- item.key in services_require_policy_json
@ -268,7 +256,6 @@
cap_add: "{{ item.value.cap_add|default([]) }}"
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
dimensions: "{{ item.value.dimensions }}"
register: check_ironic_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -3,9 +3,6 @@
vars:
service_name: "kafka"
service: "{{ kafka_services[service_name] }}"
config_json: "{{ kafka_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
kafka_conf: "{{ kafka_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
kafka_container: "{{ check_kafka_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,8 +14,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or kafka_conf.changed | bool
or kafka_container.changed | bool

View File

@ -18,7 +18,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: kafka_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -35,7 +34,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/kafka.server.properties"
mode: "0660"
become: true
register: kafka_confs
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -53,7 +51,6 @@
volumes: "{{ item.value.volumes }}"
environment: "{{ item.value.environment }}"
dimensions: "{{ item.value.dimensions }}"
register: check_kafka_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -3,9 +3,6 @@
vars:
service_name: "karbor-api"
service: "{{ karbor_services[service_name] }}"
config_json: "{{ karbor_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
karbor_conf: "{{ karbor_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
karbor_api_container: "{{ check_karbor_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -16,19 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or karbor_conf.changed | bool
or karbor_api_container.changed | bool
- name: Restart karbor-protection container
vars:
service_name: "karbor-protection"
service: "{{ karbor_services[service_name] }}"
config_json: "{{ karbor_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
karbor_conf: "{{ karbor_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
karbor_protection_container: "{{ check_karbor_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -39,21 +28,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or karbor_conf.changed | bool
or providers_conf.changed
or openstack_infra_conf.changed | bool
or karbor_protection_container.changed | bool
- name: Restart karbor-operationengine container
vars:
service_name: "karbor-operationengine"
service: "{{ karbor_services[service_name] }}"
config_json: "{{ karbor_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
karbor_conf: "{{ karbor_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
karbor_operationengine_container: "{{ check_karbor_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -64,8 +43,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or karbor_conf.changed | bool
or karbor_operationengine_container.changed | bool

View File

@ -18,15 +18,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: karbor_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ karbor_services }}"
notify:
- Restart karbor-api container
- Restart karbor-protection container
- Restart karbor-operationengine container
- Restart {{ item.key }} container
- name: Copying over karbor.conf
vars:
@ -41,15 +38,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/karbor.conf"
mode: "0660"
become: true
register: karbor_confs
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ karbor_services }}"
notify:
- Restart karbor-api container
- Restart karbor-protection container
- Restart karbor-operationengine container
- Restart {{ item.key }} container
- name: Copying over provider configs
vars:
@ -62,7 +56,6 @@
become: true
with_fileglob:
- "{{ node_custom_config }}/karbor/{{ service_name }}/providers.d/*"
register: providers_conf
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -80,7 +73,6 @@
dest: "{{ node_config_directory }}/{{ service_name }}/providers.d/openstack-infra.conf"
mode: "0660"
become: true
register: openstack_infra_conf
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -96,13 +88,10 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_karbor_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ karbor_services }}"
notify:
- Restart karbor-api container
- Restart karbor-protection container
- Restart karbor-operationengine container
- Restart {{ item.key }} container

View File

@ -24,17 +24,12 @@
run_once: True
when:
- kolla_action == "upgrade"
- service.enabled | bool
- inventory_hostname == groups[service.group][0]
- name: Restart keystone container
vars:
service_name: "keystone"
service: "{{ keystone_services[service_name] }}"
config_json: "{{ keystone_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
keystone_conf: "{{ keystone_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ keystone_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
keystone_container: "{{ check_keystone_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -45,22 +40,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or keystone_conf.changed | bool
or keystone_domains.changed | bool
or policy_overwriting.changed | bool
or keystone_wsgi.changed | bool
or keystone_paste_ini.changed | bool
or keystone_container.changed | bool
- name: Restart keystone-ssh container
vars:
service_name: "keystone-ssh"
service: "{{ keystone_services[service_name] }}"
config_json: "{{ keystone_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
keystone_ssh_container: "{{ check_keystone_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -71,20 +55,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or keystone_ssh_confs.changed | bool
or keystone_ssh_container.changed | bool
- name: Restart keystone-fernet container
vars:
service_name: "keystone-fernet"
service: "{{ keystone_services[service_name] }}"
config_json: "{{ keystone_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
keystone_conf: "{{ keystone_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ keystone_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
keystone_fernet_container: "{{ check_keystone_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -95,13 +70,6 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or keystone_conf.changed | bool
or policy_overwriting.changed | bool
or keystone_fernet_confs.changed | bool
or keystone_fernet_container.changed | bool
- name: Finish keystone database upgrade
vars:
@ -125,5 +93,4 @@
run_once: True
when:
- kolla_action == "upgrade"
- service.enabled | bool
- inventory_hostname == groups[service.group][-1]

View File

@ -39,16 +39,13 @@
src: "{{ item.key }}.json.j2"
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
register: keystone_config_jsons
become: true
with_dict: "{{ keystone_services }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
notify:
- Restart keystone container
- Restart keystone-ssh container
- Restart keystone-fernet container
- Restart {{ item.key }} container
- name: Copying over keystone.conf
vars:
@ -63,15 +60,13 @@
dest: "{{ node_config_directory }}/{{ item.key }}/keystone.conf"
mode: "0660"
become: true
register: keystone_confs
with_dict: "{{ keystone_services }}"
when:
- inventory_hostname in groups[item.value.group]
- item.key in [ "keystone", "keystone-fernet" ]
- item.value.enabled | bool
notify:
- Restart keystone container
- Restart keystone-fernet container
- Restart {{ item.key }} container
- name: Create Keystone domain-specific config directory
vars:
@ -114,7 +109,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ keystone_policy_file }}"
mode: "0660"
become: true
register: keystone_policy_overwriting
when:
- inventory_hostname in groups[item.value.group]
- item.key in [ "keystone", "keystone-fernet" ]
@ -122,8 +116,7 @@
- keystone_policy_file is defined
with_dict: "{{ keystone_services }}"
notify:
- Restart keystone container
- Restart keystone-fernet container
- Restart {{ item.key }} container
- name: Copying over wsgi-keystone.conf
vars:
@ -133,7 +126,6 @@
dest: "{{ node_config_directory }}/keystone/wsgi-keystone.conf"
mode: "0660"
become: true
register: keystone_wsgi
when:
- inventory_hostname in groups[keystone.group]
- keystone.enabled | bool
@ -161,7 +153,6 @@
dest: "{{ node_config_directory }}/keystone/keystone-paste.ini"
mode: "0660"
become: true
register: keystone_paste_ini
when:
- inventory_hostname in groups[keystone.group]
- keystone.enabled | bool
@ -194,7 +185,6 @@
dest: "{{ node_config_directory }}/keystone-fernet/{{ item.dest }}"
mode: "0660"
become: true
register: keystone_fernet_confs
ignore_errors: "{{ ansible_check_mode }}"
with_items:
- { src: "crontab.j2", dest: "crontab" }
@ -216,7 +206,6 @@
dest: "{{ node_config_directory }}/keystone-ssh/{{ item.dest }}"
mode: "0660"
become: true
register: keystone_ssh_confs
with_items:
- { src: "sshd_config.j2", dest: "sshd_config" }
- { src: "id_rsa.pub", dest: "id_rsa.pub" }
@ -239,9 +228,6 @@
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
register: check_keystone_containers
with_dict: "{{ keystone_services }}"
notify:
- Restart keystone container
- Restart keystone-ssh container
- Restart keystone-fernet container
- Restart {{ item.key }} container

View File

@ -3,8 +3,6 @@
vars:
service_name: "kibana"
service: "{{ kibana_services[service_name] }}"
config_json: "{{ kibana_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
kibana_container: "{{ check_kibana_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -15,8 +13,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or kibana_conf.changed | bool
or kibana_container.changed | bool

View File

@ -18,7 +18,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: kibana_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -34,7 +33,6 @@
dest: "{{ node_config_directory }}/kibana/kibana.yml"
mode: "0660"
become: true
register: kibana_conf
with_first_found:
- "{{ node_custom_config }}/kibana/{{ inventory_hostname }}/kibana.yml"
- "{{ node_custom_config }}/kibana/kibana.yml"
@ -54,7 +52,6 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_kibana_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -3,10 +3,6 @@
vars:
service_name: "kuryr"
service: "{{ kuryr_services[service_name] }}"
config_json: "{{ kuryr_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
kuryr_conf: "{{ kuryr_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ kuryr_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
kuryr_container: "{{ check_kuryr_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -19,10 +15,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or kuryr_conf.changed | bool
or kuryr_spec.changed | bool
or policy_overwriting.changed | bool
or kuryr_container.changed | bool

View File

@ -35,7 +35,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: kuryr_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -56,7 +55,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/kuryr.conf"
mode: "0660"
become: true
register: kuryr_confs
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -72,7 +70,6 @@
dest: "{{ node_config_directory }}/{{ item }}/kuryr.spec"
mode: "0660"
become: true
register: kuryr_spec
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -87,7 +84,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ kuryr_policy_file }}"
mode: "0660"
become: true
register: kuryr_policy_overwriting
when:
- kuryr_policy_file is defined
- inventory_hostname in groups[item.value.group]
@ -107,7 +103,6 @@
cap_add: "{{ item.value.cap_add }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_kuryr_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -3,10 +3,6 @@
vars:
service_name: "magnum-api"
service: "{{ magnum_services[service_name] }}"
config_json: "{{ magnum_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
magnum_conf: "{{ magnum_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ magnum_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
magnum_api_container: "{{ check_magnum_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -18,21 +14,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or magnum_conf.changed | bool
or policy_overwriting.changed | bool
or magnum_api_container.changed | bool
- name: Restart magnum-conductor container
vars:
service_name: "magnum-conductor"
service: "{{ magnum_services[service_name] }}"
config_json: "{{ magnum_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
magnum_conf: "{{ magnum_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ magnum_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
magnum_conductor_container: "{{ check_magnum_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -44,9 +30,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or magnum_conf.changed | bool
or policy_overwriting.changed | bool
or magnum_conductor_container.changed | bool

View File

@ -35,14 +35,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: magnum_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ magnum_services }}"
notify:
- Restart magnum-api container
- Restart magnum-conductor container
- Restart {{ item.key }} container
- name: Copying over magnum.conf
vars:
@ -57,14 +55,12 @@
dest: "{{ node_config_directory }}/{{ item.key }}/magnum.conf"
mode: "0660"
become: true
register: magnum_confs
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ magnum_services }}"
notify:
- Restart magnum-api container
- Restart magnum-conductor container
- Restart {{ item.key }} container
- name: Copying over existing policy file
template:
@ -72,15 +68,13 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ magnum_policy_file }}"
mode: "0660"
become: true
register: magnum_policy_overwriting
when:
- magnum_policy_file is defined
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ magnum_services }}"
notify:
- Restart magnum-api container
- Restart magnum-conductor container
- Restart {{ item.key }} container
- name: Check magnum containers
become: true
@ -92,12 +86,10 @@
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
dimensions: "{{ item.value.dimensions }}"
environment: "{{ item.value.environment }}"
register: check_magnum_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ magnum_services }}"
notify:
- Restart magnum-api container
- Restart magnum-conductor container
- Restart {{ item.key }} container

View File

@ -3,10 +3,6 @@
vars:
service_name: "manila-api"
service: "{{ manila_services[service_name] }}"
config_json: "{{ manila_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
manila_conf: "{{ manila_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ manila_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
manila_api_container: "{{ check_manila_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,21 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or manila_conf.changed | bool
or policy_overwriting.changed | bool
or manila_api_container.changed | bool
- name: Restart manila-data container
vars:
service_name: "manila-data"
service: "{{ manila_services[service_name] }}"
config_json: "{{ manila_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
manila_conf: "{{ manila_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ manila_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
manila_data_container: "{{ check_manila_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -43,21 +29,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or manila_conf.changed | bool
or policy_overwriting.changed | bool
or manila_data_container.changed | bool
- name: Restart manila-scheduler container
vars:
service_name: "manila-scheduler"
service: "{{ manila_services[service_name] }}"
config_json: "{{ manila_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
manila_conf: "{{ manila_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ manila_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
manila_scheduler_container: "{{ check_manila_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -68,20 +44,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or manila_conf.changed | bool
or policy_overwriting.changed | bool
or manila_scheduler_container.changed | bool
- name: Restart manila-share container
vars:
service_name: "manila-share"
service: "{{ manila_services[service_name] }}"
config_json: "{{ manila_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ manila_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
manila_share_container: "{{ check_manila_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -94,9 +61,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or manila_conf_share.changed | bool
or policy_overwriting.changed | bool
or manila_share_container.changed | bool

View File

@ -8,6 +8,8 @@
dest: "{{ node_config_directory }}/manila-share/ceph.conf"
mode: "0660"
become: true
notify:
- Restart manila-share container
- name: Pulling cephx keyring for manila
become: true
@ -26,3 +28,5 @@
dest: "{{ node_config_directory }}/manila-share/ceph.client.manila.keyring"
mode: "0600"
become: true
notify:
- Restart manila-share container

View File

@ -49,7 +49,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: manila_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -70,16 +69,13 @@
dest: "{{ node_config_directory }}/{{ item.key }}/manila.conf"
mode: "0660"
become: true
register: manila_confs
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 }}"
notify:
- Restart manila-api container
- Restart manila-data container
- Restart manila-scheduler container
- Restart {{ item.key }} container
- name: Copying over manila-share.conf
vars:
@ -97,7 +93,6 @@
dest: "{{ node_config_directory }}/{{ item }}/manila.conf"
mode: "0660"
become: true
register: manila_conf_share
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -111,7 +106,6 @@
src: "{{ manila_policy_file_path }}"
dest: "{{ node_config_directory }}/{{ item.key }}/{{ manila_policy_file }}"
mode: "0660"
register: manila_policy_overwriting
when:
- manila_policy_file is defined
- inventory_hostname in groups[item.value.group]
@ -130,7 +124,6 @@
privileged: "{{ item.value.privileged|default(False) }}"
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
dimensions: "{{ item.value.dimensions }}"
register: check_manila_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -12,7 +12,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- memcached_config_json.changed | bool
or check_memcached_container.changed | bool

View File

@ -11,14 +11,18 @@
- "memcached"
- name: Copying over config.json files for services
vars:
service: "{{ memcached_services.memcached }}"
template:
src: "{{ item }}.json.j2"
dest: "{{ node_config_directory }}/{{ item }}/config.json"
mode: "0660"
register: memcached_config_json
become: true
with_items:
- "memcached"
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
notify: Restart memcached container
- name: Check memcached container
@ -32,9 +36,8 @@
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
dimensions: "{{ service.dimensions }}"
register: check_memcached_container
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- kolla_action != "config"
notify: Restart memcached container

View File

@ -3,10 +3,6 @@
vars:
service_name: "mistral-api"
service: "{{ mistral_services[service_name] }}"
config_json: "{{ mistral_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
mistral_conf: "{{ mistral_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ mistral_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
mistral_api_container: "{{ check_mistral_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,21 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or mistral_conf.changed | bool
or policy_overwriting.changed | bool
or mistral_api_container.changed | bool
- name: Restart mistral-engine container
vars:
service_name: "mistral-engine"
service: "{{ mistral_services[service_name] }}"
config_json: "{{ mistral_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
mistral_conf: "{{ mistral_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ mistral_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
mistral_engine_container: "{{ check_mistral_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -42,21 +28,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or mistral_conf.changed | bool
or policy_overwriting.changed | bool
or mistral_engine_container.changed | bool
- name: Restart mistral-event-engine container
vars:
service_name: "mistral-event-engine"
service: "{{ mistral_services[service_name] }}"
config_json: "{{ mistral_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
mistral_conf: "{{ mistral_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ mistral_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
mistral_event_engine_container: "{{ check_mistral_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -67,22 +43,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or mistral_conf.changed | bool
or policy_overwriting.changed | bool
or mistral_event_definitions_confs.changed | bool
or mistral_event_engine_container.changed | bool
- name: Restart mistral-executor container
vars:
service_name: "mistral-executor"
service: "{{ mistral_services[service_name] }}"
config_json: "{{ mistral_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
mistral_conf: "{{ mistral_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ mistral_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
mistral_executor_container: "{{ check_mistral_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -93,9 +58,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or mistral_conf.changed | bool
or policy_overwriting.changed | bool
or mistral_executor_container.changed | bool

View File

@ -35,7 +35,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: mistral_config_jsons
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
@ -56,7 +55,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/mistral.conf"
mode: "0660"
become: true
register: mistral_confs
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
@ -70,7 +68,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ mistral_policy_file }}"
mode: "0660"
become: true
register: mistral_policy_overwriting
when:
- mistral_policy_file is defined
- inventory_hostname in groups[item.value.group]
@ -87,7 +84,6 @@
src: "{{ item }}"
dest: "{{ node_config_directory }}/mistral-event-engine/event_definitions.yaml"
mode: "0660"
register: mistral_event_definitions_confs
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -107,7 +103,6 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
dimensions: "{{ item.value.dimensions }}"
register: check_mistral_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -3,8 +3,6 @@
vars:
service_name: "monasca-api"
service: "{{ monasca_services[service_name] }}"
config_json: "{{ monasca_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
monasca_api_container: "{{ check_monasca_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -15,19 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or monasca_api_confs.changed | bool
or monasca_api_wsgi_confs.changed | bool
or monasca_api_container.changed | bool
- name: Restart monasca-log-api container
vars:
service_name: "monasca-log-api"
service: "{{ monasca_services[service_name] }}"
config_json: "{{ monasca_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
monasca_log_api_container: "{{ check_monasca_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -38,19 +28,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or monasca_log_api_confs.changed | bool
or monasca_log_api_wsgi_confs.changed | bool
or monasca_log_api_container.changed | bool
- name: Restart monasca-log-transformer container
vars:
service_name: "monasca-log-transformer"
service: "{{ monasca_services[service_name] }}"
config_json: "{{ monasca_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
monasca_log_transformer_container: "{{ check_monasca_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -61,18 +43,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or monasca_log_transformer_confs.changed | bool
or monasca_log_transformer_container.changed | bool
- name: Restart monasca-log-persister container
vars:
service_name: "monasca-log-persister"
service: "{{ monasca_services[service_name] }}"
config_json: "{{ monasca_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
monasca_log_persister_container: "{{ check_monasca_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -83,19 +58,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or monasca_log_persister_confs.changed | bool
or monasca_log_persister_elasticsearch_template.changed | bool
or monasca_log_persister_container.changed | bool
- name: Restart monasca-log-metrics container
vars:
service_name: "monasca-log-metrics"
service: "{{ monasca_services[service_name] }}"
config_json: "{{ monasca_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
monasca_log_metrics_container: "{{ check_monasca_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -106,18 +73,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or monasca_log_metrics_confs.changed | bool
or monasca_log_metrics_container.changed | bool
- name: Restart monasca-thresh container
vars:
service_name: "monasca-thresh"
service: "{{ monasca_services[service_name] }}"
config_json: "{{ monasca_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
monasca_thresh_container: "{{ check_monasca_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -128,19 +88,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or monasca_thresh_confs.changed | bool
or monasca_thresh_storm_conf.changed | bool
or monasca_thresh_container.changed | bool
- name: Restart monasca-notification container
vars:
service_name: "monasca-notification"
service: "{{ monasca_services[service_name] }}"
config_json: "{{ monasca_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
monasca_notification_container: "{{ check_monasca_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -151,19 +103,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or monasca_notification_confs.changed | bool
or monasca_notification_plugin_templates.changed | bool
or monasca_notification_container.changed | bool
- name: Restart monasca-persister container
vars:
service_name: "monasca-persister"
service: "{{ monasca_services[service_name] }}"
config_json: "{{ monasca_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
monasca_persister_container: "{{ check_monasca_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -174,18 +118,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or monasca_persister_confs.changed | bool
or monasca_persister_container.changed | bool
- name: Restart monasca-agent-collector container
vars:
service_name: "monasca-agent-collector"
service: "{{ monasca_services[service_name] }}"
config_json: "{{ monasca_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
monasca_agent_collector_container: "{{ check_monasca_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -197,19 +134,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or monasca_agent_collector_confs.changed | bool
or monasca_agent_collector_plugin_confs.changed | bool
or monasca_agent_collector_container.changed | bool
- name: Restart monasca-agent-forwarder container
vars:
service_name: "monasca-agent-forwarder"
service: "{{ monasca_services[service_name] }}"
config_json: "{{ monasca_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
monasca_agent_forwarder_container: "{{ check_monasca_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -220,18 +149,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or monasca_agent_forwarder_confs.changed | bool
or monasca_agent_forwarder_container.changed | bool
- name: Restart monasca-agent-statsd container
vars:
service_name: "monasca-agent-statsd"
service: "{{ monasca_services[service_name] }}"
config_json: "{{ monasca_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
monasca_agent_statsd_container: "{{ check_monasca_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -242,18 +164,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or monasca_agent_statsd_confs.changed | bool
or monasca_agent_statsd_container.changed | bool
- name: Restart monasca-grafana container
vars:
service_name: "monasca-grafana"
service: "{{ monasca_services[service_name] }}"
config_json: "{{ monasca_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
monasca_grafana_container: "{{ check_monasca_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -264,8 +179,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or monasca_grafana_confs.changed | bool
or monasca_grafana_container.changed | bool

View File

@ -18,7 +18,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: monasca_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -37,7 +36,6 @@
dest: "{{ node_config_directory }}/monasca-agent-collector/{{ item }}"
mode: "0660"
become: true
register: monasca_agent_collector_confs
with_items:
- agent-collector.yml
when:
@ -78,7 +76,6 @@
dest: "{{ node_config_directory }}/monasca-agent-collector/plugins/{{ item.path | basename }}"
mode: "0660"
become: true
register: monasca_agent_collector_plugin_confs
with_items:
"{{ agent_plugins.files }}"
when:
@ -98,7 +95,6 @@
dest: "{{ node_config_directory }}/monasca-agent-forwarder/{{ item }}"
mode: "0660"
become: true
register: monasca_agent_forwarder_confs
with_items:
- agent-forwarder.yml
when:
@ -118,7 +114,6 @@
dest: "{{ node_config_directory }}/monasca-agent-statsd/{{ item }}"
mode: "0660"
become: true
register: monasca_agent_statsd_confs
with_items:
- agent-statsd.yml
when:
@ -138,7 +133,6 @@
dest: "{{ node_config_directory }}/monasca-api/{{ item }}"
mode: "0660"
become: true
register: monasca_api_confs
with_items:
- api.conf
- api-config.ini
@ -156,7 +150,6 @@
dest: "{{ node_config_directory }}/monasca-api/wsgi-api.conf"
mode: "0660"
become: true
register: monasca_api_wsgi_confs
when:
- inventory_hostname in groups[service['group']]
- service.enabled | bool
@ -174,7 +167,6 @@
dest: "{{ node_config_directory }}/monasca-log-api/{{ item }}"
mode: "0660"
become: true
register: monasca_log_api_confs
with_items:
- log-api.conf
- log-api-paste.ini
@ -192,7 +184,6 @@
dest: "{{ node_config_directory }}/monasca-log-api/wsgi-log-api.conf"
mode: "0660"
become: true
register: monasca_log_api_wsgi_confs
when:
- inventory_hostname in groups[service['group']]
- service.enabled | bool
@ -207,7 +198,6 @@
dest: "{{ node_config_directory }}/monasca-log-transformer/log-transformer.conf"
mode: "0660"
become: true
register: monasca_log_transformer_confs
with_first_found:
- "{{ node_custom_config }}/monasca/{{ inventory_hostname }}/log-transformer.conf"
- "{{ node_custom_config }}/monasca/log-transformer.conf"
@ -226,7 +216,6 @@
dest: "{{ node_config_directory }}/monasca-log-persister/log-persister.conf"
mode: "0660"
become: true
register: monasca_log_persister_confs
with_first_found:
- "{{ node_custom_config }}/monasca/{{ inventory_hostname }}/log-persister.conf"
- "{{ node_custom_config }}/monasca/log-persister.conf"
@ -245,7 +234,6 @@
dest: "{{ node_config_directory }}/monasca-log-persister/elasticsearch-template.json"
mode: "0660"
become: true
register: monasca_log_persister_elasticsearch_template
with_first_found:
- "{{ node_custom_config }}/monasca/{{ inventory_hostname }}/elasticsearch-template.json"
- "{{ node_custom_config }}/monasca/elasticsearch-template.json"
@ -264,7 +252,6 @@
dest: "{{ node_config_directory }}/monasca-log-metrics/log-metrics.conf"
mode: "0660"
become: true
register: monasca_log_metrics_confs
with_first_found:
- "{{ node_custom_config }}/monasca/{{ inventory_hostname }}/log-metrics.conf"
- "{{ node_custom_config }}/monasca/log-metrics.conf"
@ -286,7 +273,6 @@
dest: "{{ node_config_directory }}/monasca-thresh/thresh-config.yml"
mode: "0660"
become: true
register: monasca_thresh_confs
with_first_found:
- "{{ node_custom_config }}/monasca/{{ inventory_hostname }}/thresh-config.yml"
- "{{ node_custom_config }}/monasca/thresh-config.yml"
@ -305,7 +291,6 @@
dest: "{{ node_config_directory }}/monasca-thresh/storm.yml"
mode: "0660"
become: true
register: monasca_thresh_storm_conf
with_first_found:
- "{{ node_custom_config }}/monasca/{{ inventory_hostname }}/storm.yml"
- "{{ node_custom_config }}/monasca/storm.yml"
@ -327,7 +312,6 @@
dest: "{{ node_config_directory }}/monasca-notification/{{ item }}"
mode: "0660"
become: true
register: monasca_notification_confs
with_items:
- notification.conf
when:
@ -349,7 +333,6 @@
dest: "{{ node_config_directory }}/monasca-notification/"
mode: "0660"
become: true
register: monasca_notification_plugin_templates
when:
- notification_templates.stat.exists and notification_templates.stat.isdir
- inventory_hostname in groups[service['group']]
@ -368,7 +351,6 @@
dest: "{{ node_config_directory }}/monasca-persister/{{ item }}"
mode: "0660"
become: true
register: monasca_persister_confs
with_items:
- persister.conf
when:
@ -388,7 +370,6 @@
dest: "{{ node_config_directory }}/monasca-grafana/{{ item }}"
mode: "0660"
become: true
register: monasca_grafana_confs
with_items:
- grafana.ini
when:
@ -407,7 +388,6 @@
pid_mode: "{{ item.value.pid_mode|default('') }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_monasca_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -3,9 +3,6 @@
vars:
service_name: "mongodb"
service: "{{ mongodb_services[service_name] }}"
config_json: "{{ mongodb_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
mongodb_conf: "{{ mongodb_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
mongodb_container: "{{ check_mongodb_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,11 +14,6 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or mongodb_conf.changed | bool
or mongodb_container.changed | bool
notify:
- Waiting for the mongodb startup
- Checking current replication status

View File

@ -18,7 +18,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: mongodb_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -36,7 +35,6 @@
dest: "{{ node_config_directory }}/mongodb/{{ item.key }}.conf"
mode: "0660"
become: true
register: mongodb_confs
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -54,7 +52,6 @@
privileged: "{{ item.value.privileged|default(False) }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_mongodb_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -3,9 +3,6 @@
vars:
service_name: "multipathd"
service: "{{ multipathd_services[service_name] }}"
config_json: "{{ multipathd_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
multipathd_conf: "{{ multipathd_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
multipathd_container: "{{ check_multipathd_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,8 +14,3 @@
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or multipathd_conf.changed | bool
or multipathd_container.changed | bool

View File

@ -25,7 +25,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: multipathd_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -39,7 +38,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/multipath.conf"
mode: "0660"
become: true
register: multipathd_confs
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -57,7 +55,6 @@
ipc_mode: "{{ item.value.ipc_mode }}"
privileged: "{{ item.value.privileged | default(False) }}"
volumes: "{{ item.value.volumes }}"
register: check_multipathd_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -3,10 +3,6 @@
vars:
service_name: "murano-api"
service: "{{ murano_services[service_name] }}"
config_json: "{{ murano_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
murano_conf: "{{ murano_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ murano_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
murano_api_container: "{{ check_murano_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,21 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or murano_conf.changed | bool
or policy_overwriting.changed | bool
or murano_api_container.changed | bool
- name: Restart murano-engine container
vars:
service_name: "murano-engine"
service: "{{ murano_services[service_name] }}"
config_json: "{{ murano_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
murano_conf: "{{ murano_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ murano_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
murano_conductor_container: "{{ check_murano_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -43,9 +29,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or murano_conf.changed | bool
or policy_overwriting.changed | bool
or murano_conductor_container.changed | bool

View File

@ -35,7 +35,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: murano_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -56,7 +55,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/murano.conf"
mode: "0660"
become: true
register: murano_confs
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -69,7 +67,6 @@
src: "{{ murano_policy_file_path }}"
dest: "{{ node_config_directory }}/{{ item.key }}/{{ murano_policy_file }}"
mode: "0660"
register: murano_policy_overwriting
when:
- murano_policy_file is defined
- inventory_hostname in groups[item.value.group]
@ -87,7 +84,6 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_murano_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -3,12 +3,6 @@
vars:
service_name: "neutron-server"
service: "{{ neutron_services[service_name] }}"
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_vpnaas_conf: "{{ neutron_vpnaas_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_ml2_conf: "{{ neutron_ml2_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_server_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -20,25 +14,11 @@
privileged: "{{ service.privileged | default(False) }}"
when:
- kolla_action != "config"
- service.enabled | bool
- service.host_in_groups | bool
- config_json is changed
or neutron_conf is changed
or neutron_vpnaas_conf is changed
or neutron_ml2_conf is changed
or nsx_ini is changed
or policy_json is changed
or neutron_server_container is changed
- name: Restart neutron-openvswitch-agent container
vars:
service_name: "neutron-openvswitch-agent"
service: "{{ neutron_services[service_name] }}"
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_ml2_conf: "{{ neutron_ml2_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_openvswitch_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -50,23 +30,11 @@
privileged: "{{ service.privileged | default(False) }}"
when:
- kolla_action != "config"
- service.enabled | bool
- service.host_in_groups | bool
- config_json is changed
or neutron_conf is changed
or neutron_ml2_conf is changed
or policy_json is changed
or neutron_openvswitch_agent_container is changed
- name: Restart neutron-openvswitch-agent-xenapi container
vars:
service_name: "neutron-openvswitch-agent-xenapi"
service: "{{ neutron_services[service_name] }}"
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_ml2_xenapi_conf: "{{ neutron_ml2_xenapi_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_openvswitch_agent_xenapi_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -78,23 +46,11 @@
privileged: "{{ service.privileged | default(False) }}"
when:
- kolla_action != "config"
- service.enabled | bool
- service.host_in_groups | bool
- config_json is changed
or neutron_conf is changed
or neutron_ml2_xenapi_conf is changed
or policy_json is changed
or neutron_openvswitch_agent_xenapi_container is changed
- name: Restart fake neutron-openvswitch-agent container
vars:
service_name: "neutron-openvswitch-agent"
service: "{{ neutron_services[service_name] }}"
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_ml2_conf: "{{ neutron_ml2_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_openvswitch_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -107,23 +63,11 @@
with_sequence: "start=1 end={{ num_nova_fake_per_node }}"
when:
- kolla_action != "config"
- enable_nova_fake | bool
- neutron_plugin_agent == "openvswitch"
- inventory_hostname in groups["compute"]
- fake_config_json is changed
or fake_neutron_conf is changed
or fake_neutron_ml2_conf_ini is changed
or check_fake_neutron_openvswitch_agent is changed
- name: Restart neutron-linuxbridge-agent container
vars:
service_name: "neutron-linuxbridge-agent"
service: "{{ neutron_services[service_name] }}"
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_ml2_conf: "{{ neutron_ml2_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_linuxbridge_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -136,22 +80,11 @@
privileged: "{{ service.privileged | default(False) }}"
when:
- kolla_action != "config"
- service.enabled | bool
- service.host_in_groups | bool
- config_json is changed
or neutron_conf is changed
or neutron_ml2_conf is changed
or policy_json is changed
or neutron_linuxbridge_agent_container is changed
- name: Restart neutron-dhcp-agent container
vars:
service_name: "neutron-dhcp-agent"
service: "{{ neutron_services[service_name] }}"
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_dhcp_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -163,27 +96,11 @@
privileged: "{{ service.privileged | default(False) }}"
when:
- kolla_action != "config"
- service.enabled | bool
- service.host_in_groups | bool
- config_json is changed
or neutron_conf is changed
or dhcp_agent_ini is changed
or dnsmasq_conf is changed
or policy_json is changed
or neutron_dhcp_agent_container is changed
- name: Restart neutron-l3-agent container
vars:
service_name: "neutron-l3-agent"
service: "{{ neutron_services[service_name] }}"
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_l3_agent_ini: "{{ neutron_l3_agent_inis.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_fwaas_driver_ini: "{{ neutron_fwaas_driver_inis.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_vpnaas_conf: "{{ neutron_vpnaas_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_l3_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -195,25 +112,11 @@
privileged: "{{ service.privileged | default(False) }}"
when:
- kolla_action != "config"
- service.enabled | bool
- service.host_in_groups | bool
- config_json is changed
or neutron_conf is changed
or neutron_l3_agent_ini is changed
or neutron_fwaas_driver_ini is changed
or neutron_vpnaas_conf is changed
or policy_json is changed
or neutron_l3_agent_wrapper is changed
or neutron_l3_agent_container is changed
- name: Restart neutron-sriov-agent container
vars:
service_name: "neutron-sriov-agent"
service: "{{ neutron_services[service_name] }}"
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_sriov_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -225,22 +128,11 @@
privileged: "{{ service.privileged | default(False) }}"
when:
- kolla_action != "config"
- service.enabled | bool
- service.host_in_groups | bool
- config_json is changed
or neutron_conf is changed
or neutron_sriov_agent_ini is changed
or policy_json is changed
or neutron_sriov_agent_container is changed
- name: Restart neutron-metadata-agent container
vars:
service_name: "neutron-metadata-agent"
service: "{{ neutron_services[service_name] }}"
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_metadata_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -252,22 +144,11 @@
privileged: "{{ service.privileged | default(False) }}"
when:
- kolla_action != "config"
- service.enabled | bool
- service.host_in_groups | bool
- config_json is changed
or neutron_conf is changed
or neutron_metadata_agent_ini is changed
or policy_json is changed
or neutron_metadata_agent_container is changed
- name: Restart neutron-bgp-dragent container
vars:
service_name: "neutron-bgp-dragent"
service: "{{ neutron_services[service_name] }}"
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_bgp_dragent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -279,22 +160,11 @@
privileged: "{{ service.privileged | default(False) }}"
when:
- kolla_action != "config"
- service.enabled | bool
- service.host_in_groups | bool
- config_json is changed
or neutron_conf is changed
or neutron_bgp_dragent_ini is changed
or policy_json is changed
or neutron_bgp_dragent_container is changed
- name: Restart neutron-infoblox-ipam-agent container
vars:
service_name: "neutron-infoblox-ipam-agent"
service: "{{ neutron_services[service_name] }}"
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_ml2_conf: "{{ neutron_ml2_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_infoblox_ipam_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -306,20 +176,11 @@
privileged: "{{ service.privileged | default(False) }}"
when:
- kolla_action != "config"
- service.enabled | bool
- service.host_in_groups | bool
- config_json is changed
or neutron_conf is changed
or neutron_ml2_conf is changed
or neutron_infoblox_ipam_agent_container is changed
- name: Restart neutron-metering-agent container
vars:
service_name: "neutron-metering-agent"
service: "{{ neutron_services[service_name] }}"
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_metering_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -331,21 +192,11 @@
privileged: "{{ service.privileged | default(False) }}"
when:
- kolla_action != "config"
- service.enabled | bool
- service.host_in_groups | bool
- config_json is changed
or neutron_conf is changed
or neutron_metering_agent_ini is changed
or neutron_metering_agent_container is changed
- name: Restart ironic-neutron-agent container
vars:
service_name: "ironic-neutron-agent"
service: "{{ neutron_services[service_name] }}"
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_ml2_conf: "{{ neutron_ml2_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
ironic_neutron_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -357,9 +208,3 @@
privileged: "{{ service.privileged | default(False) }}"
when:
- kolla_action != "config"
- service.enabled | bool
- service.host_in_groups | bool
- config_json is changed
or neutron_conf is changed
or ironic_neutron_agent_ini is changed
or ironic_neutron_agent_container is changed

View File

@ -15,11 +15,12 @@
src: "neutron-openvswitch-agent.json.j2"
dest: "{{ node_config_directory }}/neutron-openvswitch-agent-fake-{{ item }}/config.json"
mode: "0660"
register: fake_config_json
with_sequence: start=1 end={{ num_nova_fake_per_node }}
when:
- inventory_hostname in groups['compute']
- neutron_plugin_agent == "openvswitch"
notify:
- Restart fake neutron-openvswitch-agent container
- name: Copying over neutron.conf
become: true
@ -34,11 +35,12 @@
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/neutron.conf"
dest: "{{ node_config_directory }}/neutron-openvswitch-agent-fake-{{ item }}/neutron.conf"
mode: "0660"
register: fake_neutron_conf
with_sequence: start=1 end={{ num_nova_fake_per_node }}
when:
- inventory_hostname in groups['compute']
- neutron_plugin_agent == "openvswitch"
notify:
- Restart fake neutron-openvswitch-agent container
- name: Copying over ml2_conf.ini
become: true
@ -51,11 +53,12 @@
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/neutron.conf"
dest: "{{ node_config_directory }}/neutron-openvswitch-agent-fake-{{ item }}/ml2_conf.ini"
mode: "0660"
register: fake_neutron_ml2_conf_ini
with_sequence: start=1 end={{ num_nova_fake_per_node }}
when:
- inventory_hostname in groups['compute']
- neutron_plugin_agent == "openvswitch"
notify:
- Restart fake neutron-openvswitch-agent container
- name: Checking neutron-openvswitch-agent container for nova fake node
vars:
@ -68,7 +71,6 @@
image: "{{ neutron_openvswitch_agent.image }}"
privileged: "{{ neutron_openvswitch_agent.privileged | default(False) }}"
volumes: "{{ neutron_openvswitch_agent.volumes }}"
register: check_fake_neutron_openvswitch_agent
when:
- kolla_action != "config"
- enable_nova_fake | bool

View File

@ -37,7 +37,6 @@
src: "{{ item.key }}.json.j2"
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
register: neutron_config_jsons
when:
- item.value.enabled | bool
- item.value.host_in_groups | bool
@ -71,7 +70,6 @@
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/neutron.conf"
dest: "{{ node_config_directory }}/{{ item.key }}/neutron.conf"
mode: "0660"
register: neutron_confs
when:
- item.value.enabled | bool
- item.value.host_in_groups | bool
@ -94,7 +92,6 @@
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/neutron_vpnaas.conf"
dest: "{{ node_config_directory }}/{{ item.key }}/neutron_vpnaas.conf"
mode: "0660"
register: neutron_vpnaas_confs
when:
- item.value.enabled | bool
- item.value.host_in_groups | bool
@ -119,7 +116,6 @@
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/ml2_conf.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/ml2_conf.ini"
mode: "0660"
register: neutron_ml2_confs
when:
- item.key in services_need_ml2_conf_ini
- item.value.enabled | bool
@ -144,7 +140,6 @@
- "{{ node_custom_config }}/neutron/{{ service_name }}/ml2_conf.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/ml2_conf.ini"
mode: "0660"
register: neutron_ml2_xenapi_confs
when:
- item.key in services_need_ml2_conf_ini
- item.value.enabled | bool
@ -164,7 +159,6 @@
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/sriov_agent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/sriov_agent.ini"
mode: "0660"
register: neutron_sriov_agent_ini
when:
- neutron_sriov_agent.enabled | bool
- neutron_sriov_agent.host_in_groups | bool
@ -183,7 +177,6 @@
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/dhcp_agent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/dhcp_agent.ini"
mode: "0660"
register: dhcp_agent_ini
when:
- neutron_dhcp_agent.enabled | bool
- neutron_dhcp_agent.host_in_groups | bool
@ -199,7 +192,6 @@
src: "{{ item }}"
dest: "{{ node_config_directory }}/{{ service_name }}/dnsmasq.conf"
mode: "0660"
register: dnsmasq_conf
with_first_found:
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/dnsmasq.conf"
- "{{ node_custom_config }}/neutron/dnsmasq.conf"
@ -223,7 +215,6 @@
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/l3_agent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/l3_agent.ini"
mode: "0660"
register: neutron_l3_agent_inis
when:
- item.key in services_need_l3_agent_ini
- item.value.enabled | bool
@ -245,7 +236,6 @@
- "{{ node_custom_config }}/neutron/fwaas_driver.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/fwaas_driver.ini"
mode: "0660"
register: neutron_fwaas_driver_inis
when:
- item.key in services_need_fwaas_driver_ini
- item.value.enabled | bool
@ -265,7 +255,6 @@
- "{{ node_custom_config }}/neutron/metadata_agent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/metadata_agent.ini"
mode: "0660"
register: neutron_metadata_agent_ini
when:
- neutron_metadata_agent.enabled | bool
- neutron_metadata_agent.host_in_groups | bool
@ -283,7 +272,6 @@
- "{{ node_custom_config }}/neutron/metering_agent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/metering_agent.ini"
mode: "0660"
register: neutron_metering_agent_ini
when:
- neutron_metering_agent.enabled | bool
- neutron_metering_agent.host_in_groups | bool
@ -301,7 +289,6 @@
- "{{ node_custom_config }}/neutron/ironic_neutron_agent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/ironic_neutron_agent.ini"
mode: "0660"
register: ironic_neutron_agent_ini
when:
- ironic_neutron_agent.enabled | bool
- ironic_neutron_agent.host_in_groups | bool
@ -319,7 +306,6 @@
- "{{ node_custom_config }}/neutron/bgp_dragent.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/bgp_dragent.ini"
mode: "0660"
register: neutron_bgp_dragent_ini
when:
- neutron_bgp_dragent.enabled | bool
- neutron_bgp_dragent.host_in_groups | bool
@ -342,7 +328,6 @@
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/nsx.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/nsx.ini"
mode: "0660"
register: nsx_ini
when:
- neutron_server.enabled | bool
- neutron_server.host_in_groups | bool
@ -369,7 +354,6 @@
src: "{{ node_custom_config }}/neutron/policy.json"
dest: "{{ node_config_directory }}/{{ service_name }}/policy.json"
mode: "0660"
register: policy_jsons
when:
- neutron_policy.stat.exists
- item.value.enabled | bool
@ -387,7 +371,6 @@
src: neutron-l3-agent-wrapper.sh.j2
dest: "{{ node_config_directory }}/{{ service_name }}/neutron-l3-agent-wrapper.sh"
mode: "0770"
register: neutron_l3_agent_wrapper
when:
- service.enabled | bool
- service.host_in_groups | bool
@ -406,7 +389,6 @@
src: "{{ item.2.path }}"
dest: "{{ node_config_directory }}/{{ service_name }}/{{ item.2.path | basename }}"
mode: "0660"
register: extra_ml2_plugins
when:
- item.2 is defined
- item.1.enabled | bool
@ -429,7 +411,6 @@
privileged: "{{ item.value.privileged | default(False) }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_neutron_containers
when:
- kolla_action != "config"
- item.value.enabled | bool

View File

@ -3,10 +3,6 @@
vars:
service_name: "nova-conductor"
service: "{{ nova_services[service_name] }}"
config_json: "{{ config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
nova_conf: "{{ nova_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ nova_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
nova_conductor_container: "{{ check_nova_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -18,19 +14,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or nova_conf.changed | bool
or policy_overwriting.changed | bool
or nova_conductor_container.changed | bool
- name: Restart nova-ssh container
vars:
service_name: "nova-ssh"
service: "{{ nova_services[service_name] }}"
config_json: "{{ config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
nova_ssh_container: "{{ check_nova_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -43,19 +31,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or nova_ssh_confs.changed | bool
or nova_ssh_container.changed | bool
- name: Restart nova-libvirt container
vars:
service_name: "nova-libvirt"
service: "{{ nova_services[service_name] }}"
config_json: "{{ config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceph_conf: "{{ ceph_confs.results|selectattr('item', 'equalto', service_name)|first if ceph_confs is defined else none }}"
nova_libvirt_container: "{{ check_nova_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -73,24 +53,11 @@
until: restart_nova_libvirt is success
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or nova_libvirt_confs.changed | bool
or nova_libvirt_container.changed | bool
or ( ceph_conf is not none and ceph_conf.changed | bool )
or ( nova_ceph_keyring is defined and nova_ceph_keyring.changed | bool )
or ( libvirt_secrets_xml is defined and libvirt_secrets_xml.changed | bool )
or ( libvirt_secrets_key is defined and libvirt_secrets_key.changed | bool )
- name: Restart nova-scheduler container
vars:
service_name: "nova-scheduler"
service: "{{ nova_services[service_name] }}"
config_json: "{{ config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
nova_conf: "{{ nova_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ nova_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
nova_scheduler_container: "{{ check_nova_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -102,21 +69,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or nova_conf.changed | bool
or policy_overwriting.changed | bool
or nova_scheduler_container.changed | bool
- name: Restart nova-novncproxy container
vars:
service_name: "nova-novncproxy"
service: "{{ nova_services[service_name] }}"
config_json: "{{ config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
nova_conf: "{{ nova_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ nova_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
nova_novncproxy_container: "{{ check_nova_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -128,21 +85,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or nova_conf.changed | bool
or policy_overwriting.changed | bool
or nova_novncproxy_container.changed | bool
- name: Restart nova-spicehtml5proxy container
vars:
service_name: "nova-spicehtml5proxy"
service: "{{ nova_services[service_name] }}"
config_json: "{{ config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
nova_conf: "{{ nova_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ nova_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
nova_spicehtml5proxy_container: "{{ check_nova_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -154,21 +101,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or nova_conf.changed | bool
or policy_overwriting.changed | bool
or nova_spicehtml5proxy_container.changed | bool
- name: Restart nova-serialproxy container
vars:
service_name: "nova-serialproxy"
service: "{{ nova_services[service_name] }}"
config_json: "{{ config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
nova_conf: "{{ nova_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ nova_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
nova_serialproxy_container: "{{ check_nova_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -180,21 +117,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or nova_conf.changed | bool
or policy_overwriting.changed | bool
or nova_serialproxy_container.changed | bool
- name: Restart nova-api container
vars:
service_name: "nova-api"
service: "{{ nova_services[service_name] }}"
config_json: "{{ config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
nova_conf: "{{ nova_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ nova_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
nova_api_container: "{{ check_nova_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -206,22 +133,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or nova_conf.changed | bool
or policy_overwriting.changed | bool
or nova_api_container.changed | bool
- name: Restart nova-compute container
vars:
service_name: "nova-compute"
service: "{{ nova_services[service_name] }}"
config_json: "{{ config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
nova_conf: "{{ nova_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceph_conf: "{{ ceph_confs.results|selectattr('item', 'equalto', service_name)|first if ceph_confs is defined else none }}"
policy_overwriting: "{{ nova_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
nova_compute_container: "{{ check_nova_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -235,25 +151,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or nova_conf.changed | bool
or policy_overwriting.changed | bool
or vcenter_ca_file | bool
or nova_compute_release_file | bool
or nova_compute_container.changed | bool
or ( ceph_conf is not none and ceph_conf.changed | bool )
or ( nova_ceph_keyring is defined and nova_ceph_keyring.changed | bool )
- name: Restart nova-compute-ironic container
vars:
service_name: "nova-compute-ironic"
service: "{{ nova_services[service_name] }}"
config_json: "{{ config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
nova_conf: "{{ nova_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ nova_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
nova_compute_ironic_container: "{{ check_nova_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -265,12 +167,6 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or nova_conf.changed | bool
or policy_overwriting.changed | bool
or nova_compute_ironic_container.changed | bool
# nova-compute-fake is special. It will start multi numbers of container
# so put all variables here rather than defaults/main.yml file
@ -291,8 +187,6 @@
with_sequence: start=1 end={{ num_nova_fake_per_node }}
when:
- kolla_action != "config"
- inventory_hostname in groups['compute']
- enable_nova_fake | bool
# NOTE(mgoddard): After upgrading nova-compute, services will have an RPC
# version cap in place. We need to restart all services that communicate with

View File

@ -20,7 +20,6 @@
dest: "{{ node_config_directory }}/{{ item }}/ceph.conf"
mode: "0660"
become: true
register: ceph_confs
with_items:
- "nova-compute"
- "nova-libvirt"
@ -66,6 +65,8 @@
mode: "0600"
become: true
when: inventory_hostname in groups['compute']
notify:
- Restart nova-compute container
- name: Pushing secrets xml for libvirt
template:
@ -83,6 +84,8 @@
- uuid: "{{ cinder_rbd_secret_uuid }}"
name: client.cinder secret
enabled: "{{ enable_cinder | bool and cinder_backend_ceph | bool}}"
notify:
- Restart nova-libvirt container
- name: Pushing secrets key for libvirt
copy:
@ -100,6 +103,8 @@
- uuid: "{{ cinder_rbd_secret_uuid }}"
content: "{{ cinder_cephx_raw_key.stdout|default('') }}"
enabled: "{{ enable_cinder | bool and cinder_backend_ceph | bool}}"
notify:
- Restart nova-libvirt container
- name: Ensuring config directory has correct owner and permission
become: true

View File

@ -62,7 +62,6 @@
src: "{{ item.key }}.json.j2"
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
@ -90,7 +89,6 @@
- "{{ node_custom_config }}/nova/{{ inventory_hostname }}/nova.conf"
dest: "{{ node_config_directory }}/{{ item.key }}/nova.conf"
mode: "0660"
register: nova_confs
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -107,7 +105,6 @@
src: "{{ item.src }}"
dest: "{{ node_config_directory }}/nova-libvirt/{{ item.dest }}"
mode: "0660"
register: nova_libvirt_confs
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -125,7 +122,6 @@
src: "{{ item.src }}"
dest: "{{ node_config_directory }}/nova-ssh/{{ item.dest }}"
mode: "0660"
register: nova_ssh_confs
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -144,7 +140,6 @@
src: "{{ node_custom_config }}/vmware_ca"
dest: "{{ node_config_directory }}/nova-compute/vmware_ca"
mode: "0660"
register: vcenter_ca_file
when:
- nova_compute_virt_type == "vmware"
- not vmware_vcenter_insecure | bool
@ -166,7 +161,6 @@
- "{{ node_custom_config }}/nova_compute/release"
- "{{ node_custom_config }}/nova/release"
skip: true
register: nova_compute_release_file
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -189,7 +183,6 @@
src: "{{ nova_policy_file_path }}"
dest: "{{ node_config_directory }}/{{ item.key }}/{{ nova_policy_file }}"
mode: "0660"
register: nova_policy_overwriting
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -213,7 +206,6 @@
privileged: "{{ item.value.privileged|default(False) }}"
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
dimensions: "{{ item.value.dimensions }}"
register: check_nova_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -34,7 +34,6 @@
dest: "{{ node_config_directory }}/{{ item }}/"
mode: "0660"
become: true
register: nova_ceph_keyring
with_items:
- nova-compute
- nova-libvirt
@ -43,8 +42,7 @@
- nova_backend == "rbd"
- external_ceph_cephx_enabled | bool
notify:
- Restart nova-compute container
- Restart nova-libvirt container
- Restart {{ item }} container
- name: Copy over ceph.conf
template:
@ -52,7 +50,6 @@
dest: "{{ node_config_directory }}/{{ item }}/"
mode: "0660"
become: true
register: ceph_confs
with_items:
- nova-compute
- nova-libvirt
@ -68,7 +65,6 @@
dest: "{{ node_config_directory }}/nova-libvirt/secrets/{{ item.uuid }}.xml"
mode: "0600"
become: true
register: libvirt_secrets_xml
when:
- inventory_hostname in groups['compute']
- item.enabled | bool
@ -106,7 +102,6 @@
dest: "{{ node_config_directory }}/nova-libvirt/secrets/{{ item.uuid }}.base64"
mode: "0600"
become: true
register: libvirt_secrets_key
when:
- inventory_hostname in groups['compute']
- item.enabled | bool

View File

@ -3,10 +3,6 @@
vars:
service_name: "octavia-api"
service: "{{ octavia_services[service_name] }}"
config_json: "{{ octavia_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
octavia_conf: "{{ octavia_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ octavia_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
octavia_api_container: "{{ check_octavia_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,21 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or octavia_conf.changed | bool
or policy_overwriting.changed | bool
or octavia_api_container.changed | bool
- name: Restart octavia-health-manager container
vars:
service_name: "octavia-health-manager"
service: "{{ octavia_services[service_name] }}"
config_json: "{{ octavia_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
octavia_conf: "{{ octavia_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ octavia_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
octavia_health_manager_container: "{{ check_octavia_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -42,22 +28,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or octavia_conf.changed | bool
or policy_overwriting.changed | bool
or octavia_health_manager_certificate.changed | bool
or octavia_health_manager_container.changed | bool
- name: Restart octavia-housekeeping container
vars:
service_name: "octavia-housekeeping"
service: "{{ octavia_services[service_name] }}"
config_json: "{{ octavia_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
octavia_conf: "{{ octavia_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ octavia_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
octavia_housekeeping_container: "{{ check_octavia_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -68,22 +43,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or octavia_conf.changed | bool
or policy_overwriting.changed | bool
or octavia_housekeeping_certificate.changed | bool
or octavia_housekeeping_container.changed | bool
- name: Restart octavia-worker container
vars:
service_name: "octavia-worker"
service: "{{ octavia_services[service_name] }}"
config_json: "{{ octavia_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
octavia_conf: "{{ octavia_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ octavia_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
octavia_worker_container: "{{ check_octavia_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -94,10 +58,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or octavia_conf.changed | bool
or policy_overwriting.changed | bool
or octavia_worker_certificate.changed | bool
or octavia_worker_container.changed | bool

View File

@ -35,7 +35,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ octavia_policy_file }}"
mode: "0660"
become: true
register: octavia_policy_overwriting
when:
- octavia_policy_file is defined
- inventory_hostname in groups[item.value.group]
@ -50,7 +49,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: octavia_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -71,7 +69,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/octavia.conf"
mode: "0660"
become: true
register: octavia_confs
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -87,7 +84,6 @@
dest: "{{ node_config_directory }}/octavia-worker/{{ item }}"
mode: "0660"
become: true
register: octavia_worker_certificate
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -106,7 +102,6 @@
dest: "{{ node_config_directory }}/octavia-housekeeping/{{ item }}"
mode: "0660"
become: true
register: octavia_housekeeping_certificate
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -125,7 +120,6 @@
dest: "{{ node_config_directory }}/octavia-health-manager/{{ item }}"
mode: "0660"
become: true
register: octavia_health_manager_certificate
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -145,7 +139,6 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_octavia_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -15,21 +15,3 @@
tty: "{{ service.tty }}"
when:
- kolla_action != "config"
- service.enabled | bool
- service.host_in_groups | bool
- opendaylight_config_json is changed
or opendaylight_config_start_odl is changed
or opendaylight_config_custom_props is changed
or opendaylight_config_jetty is changed
or opendaylight_config_features is changed
or opendaylight_config_ovsdb is changed
or opendaylight_config_tomcat is changed
or opendaylight_config_logging is changed
or opendaylight_config_netvirt is changed
or opendaylight_config_netvirt_acl is changed
or opendaylight_config_env is changed
or opendaylight_config_akka is changed
or opendaylight_config_modules is changed
or opendaylight_config_module_shards is changed
or opendaylight_config_10_rest_connector is changed
or check_opendaylight_containers is changed

View File

@ -23,7 +23,6 @@
- "opendaylight"
- name: Copying over config.json files for services
register: opendaylight_config_json
template:
src: "{{ item }}.json.j2"
dest: "{{ node_config_directory }}/{{ item }}/config.json"
@ -35,7 +34,6 @@
- Restart opendaylight container
- name: Copying over custom.properties
register: opendaylight_config_custom_props
template:
src: "{{ role_path }}/templates/custom.properties.j2"
dest: "{{ node_config_directory }}/opendaylight/custom.properties"
@ -45,7 +43,6 @@
- Restart opendaylight container
- name: Copying over start-odl
register: opendaylight_config_start_odl
template:
src: "{{ role_path }}/templates/start-odl.j2"
dest: "{{ node_config_directory }}/opendaylight/start-odl"
@ -55,7 +52,6 @@
- Restart opendaylight container
- name: Copying over jetty.xml
register: opendaylight_config_jetty
template:
src: "{{ role_path }}/templates/jetty.xml.j2"
dest: "{{ node_config_directory }}/{{ item }}/jetty.xml"
@ -67,7 +63,6 @@
- Restart opendaylight container
- name: Copying over org.apache.karaf.features.cfg
register: opendaylight_config_features
template:
src: "{{ role_path }}/templates/org.apache.karaf.features.cfg.j2"
dest: "{{ node_config_directory }}/{{ item }}/org.apache.karaf.features.cfg"
@ -79,7 +74,6 @@
- Restart opendaylight container
- name: Copying over org.opendaylight.ovsdb.library.cfg
register: opendaylight_config_ovsdb
template:
src: "{{ role_path }}/templates/org.opendaylight.ovsdb.library.cfg.j2"
dest: "{{ node_config_directory }}/{{ item }}/org.opendaylight.ovsdb.library.cfg"
@ -96,7 +90,6 @@
dest: "{{ node_config_directory }}/{{ item }}/tomcat-server.xml"
mode: "0660"
become: true
register: opendaylight_config_tomcat
with_items:
- "opendaylight"
notify:
@ -108,7 +101,6 @@
dest: "{{ node_config_directory }}/{{ item }}/org.ops4j.pax.logging.cfg"
mode: "0660"
become: true
register: opendaylight_config_logging
with_items:
- "opendaylight"
notify:
@ -120,7 +112,6 @@
dest: "{{ node_config_directory }}/{{ item }}/netvirt-impl-config_netvirt-impl-config.xml"
mode: "0660"
become: true
register: opendaylight_config_netvirt
with_items:
- "opendaylight"
notify:
@ -132,7 +123,6 @@
dest: "{{ node_config_directory }}/{{ item }}/netvirt-aclservice-config.xml"
mode: "0660"
become: true
register: opendaylight_config_netvirt_acl
with_items:
- "opendaylight"
notify:
@ -144,7 +134,6 @@
dest: "{{ node_config_directory }}/opendaylight/setenv"
mode: "0660"
become: true
register: opendaylight_config_env
with_first_found:
- "{{ node_custom_config }}/opendaylight/{{ inventory_hostname }}/setenv"
- "{{ node_custom_config }}/opendaylight/setenv"
@ -162,7 +151,6 @@
- "{{ node_custom_config }}/opendaylight/{{ inventory_hostname }}/akka.conf"
- "{{ node_custom_config }}/opendaylight/akka.conf"
- "akka.conf.j2"
register: opendaylight_config_akka
notify:
- Restart opendaylight container
@ -176,7 +164,6 @@
- "{{ node_custom_config }}/opendaylight/{{ inventory_hostname }}/modules.conf"
- "{{ node_custom_config }}/opendaylight/modules.conf"
- "modules.conf.j2"
register: opendaylight_config_modules
notify:
- Restart opendaylight container
@ -190,7 +177,6 @@
- "{{ node_custom_config }}/opendaylight/{{ inventory_hostname }}/module-shards.conf"
- "{{ node_custom_config }}/opendaylight/module-shards.conf"
- "module-shards.conf.j2"
register: opendaylight_config_module_shards
notify:
- Restart opendaylight container
@ -204,7 +190,6 @@
- "{{ node_custom_config }}/opendaylight/{{ inventory_hostname }}/10-rest-connector.xml"
- "{{ node_custom_config }}/opendaylight/10-rest-connector.xml"
- "10-rest-connector.xml.j2"
register: opendaylight_config_10_rest_connector
notify:
- Restart opendaylight container
@ -219,7 +204,6 @@
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
tty: "{{ item.value.tty }}"
register: check_opendaylight_containers
when:
- kolla_action != "config"
- item.value.enabled | bool

View File

@ -3,8 +3,6 @@
vars:
service_name: "openvswitch-db-server"
service: "{{ openvswitch_services[service_name] }}"
config_json: "{{ openvswitch_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
openvswitch_db_container: "{{ check_openvswitch_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -15,11 +13,6 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- service.enabled | bool
- service.host_in_groups | bool
- config_json is changed
or openvswitch_db_container is changed
or openvswitch_start_ovsdb_server is changed
notify:
- Waiting for openvswitch_db service to be ready
@ -36,8 +29,6 @@
vars:
service_name: "openvswitch-vswitchd"
service: "{{ openvswitch_services[service_name] }}"
config_json: "{{ openvswitch_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
openvswitch_vswitchd_container: "{{ check_openvswitch_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -49,8 +40,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- service.enabled | bool
- service.host_in_groups | bool
- config_json is changed
or openvswitch_vswitchd_container is changed
or openvswitch_start_ovs is changed

View File

@ -25,7 +25,6 @@
src: "{{ item.key }}.json.j2"
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
register: openvswitch_config_jsons
when:
- item.value.enabled | bool
- item.value.host_in_groups | bool
@ -41,7 +40,6 @@
src: "{{ role_path }}/templates/start-ovs.j2"
dest: "{{ node_config_directory }}/openvswitch-vswitchd/start-ovs"
mode: "0770"
register: openvswitch_start_ovs
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -56,7 +54,6 @@
src: "{{ role_path }}/templates/start-ovsdb-server.j2"
dest: "{{ node_config_directory }}/openvswitch-db-server/start-ovsdb-server"
mode: "0770"
register: openvswitch_start_ovsdb_server
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -73,7 +70,6 @@
privileged: "{{ item.value.privileged | default(False) }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_openvswitch_containers
when:
- kolla_action != "config"
- item.value.enabled | bool

View File

@ -3,8 +3,6 @@
vars:
service_name: "ovsdpdk-db"
service: "{{ ovsdpdk_services[service_name] }}"
config_json: "{{ ovsdpdk_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ovsdpdk_db_container: "{{ check_ovsdpdk_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -15,10 +13,6 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- service.enabled | bool
- service.host_in_groups | bool
- config_json is changed
or ovsdpdk_db_container is changed
notify:
- Waiting the ovs db service to be ready
- Ensuring ovsdpdk bridges are properly setup indexed
@ -59,8 +53,6 @@
vars:
service_name: "ovsdpdk-vswitchd"
service: "{{ ovsdpdk_services[service_name] }}"
config_json: "{{ ovsdpdk_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ovsdpdk_vswitchd_container: "{{ check_ovsdpdk_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -72,10 +64,6 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- service.enabled | bool
- service.host_in_groups | bool
- config_json is changed
or ovsdpdk_vswitchd_container is changed
- name: Ensuring ovsdpdk bridges are properly setup named
vars:

View File

@ -16,7 +16,6 @@
src: "{{ item.key }}.json.j2"
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
register: ovsdpdk_config_jsons
when:
- item.value.enabled | bool
- item.value.host_in_groups | bool
@ -67,7 +66,6 @@
privileged: "{{ item.value.privileged | default(False) }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_ovsdpdk_containers
when:
- kolla_action != "config"
- item.value.enabled | bool

View File

@ -3,10 +3,6 @@
vars:
service_name: "panko-api"
service: "{{ panko_services[service_name] }}"
config_json: "{{ panko_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
panko_conf: "{{ panko_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ panko_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
panko_api_container: "{{ check_panko_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -17,10 +13,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or panko_conf.changed | bool
or panko_wsgi.changed | bool
or policy_overwriting.changed | bool
or panko_api_container.changed | bool

View File

@ -35,7 +35,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: panko_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -54,7 +53,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/panko.conf"
mode: "0660"
become: true
register: panko_confs
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -70,7 +68,6 @@
dest: "{{ node_config_directory }}/{{ item }}/wsgi-panko.conf"
mode: "0660"
become: true
register: panko_wsgi
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -85,7 +82,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ panko_policy_file }}"
mode: "0660"
become: true
register: panko_policy_overwriting
when:
- panko_policy_file is defined
- inventory_hostname in groups[item.value.group]
@ -103,7 +99,6 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_panko_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -3,8 +3,6 @@
vars:
service_name: "prometheus-server"
service: "{{ prometheus_services[service_name] }}"
config_json: "{{ prometheus_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
prometheus_container: "{{ check_prometheus_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -15,18 +13,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or prometheus_confs.changed | bool
or prometheus_container.changed | bool
- name: Restart prometheus-node-exporter container
vars:
service_name: "prometheus-node-exporter"
service: "{{ prometheus_services[service_name] }}"
config_json: "{{ prometheus_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
prometheus_container: "{{ check_prometheus_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -38,17 +29,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or prometheus_container.changed | bool
- name: Restart prometheus-mysqld-exporter container
vars:
service_name: "prometheus-mysqld-exporter"
service: "{{ prometheus_services[service_name] }}"
config_json: "{{ prometheus_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
prometheus_container: "{{ check_prometheus_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -59,18 +44,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or prometheus_conf_mycnf.changed | bool
or prometheus_container.changed | bool
- name: Restart prometheus-haproxy-exporter container
vars:
service_name: "prometheus-haproxy-exporter"
service: "{{ prometheus_services[service_name] }}"
config_json: "{{ prometheus_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
prometheus_container: "{{ check_prometheus_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -81,17 +59,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or prometheus_container.changed | bool
- name: Restart prometheus-memcached-exporter container
vars:
service_name: "prometheus-memcached-exporter"
service: "{{ prometheus_services[service_name] }}"
config_json: "{{ prometheus_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
prometheus_container: "{{ check_prometheus_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -102,17 +74,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or prometheus_container.changed | bool
- name: Restart prometheus-cadvisor container
vars:
service_name: "prometheus-cadvisor"
service: "{{ prometheus_services[service_name] }}"
config_json: "{{ prometheus_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
prometheus_container: "{{ check_prometheus_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -123,17 +89,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or prometheus_container.changed | bool
- name: Restart prometheus-alertmanager container
vars:
service_name: "prometheus-alertmanager"
service: "{{ prometheus_services[service_name] }}"
config_json: "{{ prometheus_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
prometheus_container: "{{ check_prometheus_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -144,18 +104,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or prometheus_alertmanager_confs.changed | bool
or prometheus_container.changed | bool
- name: Restart prometheus-openstack-exporter container
vars:
service_name: "prometheus-openstack-exporter"
service: "{{ prometheus_services[service_name] }}"
config_json: "{{ prometheus_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
prometheus_container: "{{ check_prometheus_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -166,18 +119,11 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or prometheus_openstack_exporter_confs.changed | bool
or prometheus_container.changed | bool
- name: Restart prometheus-elasticsearch-exporter container
vars:
service_name: "prometheus-elasticsearch-exporter"
service: "{{ prometheus_services[service_name] }}"
config_json: "{{ prometheus_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
prometheus_container: "{{ check_prometheus_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -188,7 +134,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or prometheus_container.changed | bool

View File

@ -18,7 +18,6 @@
src: "{{ item.key }}.json.j2"
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
register: prometheus_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -45,7 +44,6 @@
src: "{{ item.path }}"
dest: "{{ node_config_directory }}/prometheus-server/{{ item.path | basename }}"
mode: "0660"
register: prometheus_confs
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool and enable_prometheus_alertmanager | bool
@ -62,7 +60,6 @@
src: "{{ item }}"
dest: "{{ node_config_directory }}/prometheus-server/prometheus.yml"
mode: "0660"
register: prometheus_confs
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -81,7 +78,6 @@
src: "{{ item }}"
dest: "{{ node_config_directory }}/prometheus-alertmanager/prometheus-alertmanager.yml"
mode: "0660"
register: prometheus_alertmanager_confs
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -103,7 +99,6 @@
- "{{ role_path }}/templates/my.cnf.j2"
dest: "{{ node_config_directory }}/prometheus-mysqld-exporter/my.cnf"
mode: "0660"
register: prometheus_conf_mycnf
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -118,7 +113,6 @@
src: "{{ item }}"
dest: "{{ node_config_directory }}/prometheus-openstack-exporter/clouds.yml"
mode: "0660"
register: prometheus_openstack_exporter_confs
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -139,7 +133,6 @@
pid_mode: "{{ item.value.pid_mode|default('') }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_prometheus_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

View File

@ -3,8 +3,6 @@
vars:
service_name: "qdrouterd"
service: "{{ qdrouterd_services[service_name] }}"
config_json: "{{ qdrouterd_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
qdrouterd_container: "{{ check_qdrouterd_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
@ -15,9 +13,3 @@
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
or qdrouterd_confs.changed | bool
or qdrouterd_sasl_confs.changed | bool
or qdrouterd_container.changed | bool

View File

@ -18,7 +18,6 @@
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
register: qdrouterd_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
@ -34,7 +33,6 @@
dest: "{{ node_config_directory }}/qdrouterd/qdrouterd.conf"
mode: "0660"
become: true
register: qdrouterd_confs
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -53,7 +51,6 @@
dest: "{{ node_config_directory }}/qdrouterd/qdrouterd-sasl.conf"
mode: "0660"
become: true
register: qdrouterd_sasl_confs
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
@ -73,7 +70,6 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
register: check_qdrouterd_containers
when:
- kolla_action != "config"
- inventory_hostname in groups[item.value.group]

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