diff --git a/ansible/roles/aodh/handlers/main.yml b/ansible/roles/aodh/handlers/main.yml index 3e897671b4..e79d4af839 100644 --- a/ansible/roles/aodh/handlers/main.yml +++ b/ansible/roles/aodh/handlers/main.yml @@ -7,6 +7,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -31,6 +32,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -54,6 +56,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -77,6 +80,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/aodh/tasks/bootstrap_service.yml b/ansible/roles/aodh/tasks/bootstrap_service.yml index 1ab7b7dceb..ce099f5f20 100644 --- a/ansible/roles/aodh/tasks/bootstrap_service.yml +++ b/ansible/roles/aodh/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running aodh bootstrap container vars: aodh_api: "{{ aodh_services['aodh-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/aodh/tasks/config.yml b/ansible/roles/aodh/tasks/config.yml index c5fb9523d6..f99c68334c 100644 --- a/ansible/roles/aodh/tasks/config.yml +++ b/ansible/roles/aodh/tasks/config.yml @@ -104,6 +104,7 @@ - Restart aodh-api container - name: Check aodh containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/aodh/tasks/pull.yml b/ansible/roles/aodh/tasks/pull.yml index ce85ce93c8..5891a4555e 100644 --- a/ansible/roles/aodh/tasks/pull.yml +++ b/ansible/roles/aodh/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling aodh images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/barbican/handlers/main.yml b/ansible/roles/barbican/handlers/main.yml index df1b8938ff..e451d07d17 100644 --- a/ansible/roles/barbican/handlers/main.yml +++ b/ansible/roles/barbican/handlers/main.yml @@ -7,6 +7,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -32,6 +33,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -55,6 +57,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/barbican/tasks/bootstrap_service.yml b/ansible/roles/barbican/tasks/bootstrap_service.yml index a7cd8089eb..0410f975f2 100644 --- a/ansible/roles/barbican/tasks/bootstrap_service.yml +++ b/ansible/roles/barbican/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running barbican bootstrap container vars: barbican_api: "{{ barbican_services['barbican-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/barbican/tasks/config.yml b/ansible/roles/barbican/tasks/config.yml index 44165deae5..f0318d2aa4 100644 --- a/ansible/roles/barbican/tasks/config.yml +++ b/ansible/roles/barbican/tasks/config.yml @@ -123,6 +123,7 @@ - Restart {{ item.key }} container - name: Check barbican containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/barbican/tasks/pull.yml b/ansible/roles/barbican/tasks/pull.yml index adacfbb765..3de76d97e8 100644 --- a/ansible/roles/barbican/tasks/pull.yml +++ b/ansible/roles/barbican/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling barbican images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/bifrost/tasks/reconfigure.yml b/ansible/roles/bifrost/tasks/reconfigure.yml index fdd316fcc1..17f2bd129b 100644 --- a/ansible/roles/bifrost/tasks/reconfigure.yml +++ b/ansible/roles/bifrost/tasks/reconfigure.yml @@ -1,5 +1,6 @@ --- - name: Ensuring the containers up + become: true kolla_docker: name: "{{ item.name }}" action: "get_container_state" @@ -24,6 +25,7 @@ # and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE', # just remove the container and start again - name: Containers config strategy + become: true kolla_docker: name: "{{ item.name }}" action: "get_container_env" @@ -33,6 +35,7 @@ - { name: bifrost-deploy, group: bifrost-deploy } - name: Remove the containers + become: true kolla_docker: name: "{{ item[0]['name'] }}" action: "remove_container" @@ -50,6 +53,7 @@ when: remove_containers.changed - name: Restart containers + become: true kolla_docker: name: "{{ item[0]['name'] }}" action: "restart_container" diff --git a/ansible/roles/bifrost/tasks/start.yml b/ansible/roles/bifrost/tasks/start.yml index 537a6def2e..d74d0095a2 100644 --- a/ansible/roles/bifrost/tasks/start.yml +++ b/ansible/roles/bifrost/tasks/start.yml @@ -1,5 +1,6 @@ --- - name: Starting bifrost deploy container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/blazar/handlers/main.yml b/ansible/roles/blazar/handlers/main.yml index 30ade1e8df..67fa821796 100644 --- a/ansible/roles/blazar/handlers/main.yml +++ b/ansible/roles/blazar/handlers/main.yml @@ -7,6 +7,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -30,6 +31,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/blazar/tasks/bootstrap_service.yml b/ansible/roles/blazar/tasks/bootstrap_service.yml index ead18b5ee7..74e07b1546 100644 --- a/ansible/roles/blazar/tasks/bootstrap_service.yml +++ b/ansible/roles/blazar/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running blazar bootstrap container vars: blazar_api: "{{ blazar_services['blazar-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/blazar/tasks/config.yml b/ansible/roles/blazar/tasks/config.yml index 2e12df6d1c..dc7f5e1f2b 100644 --- a/ansible/roles/blazar/tasks/config.yml +++ b/ansible/roles/blazar/tasks/config.yml @@ -82,6 +82,7 @@ - Restart blazar-manager container - name: Check blazar containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/blazar/tasks/pull.yml b/ansible/roles/blazar/tasks/pull.yml index 60b814c380..7fcba33d36 100644 --- a/ansible/roles/blazar/tasks/pull.yml +++ b/ansible/roles/blazar/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling blazar images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ceilometer/handlers/main.yml b/ansible/roles/ceilometer/handlers/main.yml index 767468e703..907dfb300b 100644 --- a/ansible/roles/ceilometer/handlers/main.yml +++ b/ansible/roles/ceilometer/handlers/main.yml @@ -9,6 +9,7 @@ policy_overwriting: "{{ ceilometer_policy_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" common_options: "{{ docker_common_options }}" @@ -36,6 +37,7 @@ ceilometer_pipeline: "{{ ceilometer_pipelines.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ ceilometer_policy_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" common_options: "{{ docker_common_options }}" @@ -61,6 +63,7 @@ ceilometer_pipeline: "{{ ceilometer_pipelines.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ ceilometer_policy_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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ceilometer/tasks/bootstrap_service.yml b/ansible/roles/ceilometer/tasks/bootstrap_service.yml index 5cf6b9e0e7..bab27d19d3 100644 --- a/ansible/roles/ceilometer/tasks/bootstrap_service.yml +++ b/ansible/roles/ceilometer/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Ceilometer bootstrap container vars: ceilometer_notification: "{{ ceilometer_services['ceilometer-notification'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ceilometer/tasks/config.yml b/ansible/roles/ceilometer/tasks/config.yml index 767cb6b255..1ec1d5d3a8 100644 --- a/ansible/roles/ceilometer/tasks/config.yml +++ b/ansible/roles/ceilometer/tasks/config.yml @@ -162,6 +162,7 @@ # check whether the containers parameter is changed. If yes, trigger the handler. - name: Check ceilometer containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ceilometer/tasks/pull.yml b/ansible/roles/ceilometer/tasks/pull.yml index 4cc8383495..89834e3a37 100644 --- a/ansible/roles/ceilometer/tasks/pull.yml +++ b/ansible/roles/ceilometer/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling ceilometer images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ceph/tasks/bootstrap_mons.yml b/ansible/roles/ceph/tasks/bootstrap_mons.yml index a5ec39d4c1..8d3b0ff577 100644 --- a/ansible/roles/ceph/tasks/bootstrap_mons.yml +++ b/ansible/roles/ceph/tasks/bootstrap_mons.yml @@ -12,6 +12,7 @@ run_once: True - name: Creating ceph_mon_config volume + become: true kolla_docker: action: "create_volume" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ceph/tasks/bootstrap_osds.yml b/ansible/roles/ceph/tasks/bootstrap_osds.yml index 00f46df7fd..ff80dfc501 100644 --- a/ansible/roles/ceph/tasks/bootstrap_osds.yml +++ b/ansible/roles/ceph/tasks/bootstrap_osds.yml @@ -40,6 +40,7 @@ - ceph_osd_wipe_disk != "yes-i-really-really-mean-it" - name: Bootstrapping Ceph OSDs + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -86,6 +87,7 @@ - ceph_osd_wipe_disk != "yes-i-really-really-mean-it" - name: Bootstrapping Ceph Cache OSDs + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ceph/tasks/generate_cluster.yml b/ansible/roles/ceph/tasks/generate_cluster.yml index beb78e5876..bf50c721cd 100644 --- a/ansible/roles/ceph/tasks/generate_cluster.yml +++ b/ansible/roles/ceph/tasks/generate_cluster.yml @@ -1,5 +1,6 @@ --- - name: Generating initial Ceph keyrings and monmap + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ceph/tasks/pull.yml b/ansible/roles/ceph/tasks/pull.yml index 017909cc5e..1bea1fc8a2 100644 --- a/ansible/roles/ceph/tasks/pull.yml +++ b/ansible/roles/ceph/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling ceph-mon image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" @@ -7,6 +8,7 @@ when: inventory_hostname in groups['ceph-mon'] - name: Pulling ceph-osd image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" @@ -14,6 +16,7 @@ when: inventory_hostname in groups['ceph-osd'] - name: Pulling ceph-rgw image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" @@ -21,6 +24,7 @@ when: inventory_hostname in groups['ceph-rgw'] - name: Pulling ceph-mgr image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" @@ -29,6 +33,7 @@ - inventory_hostname in groups['ceph-mgr'] - name: Pulling ceph-mds image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" @@ -38,6 +43,7 @@ - inventory_hostname in groups['ceph-mds'] - name: Pulling ceph-nfs image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ceph/tasks/reconfigure.yml b/ansible/roles/ceph/tasks/reconfigure.yml index dcb793b6ac..0b2e51b5c5 100644 --- a/ansible/roles/ceph/tasks/reconfigure.yml +++ b/ansible/roles/ceph/tasks/reconfigure.yml @@ -1,5 +1,6 @@ --- - name: Ensuring the ceph_mon container is up + become: true kolla_docker: name: "{{ item.name }}" action: "get_container_state" @@ -32,6 +33,7 @@ when: inventory_hostname in groups['ceph-osd'] - name: Ensuring the ceph_osd container is up + become: true kolla_docker: name: "ceph_osd_{{ item.stdout }}" action: "get_container_state" @@ -41,6 +43,7 @@ with_items: "{{ osd_ids.results|default({}) }}" - name: Ensuring the ceph_rgw container is up + become: true kolla_docker: name: "{{ item.name }}" action: "get_container_state" @@ -83,6 +86,7 @@ - { name: ceph_rgw, group: ceph-rgw } - name: Containers config strategy for ceph_mon container + become: true kolla_docker: name: "{{ item.name }}" action: "get_container_env" @@ -92,6 +96,7 @@ - { name: ceph_mon, group: ceph-mon } - name: Containers config strategy for the ceph_osd containers + become: true kolla_docker: name: "ceph_osd_{{ item.stdout }}" action: "get_container_env" @@ -102,6 +107,7 @@ - osds - name: Containers config strategy for ceph_rgw container + become: true kolla_docker: name: "{{ item.name }}" action: "get_container_env" @@ -113,6 +119,7 @@ - { name: ceph_rgw, group: ceph-rgw } - name: Remove the ceph_mon container + become: true kolla_docker: name: "{{ item[0]['name'] }}" action: "remove_container" @@ -127,6 +134,7 @@ - "{{ ceph_mon_check_results.results }}" - name: Remove the ceph_osd containers + become: true kolla_docker: name: "ceph_osd_{{ item.0.stdout }}" action: "remove_container" @@ -142,6 +150,7 @@ - "{{ ceph_osd_check_results.results }}" - name: Remove the ceph_rgw container + become: true kolla_docker: name: "{{ item[0]['name'] }}" action: "remove_container" @@ -172,6 +181,7 @@ - remove_ceph_rgw_container.changed - name: Restart the ceph_mon container + become: true kolla_docker: name: "ceph_mon" action: "restart_container" @@ -185,6 +195,7 @@ - "{{ ceph_mon_check_results.results }}" - name: Restart the ceph_osd container + become: true kolla_docker: name: "ceph_osd_{{ item.0.stdout }}" action: "restart_container" @@ -200,6 +211,7 @@ - "{{ ceph_osd_check_results.results }}" - name: Restart the ceph_rgw container + become: true kolla_docker: name: "ceph_rgw" action: "restart_container" diff --git a/ansible/roles/ceph/tasks/start_mdss.yml b/ansible/roles/ceph/tasks/start_mdss.yml index 5f9f08644a..f09481130d 100644 --- a/ansible/roles/ceph/tasks/start_mdss.yml +++ b/ansible/roles/ceph/tasks/start_mdss.yml @@ -38,6 +38,7 @@ with_items: "{{ ceph_mds_auth.results }}" - name: Starting ceph-mds container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ceph/tasks/start_mgrs.yml b/ansible/roles/ceph/tasks/start_mgrs.yml index 9c09542289..1e566f04fc 100644 --- a/ansible/roles/ceph/tasks/start_mgrs.yml +++ b/ansible/roles/ceph/tasks/start_mgrs.yml @@ -18,6 +18,7 @@ with_items: "{{ ceph_mgr_keyring.results }}" - name: Starting ceph-mgr container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ceph/tasks/start_mons.yml b/ansible/roles/ceph/tasks/start_mons.yml index ccc2467bf6..4428e576ae 100644 --- a/ansible/roles/ceph/tasks/start_mons.yml +++ b/ansible/roles/ceph/tasks/start_mons.yml @@ -1,5 +1,6 @@ --- - name: Starting ceph-mon container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ceph/tasks/start_nfss.yml b/ansible/roles/ceph/tasks/start_nfss.yml index 8cf94d4280..642d7e50f4 100644 --- a/ansible/roles/ceph/tasks/start_nfss.yml +++ b/ansible/roles/ceph/tasks/start_nfss.yml @@ -1,5 +1,6 @@ --- - name: Starting ceph-nfs container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ceph/tasks/start_osds.yml b/ansible/roles/ceph/tasks/start_osds.yml index 157879dc7d..44fe8292aa 100644 --- a/ansible/roles/ceph/tasks/start_osds.yml +++ b/ansible/roles/ceph/tasks/start_osds.yml @@ -31,6 +31,7 @@ failed_when: id.rc != 0 - name: Starting ceph-osd container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ceph/tasks/start_rgws.yml b/ansible/roles/ceph/tasks/start_rgws.yml index 22ad1d2133..559c4c8c68 100644 --- a/ansible/roles/ceph/tasks/start_rgws.yml +++ b/ansible/roles/ceph/tasks/start_rgws.yml @@ -1,5 +1,6 @@ --- - name: Starting ceph-rgw container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/chrony/handlers/main.yml b/ansible/roles/chrony/handlers/main.yml index c9add556f6..7c23f92f2b 100644 --- a/ansible/roles/chrony/handlers/main.yml +++ b/ansible/roles/chrony/handlers/main.yml @@ -3,6 +3,7 @@ vars: service_name: "chrony" service: "{{ chrony_services[service_name] }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/chrony/tasks/config.yml b/ansible/roles/chrony/tasks/config.yml index 2dcb1e05bb..40e88629e0 100644 --- a/ansible/roles/chrony/tasks/config.yml +++ b/ansible/roles/chrony/tasks/config.yml @@ -35,6 +35,7 @@ - Restart chrony container - name: Check chrony container + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/chrony/tasks/pull.yml b/ansible/roles/chrony/tasks/pull.yml index 0b1a2b24f5..25898b4f5b 100644 --- a/ansible/roles/chrony/tasks/pull.yml +++ b/ansible/roles/chrony/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling chrony images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/cinder/handlers/main.yml b/ansible/roles/cinder/handlers/main.yml index 516d6ea9fb..80abedf90a 100644 --- a/ansible/roles/cinder/handlers/main.yml +++ b/ansible/roles/cinder/handlers/main.yml @@ -7,6 +7,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -31,6 +32,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -54,6 +56,7 @@ 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_volume_container: "{{ check_cinder_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -79,6 +82,7 @@ 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_backup_container: "{{ check_cinder_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/cinder/tasks/bootstrap_service.yml b/ansible/roles/cinder/tasks/bootstrap_service.yml index b83865dd19..9f9ec5020a 100644 --- a/ansible/roles/cinder/tasks/bootstrap_service.yml +++ b/ansible/roles/cinder/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Cinder bootstrap container vars: cinder_api: "{{ cinder_services['cinder-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/cinder/tasks/config.yml b/ansible/roles/cinder/tasks/config.yml index f7b99bd64e..3ff603e835 100644 --- a/ansible/roles/cinder/tasks/config.yml +++ b/ansible/roles/cinder/tasks/config.yml @@ -120,6 +120,7 @@ when: inventory_hostname in groups['cinder-volume'] - name: Check cinder containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/cinder/tasks/pull.yml b/ansible/roles/cinder/tasks/pull.yml index 66b4911108..f680c9578f 100644 --- a/ansible/roles/cinder/tasks/pull.yml +++ b/ansible/roles/cinder/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling cinder images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/cinder/tasks/upgrade.yml b/ansible/roles/cinder/tasks/upgrade.yml index 3b48ca2d39..297f2728ed 100644 --- a/ansible/roles/cinder/tasks/upgrade.yml +++ b/ansible/roles/cinder/tasks/upgrade.yml @@ -19,6 +19,7 @@ - name: Running Cinder online schema migration vars: cinder_api: "{{ cinder_services['cinder-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/cloudkitty/handlers/main.yml b/ansible/roles/cloudkitty/handlers/main.yml index 56df7e205e..5ed65a8d03 100644 --- a/ansible/roles/cloudkitty/handlers/main.yml +++ b/ansible/roles/cloudkitty/handlers/main.yml @@ -7,6 +7,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -31,6 +32,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/cloudkitty/tasks/bootstrap_service.yml b/ansible/roles/cloudkitty/tasks/bootstrap_service.yml index db958ddc5d..1f401bfd5e 100644 --- a/ansible/roles/cloudkitty/tasks/bootstrap_service.yml +++ b/ansible/roles/cloudkitty/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Cloudkitty bootstrap container vars: cloudkitty_api: "{{ cloudkitty_services['cloudkitty-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/cloudkitty/tasks/config.yml b/ansible/roles/cloudkitty/tasks/config.yml index 9be09d8940..c750bb935e 100644 --- a/ansible/roles/cloudkitty/tasks/config.yml +++ b/ansible/roles/cloudkitty/tasks/config.yml @@ -98,6 +98,7 @@ - Restart cloudkitty-processor container - name: Check cloudkitty containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/cloudkitty/tasks/pull.yml b/ansible/roles/cloudkitty/tasks/pull.yml index a490cc195e..629c0d1aa9 100644 --- a/ansible/roles/cloudkitty/tasks/pull.yml +++ b/ansible/roles/cloudkitty/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling cloudkitty images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/collectd/handlers/main.yml b/ansible/roles/collectd/handlers/main.yml index a7b92560d2..708d5200b5 100644 --- a/ansible/roles/collectd/handlers/main.yml +++ b/ansible/roles/collectd/handlers/main.yml @@ -5,6 +5,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/collectd/tasks/config.yml b/ansible/roles/collectd/tasks/config.yml index cda35fa903..8213cf1a6f 100644 --- a/ansible/roles/collectd/tasks/config.yml +++ b/ansible/roles/collectd/tasks/config.yml @@ -60,6 +60,7 @@ - Restart collectd container - name: Check collectd containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/collectd/tasks/pull.yml b/ansible/roles/collectd/tasks/pull.yml index 1120000481..da2c5c968b 100644 --- a/ansible/roles/collectd/tasks/pull.yml +++ b/ansible/roles/collectd/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling collectd image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/common/handlers/main.yml b/ansible/roles/common/handlers/main.yml index 4c7f97495d..4b32ae6b8b 100644 --- a/ansible/roles/common/handlers/main.yml +++ b/ansible/roles/common/handlers/main.yml @@ -5,6 +5,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -31,6 +32,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -57,6 +59,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/common/tasks/bootstrap.yml b/ansible/roles/common/tasks/bootstrap.yml index eb6ad79c19..4329d7a956 100644 --- a/ansible/roles/common/tasks/bootstrap.yml +++ b/ansible/roles/common/tasks/bootstrap.yml @@ -1,5 +1,6 @@ --- - name: Creating log volume + become: true kolla_docker: action: "create_volume" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/common/tasks/config.yml b/ansible/roles/common/tasks/config.yml index 4c4cbf1c7a..628b8fea34 100644 --- a/ansible/roles/common/tasks/config.yml +++ b/ansible/roles/common/tasks/config.yml @@ -247,6 +247,7 @@ with_dict: "{{ common_services }}" - name: Check common containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/common/tasks/pull.yml b/ansible/roles/common/tasks/pull.yml index 9eb75ae987..2a18e9ce51 100644 --- a/ansible/roles/common/tasks/pull.yml +++ b/ansible/roles/common/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling common images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/congress/handlers/main.yml b/ansible/roles/congress/handlers/main.yml index c6362984ca..8b539cfcb5 100644 --- a/ansible/roles/congress/handlers/main.yml +++ b/ansible/roles/congress/handlers/main.yml @@ -7,6 +7,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -30,6 +31,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -53,6 +55,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/congress/tasks/bootstrap_service.yml b/ansible/roles/congress/tasks/bootstrap_service.yml index 86be91fd9d..ca498c6201 100644 --- a/ansible/roles/congress/tasks/bootstrap_service.yml +++ b/ansible/roles/congress/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running congress bootstrap container vars: congress_api: "{{ congress_services['congress-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/congress/tasks/config.yml b/ansible/roles/congress/tasks/config.yml index a89c6b26ee..f60f1f9f34 100644 --- a/ansible/roles/congress/tasks/config.yml +++ b/ansible/roles/congress/tasks/config.yml @@ -78,6 +78,7 @@ - "Restart {{ item.key }} container" - name: Check congress containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/congress/tasks/pull.yml b/ansible/roles/congress/tasks/pull.yml index 614a0ab963..5379a4d352 100644 --- a/ansible/roles/congress/tasks/pull.yml +++ b/ansible/roles/congress/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling congress images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/designate/handlers/main.yml b/ansible/roles/designate/handlers/main.yml index cd31d25df1..d78e528c5a 100644 --- a/ansible/roles/designate/handlers/main.yml +++ b/ansible/roles/designate/handlers/main.yml @@ -5,6 +5,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -29,6 +30,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -52,6 +54,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -75,6 +78,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -98,6 +102,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -121,6 +126,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -146,6 +152,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/designate/tasks/bootstrap_service.yml b/ansible/roles/designate/tasks/bootstrap_service.yml index 692b543628..be3b9dde14 100644 --- a/ansible/roles/designate/tasks/bootstrap_service.yml +++ b/ansible/roles/designate/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Designate bootstrap container vars: designate_central: "{{ designate_services['designate-central'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/designate/tasks/config.yml b/ansible/roles/designate/tasks/config.yml index 38d5cb273a..a51e1a7989 100644 --- a/ansible/roles/designate/tasks/config.yml +++ b/ansible/roles/designate/tasks/config.yml @@ -177,6 +177,7 @@ - Restart designate-worker container - name: Check designate containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/designate/tasks/pull.yml b/ansible/roles/designate/tasks/pull.yml index 0a69e291ea..1489dcc0de 100644 --- a/ansible/roles/designate/tasks/pull.yml +++ b/ansible/roles/designate/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling designate images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/elasticsearch/handlers/main.yml b/ansible/roles/elasticsearch/handlers/main.yml index de8d04c2c3..df200bd0bb 100644 --- a/ansible/roles/elasticsearch/handlers/main.yml +++ b/ansible/roles/elasticsearch/handlers/main.yml @@ -6,6 +6,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/elasticsearch/tasks/config.yml b/ansible/roles/elasticsearch/tasks/config.yml index f81efc53c4..dca9f342f8 100644 --- a/ansible/roles/elasticsearch/tasks/config.yml +++ b/ansible/roles/elasticsearch/tasks/config.yml @@ -50,6 +50,7 @@ - Restart elasticsearch container - name: Check elasticsearch containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/elasticsearch/tasks/pull.yml b/ansible/roles/elasticsearch/tasks/pull.yml index 666327f99a..bd2ab6ba45 100644 --- a/ansible/roles/elasticsearch/tasks/pull.yml +++ b/ansible/roles/elasticsearch/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling elasticsearch image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/etcd/handlers/main.yml b/ansible/roles/etcd/handlers/main.yml index d469f4fcce..b3f40f094e 100644 --- a/ansible/roles/etcd/handlers/main.yml +++ b/ansible/roles/etcd/handlers/main.yml @@ -5,6 +5,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/etcd/tasks/config.yml b/ansible/roles/etcd/tasks/config.yml index 764108b2f3..4e5b2aa425 100644 --- a/ansible/roles/etcd/tasks/config.yml +++ b/ansible/roles/etcd/tasks/config.yml @@ -27,6 +27,7 @@ - Restart etcd container - name: Check etcd containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/etcd/tasks/pull.yml b/ansible/roles/etcd/tasks/pull.yml index c88e003aa5..e5f18270d6 100644 --- a/ansible/roles/etcd/tasks/pull.yml +++ b/ansible/roles/etcd/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling etcd image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/freezer/handlers/main.yml b/ansible/roles/freezer/handlers/main.yml index de7e77c851..9318b2978a 100644 --- a/ansible/roles/freezer/handlers/main.yml +++ b/ansible/roles/freezer/handlers/main.yml @@ -7,6 +7,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -31,6 +32,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/freezer/tasks/bootstrap_service.yml b/ansible/roles/freezer/tasks/bootstrap_service.yml index cccd56c7bc..8bd008423e 100644 --- a/ansible/roles/freezer/tasks/bootstrap_service.yml +++ b/ansible/roles/freezer/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Freezer bootstrap container vars: freezer_api: "{{ freezer_services['freezer-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/freezer/tasks/config.yml b/ansible/roles/freezer/tasks/config.yml index 758b2ca5d7..8430046cd4 100644 --- a/ansible/roles/freezer/tasks/config.yml +++ b/ansible/roles/freezer/tasks/config.yml @@ -95,6 +95,7 @@ - "Restart {{ item.key }} container" - name: Check freezer containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/freezer/tasks/pull.yml b/ansible/roles/freezer/tasks/pull.yml index fd00948c6a..856c12d40a 100644 --- a/ansible/roles/freezer/tasks/pull.yml +++ b/ansible/roles/freezer/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling freezer images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/glance/handlers/main.yml b/ansible/roles/glance/handlers/main.yml index d637b24586..add13420dd 100644 --- a/ansible/roles/glance/handlers/main.yml +++ b/ansible/roles/glance/handlers/main.yml @@ -7,6 +7,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -32,6 +33,7 @@ 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_registry_container: "{{ check_glance_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/glance/tasks/bootstrap_service.yml b/ansible/roles/glance/tasks/bootstrap_service.yml index 4b3c5eb2cc..110841d4eb 100644 --- a/ansible/roles/glance/tasks/bootstrap_service.yml +++ b/ansible/roles/glance/tasks/bootstrap_service.yml @@ -19,6 +19,7 @@ - name: Running Glance bootstrap container vars: glance_api: "{{ glance_services['glance-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/glance/tasks/config.yml b/ansible/roles/glance/tasks/config.yml index adb26553eb..3ba3078f00 100644 --- a/ansible/roles/glance/tasks/config.yml +++ b/ansible/roles/glance/tasks/config.yml @@ -112,6 +112,7 @@ - Restart glance-registry container - name: Check glance containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/glance/tasks/pull.yml b/ansible/roles/glance/tasks/pull.yml index 4bc7a313e1..d12f8d304b 100644 --- a/ansible/roles/glance/tasks/pull.yml +++ b/ansible/roles/glance/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling glance images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/glance/tasks/rolling_upgrade.yml b/ansible/roles/glance/tasks/rolling_upgrade.yml index c192e03fa0..26de521d7b 100644 --- a/ansible/roles/glance/tasks/rolling_upgrade.yml +++ b/ansible/roles/glance/tasks/rolling_upgrade.yml @@ -32,6 +32,7 @@ - name: Running Glance database expand container vars: glance_api: "{{ glance_services['glance-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -52,6 +53,7 @@ - name: Running Glance database migrate container vars: glance_api: "{{ glance_services['glance-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -84,6 +86,7 @@ - name: Running Glance database contract container vars: glance_api: "{{ glance_services['glance-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/glance/tasks/stop_service.yml b/ansible/roles/glance/tasks/stop_service.yml index 7b7aa86618..fa4d019ca0 100644 --- a/ansible/roles/glance/tasks/stop_service.yml +++ b/ansible/roles/glance/tasks/stop_service.yml @@ -2,6 +2,7 @@ - name: Stop glance service vars: glance_api: "{{ glance_services['glance-api'] }}" + become: true kolla_docker: action: "stop_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/gnocchi/handlers/main.yml b/ansible/roles/gnocchi/handlers/main.yml index 76d192bf38..e125415aa9 100644 --- a/ansible/roles/gnocchi/handlers/main.yml +++ b/ansible/roles/gnocchi/handlers/main.yml @@ -7,6 +7,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -31,6 +32,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -54,6 +56,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/gnocchi/tasks/bootstrap_service.yml b/ansible/roles/gnocchi/tasks/bootstrap_service.yml index 58b014d242..0b0c42e366 100644 --- a/ansible/roles/gnocchi/tasks/bootstrap_service.yml +++ b/ansible/roles/gnocchi/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running gnocchi bootstrap container vars: gnocchi_api: "{{ gnocchi_services['gnocchi-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/gnocchi/tasks/config.yml b/ansible/roles/gnocchi/tasks/config.yml index ad3284eda5..eaeca31d05 100644 --- a/ansible/roles/gnocchi/tasks/config.yml +++ b/ansible/roles/gnocchi/tasks/config.yml @@ -101,6 +101,7 @@ - Restart gnocchi-statsd container - name: Check gnocchi containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/gnocchi/tasks/pull.yml b/ansible/roles/gnocchi/tasks/pull.yml index caf44ab530..a86d810f80 100644 --- a/ansible/roles/gnocchi/tasks/pull.yml +++ b/ansible/roles/gnocchi/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling gnocchi images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/grafana/handlers/main.yml b/ansible/roles/grafana/handlers/main.yml index ce4cfd67c4..a39a2ce4d2 100644 --- a/ansible/roles/grafana/handlers/main.yml +++ b/ansible/roles/grafana/handlers/main.yml @@ -6,6 +6,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/grafana/tasks/config.yml b/ansible/roles/grafana/tasks/config.yml index ab45d86d21..b33168dff3 100644 --- a/ansible/roles/grafana/tasks/config.yml +++ b/ansible/roles/grafana/tasks/config.yml @@ -99,6 +99,7 @@ - Restart grafana container - name: Check grafana containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/grafana/tasks/pull.yml b/ansible/roles/grafana/tasks/pull.yml index 376892ab61..5b0a5ddc54 100644 --- a/ansible/roles/grafana/tasks/pull.yml +++ b/ansible/roles/grafana/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling grafana image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/haproxy/handlers/main.yml b/ansible/roles/haproxy/handlers/main.yml index b9fe18928c..571c159c64 100644 --- a/ansible/roles/haproxy/handlers/main.yml +++ b/ansible/roles/haproxy/handlers/main.yml @@ -5,6 +5,7 @@ service: "{{ haproxy_services[service_name] }}" config_json: "{{ haproxy_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" haproxy_container: "{{ check_haproxy_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -29,6 +30,7 @@ service: "{{ haproxy_services[service_name] }}" config_json: "{{ haproxy_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" keepalived_container: "{{ check_haproxy_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/haproxy/tasks/config.yml b/ansible/roles/haproxy/tasks/config.yml index 9a1193a3c5..364b5a59f3 100644 --- a/ansible/roles/haproxy/tasks/config.yml +++ b/ansible/roles/haproxy/tasks/config.yml @@ -94,6 +94,7 @@ - Ensuring latest haproxy config is used - name: Check haproxy containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/haproxy/tasks/pull.yml b/ansible/roles/haproxy/tasks/pull.yml index ca86f7328c..fe202b7b99 100644 --- a/ansible/roles/haproxy/tasks/pull.yml +++ b/ansible/roles/haproxy/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling haproxy images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/haproxy/tasks/upgrade.yml b/ansible/roles/haproxy/tasks/upgrade.yml index 7ba6034992..3affae9e38 100644 --- a/ansible/roles/haproxy/tasks/upgrade.yml +++ b/ansible/roles/haproxy/tasks/upgrade.yml @@ -4,6 +4,7 @@ - set_fact: secondary_addresses={{ hostvars[inventory_hostname]['ansible_' + api_interface].get('ipv4_secondaries', []) | map(attribute='address') | list }} - name: Stopping all slave keepalived containers + become: true kolla_docker: action: "stop_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/heat/handlers/main.yml b/ansible/roles/heat/handlers/main.yml index c07597588f..fe5a5ad529 100644 --- a/ansible/roles/heat/handlers/main.yml +++ b/ansible/roles/heat/handlers/main.yml @@ -7,6 +7,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -30,6 +31,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -53,6 +55,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/heat/tasks/bootstrap_service.yml b/ansible/roles/heat/tasks/bootstrap_service.yml index fcab3e8de2..d2ee80f67b 100644 --- a/ansible/roles/heat/tasks/bootstrap_service.yml +++ b/ansible/roles/heat/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Heat bootstrap container vars: heat_api: "{{ heat_services['heat-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/heat/tasks/config.yml b/ansible/roles/heat/tasks/config.yml index a72b7698a7..97d2d501b4 100644 --- a/ansible/roles/heat/tasks/config.yml +++ b/ansible/roles/heat/tasks/config.yml @@ -95,6 +95,7 @@ - Restart heat-engine container - name: Check heat containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/heat/tasks/pull.yml b/ansible/roles/heat/tasks/pull.yml index 983bef4d25..d261b997d2 100644 --- a/ansible/roles/heat/tasks/pull.yml +++ b/ansible/roles/heat/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling heat images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/horizon/handlers/main.yml b/ansible/roles/horizon/handlers/main.yml index 8d6df8518f..c82a3c3551 100644 --- a/ansible/roles/horizon/handlers/main.yml +++ b/ansible/roles/horizon/handlers/main.yml @@ -3,6 +3,7 @@ vars: service_name: "horizon" service: "{{ horizon_services[service_name] }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/horizon/tasks/bootstrap_service.yml b/ansible/roles/horizon/tasks/bootstrap_service.yml index 998cdc5e10..4ad45a8d65 100644 --- a/ansible/roles/horizon/tasks/bootstrap_service.yml +++ b/ansible/roles/horizon/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Horizon bootstrap container vars: horizon: "{{ horizon_services['horizon'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/horizon/tasks/config.yml b/ansible/roles/horizon/tasks/config.yml index 45a4d1c133..fc959e92a0 100644 --- a/ansible/roles/horizon/tasks/config.yml +++ b/ansible/roles/horizon/tasks/config.yml @@ -136,6 +136,7 @@ - name: Check horizon container vars: horizon: "{{ horizon_services['horizon'] }}" + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/horizon/tasks/pull.yml b/ansible/roles/horizon/tasks/pull.yml index 41595cc4ba..5cbbe24ff1 100644 --- a/ansible/roles/horizon/tasks/pull.yml +++ b/ansible/roles/horizon/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling horizon images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/influxdb/handlers/main.yml b/ansible/roles/influxdb/handlers/main.yml index 8750d93537..8f900b00da 100644 --- a/ansible/roles/influxdb/handlers/main.yml +++ b/ansible/roles/influxdb/handlers/main.yml @@ -5,6 +5,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/influxdb/tasks/config.yml b/ansible/roles/influxdb/tasks/config.yml index ba56761db6..13c35d47bd 100644 --- a/ansible/roles/influxdb/tasks/config.yml +++ b/ansible/roles/influxdb/tasks/config.yml @@ -46,6 +46,7 @@ - Restart influxdb container - name: Check influxdb containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/influxdb/tasks/pull.yml b/ansible/roles/influxdb/tasks/pull.yml index c611eebd4e..354d89553b 100644 --- a/ansible/roles/influxdb/tasks/pull.yml +++ b/ansible/roles/influxdb/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling influxdb image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ironic/handlers/main.yml b/ansible/roles/ironic/handlers/main.yml index 903d3e44e5..0fb1aa1538 100644 --- a/ansible/roles/ironic/handlers/main.yml +++ b/ansible/roles/ironic/handlers/main.yml @@ -7,6 +7,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -30,6 +31,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -53,6 +55,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -75,6 +78,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -119,6 +123,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ironic/tasks/bootstrap.yml b/ansible/roles/ironic/tasks/bootstrap.yml index 71f01bfe38..6cc331680f 100644 --- a/ansible/roles/ironic/tasks/bootstrap.yml +++ b/ansible/roles/ironic/tasks/bootstrap.yml @@ -54,6 +54,7 @@ - name: Running Ironic-PXE bootstrap container vars: ironic_pxe: "{{ ironic_services['ironic-pxe'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ironic/tasks/bootstrap_service.yml b/ansible/roles/ironic/tasks/bootstrap_service.yml index 0962481bca..fa1a6df65f 100644 --- a/ansible/roles/ironic/tasks/bootstrap_service.yml +++ b/ansible/roles/ironic/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Ironic bootstrap container vars: ironic_api: "{{ ironic_services['ironic-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -22,6 +23,7 @@ - name: Running Ironic Inspector bootstrap container vars: ironic_inspector: "{{ ironic_services['ironic-inspector'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ironic/tasks/config.yml b/ansible/roles/ironic/tasks/config.yml index e821726a8f..c1efd18c5a 100644 --- a/ansible/roles/ironic/tasks/config.yml +++ b/ansible/roles/ironic/tasks/config.yml @@ -251,6 +251,7 @@ - "Restart {{ item.key }} container" - name: Check ironic containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ironic/tasks/pull.yml b/ansible/roles/ironic/tasks/pull.yml index bb133b5bc4..e42e0ade56 100644 --- a/ansible/roles/ironic/tasks/pull.yml +++ b/ansible/roles/ironic/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling ironic images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/iscsi/tasks/pull.yml b/ansible/roles/iscsi/tasks/pull.yml index df84c86cc7..b91fa58b8a 100644 --- a/ansible/roles/iscsi/tasks/pull.yml +++ b/ansible/roles/iscsi/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling iscsid image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" @@ -7,6 +8,7 @@ when: inventory_hostname in groups['iscsid'] - name: Pulling tgtd image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/iscsi/tasks/start.yml b/ansible/roles/iscsi/tasks/start.yml index 9adc860e3b..fe93171c30 100644 --- a/ansible/roles/iscsi/tasks/start.yml +++ b/ansible/roles/iscsi/tasks/start.yml @@ -1,5 +1,6 @@ --- - name: Starting iscsid container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -22,6 +23,7 @@ or ( inventory_hostname in groups['ironic-conductor'] and enable_ironic | bool ) - name: Starting tgtd container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/kafka/handlers/main.yml b/ansible/roles/kafka/handlers/main.yml index 5571f6391e..fe274b9ae8 100644 --- a/ansible/roles/kafka/handlers/main.yml +++ b/ansible/roles/kafka/handlers/main.yml @@ -6,6 +6,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/kafka/tasks/config.yml b/ansible/roles/kafka/tasks/config.yml index 70ca82237d..de6a8dc5d0 100644 --- a/ansible/roles/kafka/tasks/config.yml +++ b/ansible/roles/kafka/tasks/config.yml @@ -45,6 +45,7 @@ - Restart kafka container - name: Check kafka containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/kafka/tasks/pull.yml b/ansible/roles/kafka/tasks/pull.yml index 83f2aa6b18..42b3e70d4d 100644 --- a/ansible/roles/kafka/tasks/pull.yml +++ b/ansible/roles/kafka/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling kafka images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/karbor/handlers/main.yml b/ansible/roles/karbor/handlers/main.yml index 3ebfb9e5b9..4be0cb95c0 100644 --- a/ansible/roles/karbor/handlers/main.yml +++ b/ansible/roles/karbor/handlers/main.yml @@ -6,6 +6,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -27,6 +28,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -49,6 +51,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/karbor/tasks/bootstrap_service.yml b/ansible/roles/karbor/tasks/bootstrap_service.yml index f42931280b..0d272eb8e7 100644 --- a/ansible/roles/karbor/tasks/bootstrap_service.yml +++ b/ansible/roles/karbor/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Karbor bootstrap container vars: karbor_api: "{{ karbor_services['karbor-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/karbor/tasks/config.yml b/ansible/roles/karbor/tasks/config.yml index 3e837c91c1..792a4f86ac 100644 --- a/ansible/roles/karbor/tasks/config.yml +++ b/ansible/roles/karbor/tasks/config.yml @@ -68,6 +68,7 @@ - Restart karbor-protection container - name: Check karbor containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" @@ -75,7 +76,6 @@ image: "{{ item.value.image }}" volumes: "{{ item.value.volumes }}" mode: "0660" - become: true register: check_karbor_containers when: - kolla_action != "config" diff --git a/ansible/roles/karbor/tasks/pull.yml b/ansible/roles/karbor/tasks/pull.yml index 311f263d61..89bc29a003 100644 --- a/ansible/roles/karbor/tasks/pull.yml +++ b/ansible/roles/karbor/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling karbor images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/keystone/handlers/main.yml b/ansible/roles/keystone/handlers/main.yml index f5ab008c50..6a6efb61e2 100644 --- a/ansible/roles/keystone/handlers/main.yml +++ b/ansible/roles/keystone/handlers/main.yml @@ -6,6 +6,7 @@ vars: service_name: "keystone" service: "{{ keystone_services[service_name] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -33,6 +34,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -57,6 +59,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -79,6 +82,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -99,6 +103,7 @@ vars: service_name: "keystone" service: "{{ keystone_services[service_name] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/keystone/tasks/bootstrap_service.yml b/ansible/roles/keystone/tasks/bootstrap_service.yml index f04cb0e52a..b499a69161 100644 --- a/ansible/roles/keystone/tasks/bootstrap_service.yml +++ b/ansible/roles/keystone/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Keystone bootstrap container vars: keystone: "{{ keystone_services.keystone }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/keystone/tasks/config.yml b/ansible/roles/keystone/tasks/config.yml index b6988f959b..047b658565 100644 --- a/ansible/roles/keystone/tasks/config.yml +++ b/ansible/roles/keystone/tasks/config.yml @@ -230,6 +230,7 @@ - Restart keystone-ssh container - name: Check keystone containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/keystone/tasks/pull.yml b/ansible/roles/keystone/tasks/pull.yml index 230a14b29e..b4827d257a 100644 --- a/ansible/roles/keystone/tasks/pull.yml +++ b/ansible/roles/keystone/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling keystone images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/kibana/handlers/main.yml b/ansible/roles/kibana/handlers/main.yml index 82df9a7362..75aac15ff2 100644 --- a/ansible/roles/kibana/handlers/main.yml +++ b/ansible/roles/kibana/handlers/main.yml @@ -6,6 +6,7 @@ config_json: "{{ kibana_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" kibana_conf: "{{ kibana_confs.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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/kibana/tasks/config.yml b/ansible/roles/kibana/tasks/config.yml index 91eb214240..61037eec7e 100644 --- a/ansible/roles/kibana/tasks/config.yml +++ b/ansible/roles/kibana/tasks/config.yml @@ -41,6 +41,7 @@ - Restart kibana container - name: Check kibana containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/kibana/tasks/pull.yml b/ansible/roles/kibana/tasks/pull.yml index e4835b78ab..af22338414 100644 --- a/ansible/roles/kibana/tasks/pull.yml +++ b/ansible/roles/kibana/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling Kibana image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/kuryr/handlers/main.yml b/ansible/roles/kuryr/handlers/main.yml index 74a8c98eb1..5ccc81f9cc 100644 --- a/ansible/roles/kuryr/handlers/main.yml +++ b/ansible/roles/kuryr/handlers/main.yml @@ -7,6 +7,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/kuryr/tasks/config.yml b/ansible/roles/kuryr/tasks/config.yml index d67ce3325d..91a5c39170 100644 --- a/ansible/roles/kuryr/tasks/config.yml +++ b/ansible/roles/kuryr/tasks/config.yml @@ -97,6 +97,7 @@ - Restart kuryr container - name: Check kuryr containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/kuryr/tasks/pull.yml b/ansible/roles/kuryr/tasks/pull.yml index 44b24470e6..eab11dc9bc 100644 --- a/ansible/roles/kuryr/tasks/pull.yml +++ b/ansible/roles/kuryr/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling kuryr image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/magnum/handlers/main.yml b/ansible/roles/magnum/handlers/main.yml index 6827997cee..9c9a9d269c 100644 --- a/ansible/roles/magnum/handlers/main.yml +++ b/ansible/roles/magnum/handlers/main.yml @@ -7,6 +7,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -31,6 +32,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/magnum/tasks/bootstrap_service.yml b/ansible/roles/magnum/tasks/bootstrap_service.yml index f7d796f754..35bca46386 100644 --- a/ansible/roles/magnum/tasks/bootstrap_service.yml +++ b/ansible/roles/magnum/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Magnum bootstrap container vars: magnum_api: "{{ magnum_services['magnum-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/magnum/tasks/config.yml b/ansible/roles/magnum/tasks/config.yml index 518f5dc0f5..1701855eca 100644 --- a/ansible/roles/magnum/tasks/config.yml +++ b/ansible/roles/magnum/tasks/config.yml @@ -83,6 +83,7 @@ - Restart magnum-conductor container - name: Check magnum containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/magnum/tasks/pull.yml b/ansible/roles/magnum/tasks/pull.yml index c79c6bcd36..0d456e5dde 100644 --- a/ansible/roles/magnum/tasks/pull.yml +++ b/ansible/roles/magnum/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling magnum images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/manila/handlers/main.yml b/ansible/roles/manila/handlers/main.yml index 6cf6cb1365..426ee9a024 100644 --- a/ansible/roles/manila/handlers/main.yml +++ b/ansible/roles/manila/handlers/main.yml @@ -7,6 +7,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -30,6 +31,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -54,6 +56,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -76,6 +79,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/manila/tasks/bootstrap_service.yml b/ansible/roles/manila/tasks/bootstrap_service.yml index 914f0590ba..5f79880673 100644 --- a/ansible/roles/manila/tasks/bootstrap_service.yml +++ b/ansible/roles/manila/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Manila bootstrap container vars: manila_api: "{{ manila_services['manila-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/manila/tasks/config.yml b/ansible/roles/manila/tasks/config.yml index 87188cedd4..89cb46f0a4 100644 --- a/ansible/roles/manila/tasks/config.yml +++ b/ansible/roles/manila/tasks/config.yml @@ -106,6 +106,7 @@ - "Restart {{ item.key }} container" - name: Check manila containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/manila/tasks/pull.yml b/ansible/roles/manila/tasks/pull.yml index c446e78f84..d82cd7cc7a 100644 --- a/ansible/roles/manila/tasks/pull.yml +++ b/ansible/roles/manila/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling manila images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/mariadb/handlers/main.yml b/ansible/roles/mariadb/handlers/main.yml index 5e03334acc..213711d09e 100644 --- a/ansible/roles/mariadb/handlers/main.yml +++ b/ansible/roles/mariadb/handlers/main.yml @@ -3,6 +3,7 @@ vars: service_name: "mariadb" service: "{{ mariadb_services[service_name] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -46,6 +47,7 @@ service_name: "mariadb" service: "{{ mariadb_services[service_name] }}" mariadb_container: "{{ check_mariadb_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -87,6 +89,7 @@ service_name: "mariadb" service: "{{ mariadb_services[service_name] }}" mariadb_container: "{{ check_mariadb_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/mariadb/tasks/bootstrap_cluster.yml b/ansible/roles/mariadb/tasks/bootstrap_cluster.yml index 8181593ecc..a5425e5e1f 100644 --- a/ansible/roles/mariadb/tasks/bootstrap_cluster.yml +++ b/ansible/roles/mariadb/tasks/bootstrap_cluster.yml @@ -3,6 +3,7 @@ vars: service_name: "mariadb" service: "{{ mariadb_services[service_name] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/mariadb/tasks/config.yml b/ansible/roles/mariadb/tasks/config.yml index 3953d810af..68072be1f5 100644 --- a/ansible/roles/mariadb/tasks/config.yml +++ b/ansible/roles/mariadb/tasks/config.yml @@ -65,13 +65,13 @@ - restart master mariadb - name: Check mariadb containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" name: "{{ item.value.container_name }}" image: "{{ item.value.image }}" volumes: "{{ item.value.volumes }}" - become: true register: check_mariadb_containers when: - kolla_action != "config" diff --git a/ansible/roles/mariadb/tasks/lookup_cluster.yml b/ansible/roles/mariadb/tasks/lookup_cluster.yml index 0634573fa0..eef2a534f6 100644 --- a/ansible/roles/mariadb/tasks/lookup_cluster.yml +++ b/ansible/roles/mariadb/tasks/lookup_cluster.yml @@ -12,6 +12,7 @@ run_once: True - name: Creating mariadb volume + become: true kolla_docker: action: "create_volume" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/mariadb/tasks/pull.yml b/ansible/roles/mariadb/tasks/pull.yml index 1fc2cc41f3..e241ded0a6 100644 --- a/ansible/roles/mariadb/tasks/pull.yml +++ b/ansible/roles/mariadb/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling mariadb image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/mariadb/tasks/recover_cluster.yml b/ansible/roles/mariadb/tasks/recover_cluster.yml index a011cb2319..0dab90007b 100644 --- a/ansible/roles/mariadb/tasks/recover_cluster.yml +++ b/ansible/roles/mariadb/tasks/recover_cluster.yml @@ -16,11 +16,13 @@ - block: - name: Stop MariaDB containers + become: true kolla_docker: name: "{{ mariadb_service.container_name }}" action: "stop_container" - name: Run MariaDB wsrep recovery + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -35,6 +37,7 @@ volumes: "{{ mariadb_service.volumes }}" - name: Stop MariaDB containers + become: true kolla_docker: name: "{{ mariadb_service.container_name }}" action: "stop_container" @@ -109,6 +112,7 @@ - bootstrap_host == inventory_hostname - name: Starting first MariaDB container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -148,6 +152,7 @@ - bootstrap_host == inventory_hostname - name: Restart slave MariaDB container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/memcached/handlers/main.yml b/ansible/roles/memcached/handlers/main.yml index e3eb27dba0..11a82ef582 100644 --- a/ansible/roles/memcached/handlers/main.yml +++ b/ansible/roles/memcached/handlers/main.yml @@ -2,6 +2,7 @@ - name: Restart memcached container vars: service: "{{ memcached_services.memcached }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/memcached/tasks/config.yml b/ansible/roles/memcached/tasks/config.yml index f8df92707b..77011b4588 100644 --- a/ansible/roles/memcached/tasks/config.yml +++ b/ansible/roles/memcached/tasks/config.yml @@ -24,13 +24,13 @@ - name: Check memcached container vars: service: "{{ memcached_services.memcached }}" + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" name: "{{ service.container_name }}" image: "{{ service.image }}" volumes: "{{ service.volumes }}" - become: true register: check_memcached_container when: - inventory_hostname in groups[service.group] diff --git a/ansible/roles/memcached/tasks/pull.yml b/ansible/roles/memcached/tasks/pull.yml index f7827a6c52..bd10b20396 100644 --- a/ansible/roles/memcached/tasks/pull.yml +++ b/ansible/roles/memcached/tasks/pull.yml @@ -2,6 +2,7 @@ - name: Pulling memcached image vars: service: "{{ memcached_services.memcached }}" + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/mistral/handlers/main.yml b/ansible/roles/mistral/handlers/main.yml index 1ed3c9baa0..641abf0fc7 100644 --- a/ansible/roles/mistral/handlers/main.yml +++ b/ansible/roles/mistral/handlers/main.yml @@ -7,6 +7,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -30,6 +31,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -53,6 +55,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/mistral/tasks/bootstrap_service.yml b/ansible/roles/mistral/tasks/bootstrap_service.yml index 42a81b1bfb..83f148c29b 100644 --- a/ansible/roles/mistral/tasks/bootstrap_service.yml +++ b/ansible/roles/mistral/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Mistral bootstrap container vars: mistral_api: "{{ mistral_services['mistral-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/mistral/tasks/config.yml b/ansible/roles/mistral/tasks/config.yml index cc22c9d96a..be213b52aa 100644 --- a/ansible/roles/mistral/tasks/config.yml +++ b/ansible/roles/mistral/tasks/config.yml @@ -78,6 +78,7 @@ - Restart {{ item.key }} container - name: Check mistral containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/mistral/tasks/pull.yml b/ansible/roles/mistral/tasks/pull.yml index 030787762a..21756b4cb6 100644 --- a/ansible/roles/mistral/tasks/pull.yml +++ b/ansible/roles/mistral/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling mistral images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/monasca/handlers/main.yml b/ansible/roles/monasca/handlers/main.yml index eb26f72f77..dffdbc7d59 100644 --- a/ansible/roles/monasca/handlers/main.yml +++ b/ansible/roles/monasca/handlers/main.yml @@ -5,6 +5,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -26,6 +27,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/monasca/tasks/bootstrap_service.yml b/ansible/roles/monasca/tasks/bootstrap_service.yml index bed466e55b..f152a5684c 100644 --- a/ansible/roles/monasca/tasks/bootstrap_service.yml +++ b/ansible/roles/monasca/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running monasca bootstrap container vars: monasca_api: "{{ monasca_services['monasca-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/monasca/tasks/config.yml b/ansible/roles/monasca/tasks/config.yml index 391321d6b8..164b970868 100644 --- a/ansible/roles/monasca/tasks/config.yml +++ b/ansible/roles/monasca/tasks/config.yml @@ -101,6 +101,7 @@ - Restart monasca-log-api container - name: Check monasca containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/monasca/tasks/pull.yml b/ansible/roles/monasca/tasks/pull.yml index dae0055cbf..97ee460c42 100644 --- a/ansible/roles/monasca/tasks/pull.yml +++ b/ansible/roles/monasca/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling monasca images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/mongodb/handlers/main.yml b/ansible/roles/mongodb/handlers/main.yml index 75dab1a34e..a9e69d813f 100644 --- a/ansible/roles/mongodb/handlers/main.yml +++ b/ansible/roles/mongodb/handlers/main.yml @@ -6,6 +6,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/mongodb/tasks/bootstrap.yml b/ansible/roles/mongodb/tasks/bootstrap.yml index 6b2329cab7..9eeab0aaa6 100644 --- a/ansible/roles/mongodb/tasks/bootstrap.yml +++ b/ansible/roles/mongodb/tasks/bootstrap.yml @@ -1,5 +1,6 @@ --- - name: Starting mongodb bootstrap container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/mongodb/tasks/config.yml b/ansible/roles/mongodb/tasks/config.yml index 40061b9fbe..9a8b8a71c8 100644 --- a/ansible/roles/mongodb/tasks/config.yml +++ b/ansible/roles/mongodb/tasks/config.yml @@ -41,6 +41,7 @@ - Restart mongodb container - name: Check mongodb containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/mongodb/tasks/pull.yml b/ansible/roles/mongodb/tasks/pull.yml index d0a7d05684..932538c72a 100644 --- a/ansible/roles/mongodb/tasks/pull.yml +++ b/ansible/roles/mongodb/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling mongodb image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/multipathd/tasks/pull.yml b/ansible/roles/multipathd/tasks/pull.yml index 41d70f65e1..d515cfec17 100644 --- a/ansible/roles/multipathd/tasks/pull.yml +++ b/ansible/roles/multipathd/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling multipathd image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/multipathd/tasks/start.yml b/ansible/roles/multipathd/tasks/start.yml index c62dd10783..fe560dd9de 100644 --- a/ansible/roles/multipathd/tasks/start.yml +++ b/ansible/roles/multipathd/tasks/start.yml @@ -1,5 +1,6 @@ --- - name: Starting multipathd container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/murano/handlers/main.yml b/ansible/roles/murano/handlers/main.yml index e360d7fa17..5d24134460 100644 --- a/ansible/roles/murano/handlers/main.yml +++ b/ansible/roles/murano/handlers/main.yml @@ -7,6 +7,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -30,6 +31,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/murano/tasks/bootstrap_service.yml b/ansible/roles/murano/tasks/bootstrap_service.yml index 59a59a4c2f..8e7d7ea810 100644 --- a/ansible/roles/murano/tasks/bootstrap_service.yml +++ b/ansible/roles/murano/tasks/bootstrap_service.yml @@ -1,5 +1,6 @@ --- - name: Running Murano bootstrap container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/murano/tasks/config.yml b/ansible/roles/murano/tasks/config.yml index 654739755a..3b52abb311 100644 --- a/ansible/roles/murano/tasks/config.yml +++ b/ansible/roles/murano/tasks/config.yml @@ -79,6 +79,7 @@ - "Restart {{ item.key }} container" - name: Check murano containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/murano/tasks/pull.yml b/ansible/roles/murano/tasks/pull.yml index 5355bb0b5f..e60c735fda 100644 --- a/ansible/roles/murano/tasks/pull.yml +++ b/ansible/roles/murano/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling murano images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/neutron/handlers/main.yml b/ansible/roles/neutron/handlers/main.yml index 4692d4e33d..fd85187f6b 100644 --- a/ansible/roles/neutron/handlers/main.yml +++ b/ansible/roles/neutron/handlers/main.yml @@ -10,6 +10,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -39,6 +40,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -65,6 +67,7 @@ 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_xenapi_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -91,6 +94,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -118,6 +122,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -144,6 +149,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -174,6 +180,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -203,6 +210,7 @@ neutron_lbaas_conf: "{{ neutron_lbaas_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" neutron_lbaas_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -229,6 +237,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -254,6 +263,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -279,6 +289,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -304,6 +315,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/neutron/tasks/bootstrap_service.yml b/ansible/roles/neutron/tasks/bootstrap_service.yml index 8a30b91616..df738e70ab 100644 --- a/ansible/roles/neutron/tasks/bootstrap_service.yml +++ b/ansible/roles/neutron/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Neutron bootstrap container vars: neutron_server: "{{ neutron_services['neutron-server'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -21,6 +22,7 @@ - name: Running Neutron lbaas bootstrap container vars: neutron_lbaas_agent: "{{ neutron_services['neutron-lbaas-agent'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -43,6 +45,7 @@ - name: Running Neutron sfc bootstrap container vars: neutron_server: "{{ neutron_services['neutron-server'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/neutron/tasks/config-neutron-fake.yml b/ansible/roles/neutron/tasks/config-neutron-fake.yml index 5beef5de65..322d6d13b4 100644 --- a/ansible/roles/neutron/tasks/config-neutron-fake.yml +++ b/ansible/roles/neutron/tasks/config-neutron-fake.yml @@ -60,6 +60,7 @@ - name: Checking neutron-openvswitch-agent container for nova fake node vars: neutron_openvswitch_agent: "{{ neutron_services['neutron-openvswitch-agent'] }}" + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/neutron/tasks/config.yml b/ansible/roles/neutron/tasks/config.yml index bd1e9d3614..45ad4f98a7 100644 --- a/ansible/roles/neutron/tasks/config.yml +++ b/ansible/roles/neutron/tasks/config.yml @@ -414,6 +414,7 @@ # TODO check the environment change - name: Check neutron containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/neutron/tasks/pull.yml b/ansible/roles/neutron/tasks/pull.yml index d7f5a3678a..3f2090e7dc 100644 --- a/ansible/roles/neutron/tasks/pull.yml +++ b/ansible/roles/neutron/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling neutron images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/nova/handlers/main.yml b/ansible/roles/nova/handlers/main.yml index 4495c35bdd..3e037554da 100644 --- a/ansible/roles/nova/handlers/main.yml +++ b/ansible/roles/nova/handlers/main.yml @@ -5,6 +5,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -27,6 +28,7 @@ service: "{{ nova_services[service_name] }}" config_json: "{{ config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" nova_libvirt_container: "{{ check_nova_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -56,6 +58,7 @@ 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 }}" placement_api_container: "{{ check_nova_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -80,6 +83,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -104,6 +108,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -128,6 +133,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -153,6 +159,7 @@ 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_consoleauth_container: "{{ check_nova_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -177,6 +184,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -201,6 +209,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -225,6 +234,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -249,6 +259,7 @@ 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_container: "{{ check_nova_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -276,6 +287,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -295,6 +307,7 @@ # nova-compute-fake is special. It will start multi numbers of container # so put all variables here rather than defaults/main.yml file - name: Restart nova-compute-fake containers + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/nova/tasks/bootstrap_service.yml b/ansible/roles/nova/tasks/bootstrap_service.yml index 6b29b23add..1e35579ce6 100644 --- a/ansible/roles/nova/tasks/bootstrap_service.yml +++ b/ansible/roles/nova/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Nova bootstrap container vars: nova_api: "{{ nova_services['nova-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/nova/tasks/config-nova-fake.yml b/ansible/roles/nova/tasks/config-nova-fake.yml index c9dc9ca080..c5cae852e2 100644 --- a/ansible/roles/nova/tasks/config-nova-fake.yml +++ b/ansible/roles/nova/tasks/config-nova-fake.yml @@ -46,6 +46,7 @@ - Restart nova-compute-fake containers - name: Check nova-compute-fake containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" @@ -58,7 +59,6 @@ - "/lib/modules:/lib/modules:ro" - "/run:/run:shared" - "kolla_logs:/var/log/kolla/" - become: true with_sequence: start=1 end={{ num_nova_fake_per_node }} when: - kolla_action != "config" diff --git a/ansible/roles/nova/tasks/pull.yml b/ansible/roles/nova/tasks/pull.yml index 4d32080e01..52bb8fa43a 100644 --- a/ansible/roles/nova/tasks/pull.yml +++ b/ansible/roles/nova/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling nova images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/nova/tasks/upgrade.yml b/ansible/roles/nova/tasks/upgrade.yml index 320749d0fa..4fab8139d3 100644 --- a/ansible/roles/nova/tasks/upgrade.yml +++ b/ansible/roles/nova/tasks/upgrade.yml @@ -5,6 +5,7 @@ - include: bootstrap_service.yml - name: Checking if conductor container needs upgrading + become: true kolla_docker: action: "compare_image" common_options: "{{ docker_common_options }}" @@ -15,6 +16,7 @@ # Short downtime here, but from user perspective his call will just timeout or execute later - name: Stopping all nova_conductor containers + become: true kolla_docker: action: "stop_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/octavia/handlers/main.yml b/ansible/roles/octavia/handlers/main.yml index 3e19467b8c..94b319383a 100644 --- a/ansible/roles/octavia/handlers/main.yml +++ b/ansible/roles/octavia/handlers/main.yml @@ -6,6 +6,7 @@ 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 }}" octavia_api_container: "{{ check_octavia_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -27,6 +28,7 @@ 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 }}" octavia_health_manager_container: "{{ check_octavia_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -49,6 +51,7 @@ 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 }}" octavia_housekeeping_container: "{{ check_octavia_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -71,6 +74,7 @@ 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 }}" octavia_worker_container: "{{ check_octavia_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/octavia/tasks/bootstrap_service.yml b/ansible/roles/octavia/tasks/bootstrap_service.yml index 0580808c0d..1c752cb701 100644 --- a/ansible/roles/octavia/tasks/bootstrap_service.yml +++ b/ansible/roles/octavia/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Octavia bootstrap container vars: octavia_api: "{{ octavia_services['octavia-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/octavia/tasks/config.yml b/ansible/roles/octavia/tasks/config.yml index 07bb5187be..74ec14970b 100644 --- a/ansible/roles/octavia/tasks/config.yml +++ b/ansible/roles/octavia/tasks/config.yml @@ -101,6 +101,7 @@ - Restart octavia-health-manager container - name: Check octavia containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/octavia/tasks/pull.yml b/ansible/roles/octavia/tasks/pull.yml index 8c03466ca6..180006ff58 100644 --- a/ansible/roles/octavia/tasks/pull.yml +++ b/ansible/roles/octavia/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling octavia images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/opendaylight/handlers/main.yml b/ansible/roles/opendaylight/handlers/main.yml index 5c9f780300..ae42b61a57 100644 --- a/ansible/roles/opendaylight/handlers/main.yml +++ b/ansible/roles/opendaylight/handlers/main.yml @@ -3,6 +3,7 @@ vars: service_name: "opendaylight" service: "{{ opendaylight_services[service_name] }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/opendaylight/tasks/config.yml b/ansible/roles/opendaylight/tasks/config.yml index ff4b0c8d8e..9a31d97b62 100644 --- a/ansible/roles/opendaylight/tasks/config.yml +++ b/ansible/roles/opendaylight/tasks/config.yml @@ -205,6 +205,7 @@ - Restart opendaylight container - name: Check opendaylight containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/opendaylight/tasks/pull.yml b/ansible/roles/opendaylight/tasks/pull.yml index 76a1bd6b6a..7ed2139da7 100644 --- a/ansible/roles/opendaylight/tasks/pull.yml +++ b/ansible/roles/opendaylight/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling opendaylight image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/openvswitch/handlers/main.yml b/ansible/roles/openvswitch/handlers/main.yml index 333941e712..3ba4d564f7 100644 --- a/ansible/roles/openvswitch/handlers/main.yml +++ b/ansible/roles/openvswitch/handlers/main.yml @@ -5,6 +5,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -47,6 +48,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/openvswitch/tasks/config.yml b/ansible/roles/openvswitch/tasks/config.yml index 8781d7ed5d..20ddca920e 100644 --- a/ansible/roles/openvswitch/tasks/config.yml +++ b/ansible/roles/openvswitch/tasks/config.yml @@ -55,6 +55,7 @@ - "Restart openvswitch-db-server container" - name: Check openvswitch containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/openvswitch/tasks/pull.yml b/ansible/roles/openvswitch/tasks/pull.yml index 83056917d9..47207b65a0 100644 --- a/ansible/roles/openvswitch/tasks/pull.yml +++ b/ansible/roles/openvswitch/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling Openvswitch images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ovs-dpdk/handlers/main.yml b/ansible/roles/ovs-dpdk/handlers/main.yml index 6e61eb6e17..5aa29ae7c6 100644 --- a/ansible/roles/ovs-dpdk/handlers/main.yml +++ b/ansible/roles/ovs-dpdk/handlers/main.yml @@ -5,6 +5,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -57,6 +58,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ovs-dpdk/tasks/config.yml b/ansible/roles/ovs-dpdk/tasks/config.yml index a5134b8d99..6caa1c6bda 100644 --- a/ansible/roles/ovs-dpdk/tasks/config.yml +++ b/ansible/roles/ovs-dpdk/tasks/config.yml @@ -45,6 +45,7 @@ # TODO check the environment change - name: Check ovs containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/ovs-dpdk/tasks/pull.yml b/ansible/roles/ovs-dpdk/tasks/pull.yml index 2ac1173c60..a0ca8d0ed5 100644 --- a/ansible/roles/ovs-dpdk/tasks/pull.yml +++ b/ansible/roles/ovs-dpdk/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling ovs-dpdk images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/panko/handlers/main.yml b/ansible/roles/panko/handlers/main.yml index 36db6b0fc4..9c2290ea4d 100644 --- a/ansible/roles/panko/handlers/main.yml +++ b/ansible/roles/panko/handlers/main.yml @@ -7,6 +7,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/panko/tasks/bootstrap_service.yml b/ansible/roles/panko/tasks/bootstrap_service.yml index 16d4e5e195..e6e9dd3b2f 100644 --- a/ansible/roles/panko/tasks/bootstrap_service.yml +++ b/ansible/roles/panko/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running panko bootstrap container vars: panko_api: "{{ panko_services['panko-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/panko/tasks/config.yml b/ansible/roles/panko/tasks/config.yml index 00e42bc3d4..086744acc6 100644 --- a/ansible/roles/panko/tasks/config.yml +++ b/ansible/roles/panko/tasks/config.yml @@ -95,6 +95,7 @@ - Restart panko-api container - name: Check panko containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/panko/tasks/pull.yml b/ansible/roles/panko/tasks/pull.yml index cacd7e794e..f82270c902 100644 --- a/ansible/roles/panko/tasks/pull.yml +++ b/ansible/roles/panko/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling panko-api image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/prometheus/handlers/main.yml b/ansible/roles/prometheus/handlers/main.yml index 7f8134fa79..3801e1a0d4 100644 --- a/ansible/roles/prometheus/handlers/main.yml +++ b/ansible/roles/prometheus/handlers/main.yml @@ -5,6 +5,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -25,6 +26,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -45,6 +47,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -65,6 +68,7 @@ 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" common_options: "{{ docker_common_options }}" @@ -84,6 +88,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/prometheus/tasks/config.yml b/ansible/roles/prometheus/tasks/config.yml index 286ff4af62..67f77ded7d 100644 --- a/ansible/roles/prometheus/tasks/config.yml +++ b/ansible/roles/prometheus/tasks/config.yml @@ -58,6 +58,7 @@ - Restart prometheus-mysqld-exporter container - name: Check prometheus containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/prometheus/tasks/pull.yml b/ansible/roles/prometheus/tasks/pull.yml index 0a9553fdbc..af0f82dfa0 100644 --- a/ansible/roles/prometheus/tasks/pull.yml +++ b/ansible/roles/prometheus/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling prometheus images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/qdrouterd/handlers/main.yml b/ansible/roles/qdrouterd/handlers/main.yml index 3cf7a02cd1..e679b314ef 100644 --- a/ansible/roles/qdrouterd/handlers/main.yml +++ b/ansible/roles/qdrouterd/handlers/main.yml @@ -5,6 +5,7 @@ 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" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/qdrouterd/tasks/config.yml b/ansible/roles/qdrouterd/tasks/config.yml index 6d93b0bd9e..04c957ce2b 100644 --- a/ansible/roles/qdrouterd/tasks/config.yml +++ b/ansible/roles/qdrouterd/tasks/config.yml @@ -65,6 +65,7 @@ - Restart qdrouterd container - name: Check qdrouterd containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/qdrouterd/tasks/pull.yml b/ansible/roles/qdrouterd/tasks/pull.yml index a4f2e91a2f..682399f378 100644 --- a/ansible/roles/qdrouterd/tasks/pull.yml +++ b/ansible/roles/qdrouterd/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling qdrouterd image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/rabbitmq/handlers/main.yml b/ansible/roles/rabbitmq/handlers/main.yml index 932253915f..deffdbb14d 100644 --- a/ansible/roles/rabbitmq/handlers/main.yml +++ b/ansible/roles/rabbitmq/handlers/main.yml @@ -5,6 +5,7 @@ service: "{{ rabbitmq_services[service_name] }}" config_json: "{{ rabbitmq_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" rabbitmq_container: "{{ check_rabbitmq_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/rabbitmq/tasks/bootstrap.yml b/ansible/roles/rabbitmq/tasks/bootstrap.yml index 10dd5f721c..4a215dabf3 100644 --- a/ansible/roles/rabbitmq/tasks/bootstrap.yml +++ b/ansible/roles/rabbitmq/tasks/bootstrap.yml @@ -1,5 +1,6 @@ --- - name: Creating rabbitmq volume + become: true kolla_docker: action: "create_volume" common_options: "{{ docker_common_options }}" @@ -10,6 +11,7 @@ vars: service_name: "rabbitmq" service: "{{ rabbitmq_services[service_name] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/rabbitmq/tasks/config.yml b/ansible/roles/rabbitmq/tasks/config.yml index 198549ecfe..98b0dc0462 100644 --- a/ansible/roles/rabbitmq/tasks/config.yml +++ b/ansible/roles/rabbitmq/tasks/config.yml @@ -47,6 +47,7 @@ - Restart rabbitmq container - name: Check rabbitmq containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/rabbitmq/tasks/pull.yml b/ansible/roles/rabbitmq/tasks/pull.yml index 4ebed4c038..5e08a9b25a 100644 --- a/ansible/roles/rabbitmq/tasks/pull.yml +++ b/ansible/roles/rabbitmq/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling rabbitmq image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/rabbitmq/tasks/upgrade.yml b/ansible/roles/rabbitmq/tasks/upgrade.yml index c27a71b50f..d015e6349a 100644 --- a/ansible/roles/rabbitmq/tasks/upgrade.yml +++ b/ansible/roles/rabbitmq/tasks/upgrade.yml @@ -3,6 +3,7 @@ vars: service_name: "rabbitmq" service: "{{ rabbitmq_services[service_name] }}" + become: true kolla_docker: action: "compare_image" common_options: "{{ docker_common_options }}" @@ -22,6 +23,7 @@ run_once: True - name: Stopping non-gospel nodes + become: true kolla_docker: action: "stop_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/rally/handlers/main.yml b/ansible/roles/rally/handlers/main.yml index de9f02214b..0c31c7c413 100644 --- a/ansible/roles/rally/handlers/main.yml +++ b/ansible/roles/rally/handlers/main.yml @@ -7,6 +7,7 @@ rally_conf: "{{ rally_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ rally_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" rally_container: "{{ check_rally_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/rally/tasks/bootstrap_service.yml b/ansible/roles/rally/tasks/bootstrap_service.yml index cc8aaccf75..c174ecef68 100644 --- a/ansible/roles/rally/tasks/bootstrap_service.yml +++ b/ansible/roles/rally/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running rally bootstrap container vars: rally: "{{ rally_services['rally'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/rally/tasks/config.yml b/ansible/roles/rally/tasks/config.yml index 7e2b07ad08..950b9be2f4 100644 --- a/ansible/roles/rally/tasks/config.yml +++ b/ansible/roles/rally/tasks/config.yml @@ -77,6 +77,7 @@ - Restart rally container - name: Check rally containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/rally/tasks/pull.yml b/ansible/roles/rally/tasks/pull.yml index 171e7ee3e7..381dc82882 100644 --- a/ansible/roles/rally/tasks/pull.yml +++ b/ansible/roles/rally/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling rally image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/redis/handlers/main.yml b/ansible/roles/redis/handlers/main.yml index f0920265d2..30dfe4927f 100644 --- a/ansible/roles/redis/handlers/main.yml +++ b/ansible/roles/redis/handlers/main.yml @@ -6,6 +6,7 @@ config_json: "{{ redis_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" redis_conf: "{{ redis_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" redis_container: "{{ check_redis_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -27,6 +28,7 @@ config_json: "{{ redis_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" redis_conf: "{{ redis_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" redis_container: "{{ check_redis_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/redis/tasks/config.yml b/ansible/roles/redis/tasks/config.yml index 1fc3836935..bc9486d5c1 100644 --- a/ansible/roles/redis/tasks/config.yml +++ b/ansible/roles/redis/tasks/config.yml @@ -41,6 +41,7 @@ - Restart {{ item.key }} container - name: Check redis containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/redis/tasks/pull.yml b/ansible/roles/redis/tasks/pull.yml index 6fefbdbf2c..e46ca59a7e 100644 --- a/ansible/roles/redis/tasks/pull.yml +++ b/ansible/roles/redis/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling redis images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/sahara/handlers/main.yml b/ansible/roles/sahara/handlers/main.yml index 476107e5a8..83ee69fd8f 100644 --- a/ansible/roles/sahara/handlers/main.yml +++ b/ansible/roles/sahara/handlers/main.yml @@ -7,6 +7,7 @@ sahara_conf: "{{ sahara_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ sahara_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" sahara_api_container: "{{ check_sahara_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -30,6 +31,7 @@ sahara_conf: "{{ sahara_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ sahara_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" sahara_engine_container: "{{ check_sahara_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/sahara/tasks/bootstrap_service.yml b/ansible/roles/sahara/tasks/bootstrap_service.yml index f2d8787164..2a60cf6695 100644 --- a/ansible/roles/sahara/tasks/bootstrap_service.yml +++ b/ansible/roles/sahara/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Sahara bootstrap container vars: sahara_api: "{{ sahara_services['sahara-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/sahara/tasks/config.yml b/ansible/roles/sahara/tasks/config.yml index 687ff46e34..f7f249f524 100644 --- a/ansible/roles/sahara/tasks/config.yml +++ b/ansible/roles/sahara/tasks/config.yml @@ -83,6 +83,7 @@ - Restart sahara-engine container - name: Check sahara containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/sahara/tasks/pull.yml b/ansible/roles/sahara/tasks/pull.yml index 162ad1f034..04533f4b25 100644 --- a/ansible/roles/sahara/tasks/pull.yml +++ b/ansible/roles/sahara/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling sahara images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/searchlight/handlers/main.yml b/ansible/roles/searchlight/handlers/main.yml index 8ec965d753..7d109af6f5 100644 --- a/ansible/roles/searchlight/handlers/main.yml +++ b/ansible/roles/searchlight/handlers/main.yml @@ -7,6 +7,7 @@ searchlight_conf: "{{ searchlight_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ searchlight_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" searchlight_api_container: "{{ check_searchlight_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -30,6 +31,7 @@ searchlight_conf: "{{ searchlight_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ searchlight_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" searchlight_listener_container: "{{ check_searchlight_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/searchlight/tasks/bootstrap_service.yml b/ansible/roles/searchlight/tasks/bootstrap_service.yml index b02b8b2b9f..d210e24162 100644 --- a/ansible/roles/searchlight/tasks/bootstrap_service.yml +++ b/ansible/roles/searchlight/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Searchlight bootstrap container vars: searchlight_api: "{{ searchlight_services['searchlight-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/searchlight/tasks/config.yml b/ansible/roles/searchlight/tasks/config.yml index 375f80a081..c26360a8ac 100644 --- a/ansible/roles/searchlight/tasks/config.yml +++ b/ansible/roles/searchlight/tasks/config.yml @@ -79,6 +79,7 @@ - Restart searchlight-listener container - name: Check searchlight containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/searchlight/tasks/pull.yml b/ansible/roles/searchlight/tasks/pull.yml index d6b6e78432..6cfb58d99c 100644 --- a/ansible/roles/searchlight/tasks/pull.yml +++ b/ansible/roles/searchlight/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling searchlight images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/senlin/handlers/main.yml b/ansible/roles/senlin/handlers/main.yml index 7e367d3d71..fa4f517da4 100644 --- a/ansible/roles/senlin/handlers/main.yml +++ b/ansible/roles/senlin/handlers/main.yml @@ -7,6 +7,7 @@ senlin_conf: "{{ senlin_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ senlin_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" senlin_api_container: "{{ check_senlin_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -30,6 +31,7 @@ senlin_conf: "{{ senlin_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ senlin_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" senlin_engine_container: "{{ check_senlin_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/senlin/tasks/bootstrap_service.yml b/ansible/roles/senlin/tasks/bootstrap_service.yml index cc5a3961ea..c584b7a7ae 100644 --- a/ansible/roles/senlin/tasks/bootstrap_service.yml +++ b/ansible/roles/senlin/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Senlin bootstrap container vars: senlin_api: "{{ senlin_services['senlin-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/senlin/tasks/config.yml b/ansible/roles/senlin/tasks/config.yml index d6f22617a4..90bf1fabe1 100644 --- a/ansible/roles/senlin/tasks/config.yml +++ b/ansible/roles/senlin/tasks/config.yml @@ -83,6 +83,7 @@ - Restart senlin-engine container - name: Check senlin containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/senlin/tasks/pull.yml b/ansible/roles/senlin/tasks/pull.yml index 11faee637c..f2c70ee607 100644 --- a/ansible/roles/senlin/tasks/pull.yml +++ b/ansible/roles/senlin/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling senlin images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/skydive/handlers/main.yml b/ansible/roles/skydive/handlers/main.yml index 02ebb45379..a7ddb9be08 100644 --- a/ansible/roles/skydive/handlers/main.yml +++ b/ansible/roles/skydive/handlers/main.yml @@ -6,6 +6,7 @@ config_json: "{{ skydive_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" skydive_conf: "{{ skydive_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" skydive_analyzer_container: "{{ check_skydive_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -27,6 +28,7 @@ config_json: "{{ skydive_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" skydive_conf: "{{ skydive_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" skydive_agent_container: "{{ check_skydive_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/skydive/tasks/config.yml b/ansible/roles/skydive/tasks/config.yml index d269d4afed..3c0b221948 100644 --- a/ansible/roles/skydive/tasks/config.yml +++ b/ansible/roles/skydive/tasks/config.yml @@ -43,6 +43,7 @@ - Restart skydive-agent container - name: Check skydive containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/skydive/tasks/pull.yml b/ansible/roles/skydive/tasks/pull.yml index c2db429c78..a98765e693 100644 --- a/ansible/roles/skydive/tasks/pull.yml +++ b/ansible/roles/skydive/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling skydive images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/solum/handlers/main.yml b/ansible/roles/solum/handlers/main.yml index 29e2bf5700..ae4f6f4f40 100644 --- a/ansible/roles/solum/handlers/main.yml +++ b/ansible/roles/solum/handlers/main.yml @@ -6,6 +6,7 @@ config_json: "{{ solum_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" solum_conf: "{{ solum_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" solum_api_container: "{{ check_solum_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -27,6 +28,7 @@ config_json: "{{ solum_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" solum_conf: "{{ solum_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" solum_worker_container: "{{ check_solum_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -48,6 +50,7 @@ config_json: "{{ solum_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" solum_conf: "{{ solum_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" solum_deployer_container: "{{ check_solum_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -69,6 +72,7 @@ config_json: "{{ solum_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" solum_conf: "{{ solum_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" solum_conductor_container: "{{ check_solum_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/solum/tasks/bootstrap_service.yml b/ansible/roles/solum/tasks/bootstrap_service.yml index 728fd1fd20..0d20835719 100644 --- a/ansible/roles/solum/tasks/bootstrap_service.yml +++ b/ansible/roles/solum/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Solum bootstrap container vars: solum_api: "{{ solum_services['solum-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/solum/tasks/config.yml b/ansible/roles/solum/tasks/config.yml index f8a98e37e3..346fef1b88 100644 --- a/ansible/roles/solum/tasks/config.yml +++ b/ansible/roles/solum/tasks/config.yml @@ -54,6 +54,7 @@ - Restart solum-worker container - name: Check solum containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/solum/tasks/pull.yml b/ansible/roles/solum/tasks/pull.yml index e396831b9f..2506be77e5 100644 --- a/ansible/roles/solum/tasks/pull.yml +++ b/ansible/roles/solum/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling solum images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/swift/tasks/pull.yml b/ansible/roles/swift/tasks/pull.yml index 239a179ae6..61946da2f3 100644 --- a/ansible/roles/swift/tasks/pull.yml +++ b/ansible/roles/swift/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling rsyncd image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" @@ -9,6 +10,7 @@ inventory_hostname in groups['swift-object-server'] - name: Pulling swift-proxy-server image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" @@ -16,6 +18,7 @@ when: inventory_hostname in groups['swift-proxy-server'] - name: Pulling swift-account image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" @@ -23,6 +26,7 @@ when: inventory_hostname in groups['swift-account-server'] - name: Pulling swift-container image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" @@ -30,6 +34,7 @@ when: inventory_hostname in groups['swift-container-server'] - name: Pulling swift-object image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" @@ -37,6 +42,7 @@ when: inventory_hostname in groups['swift-object-server'] - name: Pulling swift-object-expirer image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/swift/tasks/reconfigure.yml b/ansible/roles/swift/tasks/reconfigure.yml index 3cb6ebe548..469ba8e176 100644 --- a/ansible/roles/swift/tasks/reconfigure.yml +++ b/ansible/roles/swift/tasks/reconfigure.yml @@ -1,5 +1,6 @@ --- - name: Ensuring the containers up + become: true kolla_docker: name: "{{ item.name }}" action: "get_container_state" @@ -56,6 +57,7 @@ # and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE', # just remove the container and start again - name: Containers config strategy + become: true kolla_docker: name: "{{ item.name }}" action: "get_container_env" @@ -81,6 +83,7 @@ - { name: swift_proxy_server, group: swift-proxy-server } - name: Remove the containers + become: true kolla_docker: name: "{{ item[0]['name'] }}" action: "remove_container" @@ -114,6 +117,7 @@ when: remove_containers.changed - name: Restart containers + become: true kolla_docker: name: "{{ item[0]['name'] }}" action: "restart_container" diff --git a/ansible/roles/swift/tasks/start.yml b/ansible/roles/swift/tasks/start.yml index ded4be59b3..63cb35c75e 100644 --- a/ansible/roles/swift/tasks/start.yml +++ b/ansible/roles/swift/tasks/start.yml @@ -33,6 +33,7 @@ inventory_hostname in groups['swift-object-server'] - name: Starting swift-rsyncd container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -47,6 +48,7 @@ inventory_hostname in groups['swift-object-server'] - name: Starting swift-account-server container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -60,6 +62,7 @@ when: inventory_hostname in groups['swift-account-server'] - name: Starting swift-account-auditor container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -73,6 +76,7 @@ when: inventory_hostname in groups['swift-account-server'] - name: Starting swift-account-replicator container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -88,6 +92,7 @@ when: inventory_hostname in groups['swift-account-server'] - name: Starting swift-account-reaper container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -101,6 +106,7 @@ when: inventory_hostname in groups['swift-account-server'] - name: Starting swift-container-server container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -114,6 +120,7 @@ when: inventory_hostname in groups['swift-container-server'] - name: Starting swift-container-auditor container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -127,6 +134,7 @@ when: inventory_hostname in groups['swift-container-server'] - name: Starting swift-container-replicator container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -142,6 +150,7 @@ when: inventory_hostname in groups['swift-container-server'] - name: Starting swift-container-updater container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -155,6 +164,7 @@ when: inventory_hostname in groups['swift-container-server'] - name: Starting swift-object-server container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -168,6 +178,7 @@ when: inventory_hostname in groups['swift-object-server'] - name: Starting swift-object-auditor container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -181,6 +192,7 @@ when: inventory_hostname in groups['swift-object-server'] - name: Starting swift-object-replicator container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -196,6 +208,7 @@ when: inventory_hostname in groups['swift-object-server'] - name: Starting swift-object-updater container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -209,6 +222,7 @@ when: inventory_hostname in groups['swift-object-server'] - name: Starting swift-object-expirer container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" @@ -222,6 +236,7 @@ when: inventory_hostname in groups['swift-object-server'] - name: Starting swift-proxy-server container + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/swift/tasks/stop_and_start.yml b/ansible/roles/swift/tasks/stop_and_start.yml index fca139f573..c91da5d6ce 100644 --- a/ansible/roles/swift/tasks/stop_and_start.yml +++ b/ansible/roles/swift/tasks/stop_and_start.yml @@ -3,6 +3,7 @@ # were refactored for Mitaka, we need to completely remove the existing # containers or we get a conflict when attempting to start the new ones. - name: "Cleaning out old Swift containers" + become: true kolla_docker: name: "{{ item }}" # TODO(pbourke): Swift recommend using a SIGHUP to gracefully stop the diff --git a/ansible/roles/tacker/handlers/main.yml b/ansible/roles/tacker/handlers/main.yml index fb81cd60ae..2f5b656614 100644 --- a/ansible/roles/tacker/handlers/main.yml +++ b/ansible/roles/tacker/handlers/main.yml @@ -7,6 +7,7 @@ tacker_conf: "{{ tacker_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ tacker_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" tacker_conductor_container: "{{ check_tacker_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -30,6 +31,7 @@ tacker_conf: "{{ tacker_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ tacker_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" tacker_server_container: "{{ check_tacker_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/tacker/tasks/bootstrap_service.yml b/ansible/roles/tacker/tasks/bootstrap_service.yml index 6826236755..bfbaf1e87c 100644 --- a/ansible/roles/tacker/tasks/bootstrap_service.yml +++ b/ansible/roles/tacker/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running tacker bootstrap container vars: tacker_server: "{{ tacker_services['tacker-server'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/tacker/tasks/config.yml b/ansible/roles/tacker/tasks/config.yml index 7e9dae85c0..b60b8ed51b 100644 --- a/ansible/roles/tacker/tasks/config.yml +++ b/ansible/roles/tacker/tasks/config.yml @@ -83,6 +83,7 @@ - Restart tacker-conductor container - name: Check tacker container + become: true kolla_docker: action: "compare_container" name: "{{ item.value.container_name }}" diff --git a/ansible/roles/tacker/tasks/pull.yml b/ansible/roles/tacker/tasks/pull.yml index a467bcc328..bffc3f909e 100644 --- a/ansible/roles/tacker/tasks/pull.yml +++ b/ansible/roles/tacker/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling tacker images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/telegraf/handlers/main.yml b/ansible/roles/telegraf/handlers/main.yml index 106c4b5321..55c38c296c 100644 --- a/ansible/roles/telegraf/handlers/main.yml +++ b/ansible/roles/telegraf/handlers/main.yml @@ -5,6 +5,7 @@ service: "{{ telegraf_services[service_name] }}" config_json: "{{ telegraf_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" telegraf_container: "{{ check_telegraf_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/telegraf/tasks/config.yml b/ansible/roles/telegraf/tasks/config.yml index 0cb8601141..9fbd5a1d99 100644 --- a/ansible/roles/telegraf/tasks/config.yml +++ b/ansible/roles/telegraf/tasks/config.yml @@ -63,6 +63,7 @@ - Restart telegraf container - name: Check telegraf containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/telegraf/tasks/pull.yml b/ansible/roles/telegraf/tasks/pull.yml index f4202b90e3..a9dfe56b79 100644 --- a/ansible/roles/telegraf/tasks/pull.yml +++ b/ansible/roles/telegraf/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling telegraf image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/tempest/handlers/main.yml b/ansible/roles/tempest/handlers/main.yml index 6ae4d7110b..42cb89df54 100644 --- a/ansible/roles/tempest/handlers/main.yml +++ b/ansible/roles/tempest/handlers/main.yml @@ -6,6 +6,7 @@ config_json: "{{ tempest_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" tempest_conf: "{{ tempest_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" tempest_container: "{{ check_tempest_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/tempest/tasks/config.yml b/ansible/roles/tempest/tasks/config.yml index a66808ca0a..b4c50347fd 100644 --- a/ansible/roles/tempest/tasks/config.yml +++ b/ansible/roles/tempest/tasks/config.yml @@ -45,6 +45,7 @@ - Restart tempest container - name: Check tempest containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/tempest/tasks/pull.yml b/ansible/roles/tempest/tasks/pull.yml index 003cae0b09..fb66d7dddc 100644 --- a/ansible/roles/tempest/tasks/pull.yml +++ b/ansible/roles/tempest/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling tempest image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/trove/handlers/main.yml b/ansible/roles/trove/handlers/main.yml index 02770293ae..4dd46d2199 100644 --- a/ansible/roles/trove/handlers/main.yml +++ b/ansible/roles/trove/handlers/main.yml @@ -6,6 +6,7 @@ config_json: "{{ trove_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" trove_conf: "{{ trove_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" trove_api_container: "{{ check_trove_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -27,6 +28,7 @@ config_json: "{{ trove_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" trove_conf: "{{ trove_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" trove_conductor_container: "{{ check_trove_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -48,6 +50,7 @@ config_json: "{{ trove_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" trove_conf: "{{ trove_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" trove_taskmanager_container: "{{ check_trove_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/trove/tasks/bootstrap_service.yml b/ansible/roles/trove/tasks/bootstrap_service.yml index 786bb73724..f643475132 100644 --- a/ansible/roles/trove/tasks/bootstrap_service.yml +++ b/ansible/roles/trove/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running trove bootstrap container vars: trove_api: "{{ trove_services['trove-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/trove/tasks/config.yml b/ansible/roles/trove/tasks/config.yml index ff771ea14b..925a09aa0a 100644 --- a/ansible/roles/trove/tasks/config.yml +++ b/ansible/roles/trove/tasks/config.yml @@ -72,6 +72,7 @@ - "Restart {{ item.key }} container" - name: Check trove containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/trove/tasks/pull.yml b/ansible/roles/trove/tasks/pull.yml index 84a449f474..d40e3709e0 100644 --- a/ansible/roles/trove/tasks/pull.yml +++ b/ansible/roles/trove/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling trove images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/vitrage/handlers/main.yml b/ansible/roles/vitrage/handlers/main.yml index c5d1393470..6e32a90f10 100644 --- a/ansible/roles/vitrage/handlers/main.yml +++ b/ansible/roles/vitrage/handlers/main.yml @@ -7,6 +7,7 @@ vitrage_conf: "{{ vitrage_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ vitrage_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" vitrage_api_container: "{{ check_vitrage_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -30,6 +31,7 @@ vitrage_conf: "{{ vitrage_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ vitrage_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" vitrage_collector_container: "{{ check_vitrage_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -53,6 +55,7 @@ vitrage_conf: "{{ vitrage_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ vitrage_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" vitrage_notifier_container: "{{ check_vitrage_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -76,6 +79,7 @@ vitrage_conf: "{{ vitrage_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ vitrage_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" vitrage_graph_container: "{{ check_vitrage_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -99,6 +103,7 @@ vitrage_conf: "{{ vitrage_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ vitrage_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" vitrage_ml_container: "{{ check_vitrage_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/vitrage/tasks/bootstrap_service.yml b/ansible/roles/vitrage/tasks/bootstrap_service.yml index ab64f2866f..debea107b2 100644 --- a/ansible/roles/vitrage/tasks/bootstrap_service.yml +++ b/ansible/roles/vitrage/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Vitrage bootstrap container vars: vitrage_api: "{{ vitrage_services['vitrage-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/vitrage/tasks/config.yml b/ansible/roles/vitrage/tasks/config.yml index 4d8c5faaec..7165d9ea4a 100644 --- a/ansible/roles/vitrage/tasks/config.yml +++ b/ansible/roles/vitrage/tasks/config.yml @@ -104,6 +104,7 @@ - Restart vitrage-ml container - name: Check vitrage containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/vitrage/tasks/pull.yml b/ansible/roles/vitrage/tasks/pull.yml index efe5b97f9c..11b3535b39 100644 --- a/ansible/roles/vitrage/tasks/pull.yml +++ b/ansible/roles/vitrage/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling vitrage images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/vmtp/handlers/main.yml b/ansible/roles/vmtp/handlers/main.yml index c8ea2fe53f..a12e16c96a 100644 --- a/ansible/roles/vmtp/handlers/main.yml +++ b/ansible/roles/vmtp/handlers/main.yml @@ -4,6 +4,7 @@ service_name: "vmtp" service: "{{ vmtp_services[service_name] }}" vmtp_container: "{{ check_vmtp_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/vmtp/tasks/config.yml b/ansible/roles/vmtp/tasks/config.yml index 18a9c8eba6..f2b64b3fe2 100644 --- a/ansible/roles/vmtp/tasks/config.yml +++ b/ansible/roles/vmtp/tasks/config.yml @@ -43,6 +43,7 @@ - Restart vmtp container - name: Check vmtp containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/vmtp/tasks/pull.yml b/ansible/roles/vmtp/tasks/pull.yml index dc06d6d812..39218b6aae 100644 --- a/ansible/roles/vmtp/tasks/pull.yml +++ b/ansible/roles/vmtp/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling vmtp image + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/watcher/handlers/main.yml b/ansible/roles/watcher/handlers/main.yml index d6512e1cae..3ae4379b5e 100644 --- a/ansible/roles/watcher/handlers/main.yml +++ b/ansible/roles/watcher/handlers/main.yml @@ -7,6 +7,7 @@ watcher_conf: "{{ watcher_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ watcher_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" watcher_applier_container: "{{ check_watcher_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -30,6 +31,7 @@ watcher_conf: "{{ watcher_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ watcher_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" watcher_engine_container: "{{ check_watcher_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -53,6 +55,7 @@ watcher_conf: "{{ watcher_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ watcher_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" watcher_api_container: "{{ check_watcher_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/watcher/tasks/bootstrap_service.yml b/ansible/roles/watcher/tasks/bootstrap_service.yml index 4cacd3dea0..7e419de3ba 100644 --- a/ansible/roles/watcher/tasks/bootstrap_service.yml +++ b/ansible/roles/watcher/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Watcher bootstrap container vars: watcher_api: "{{ watcher_services['watcher-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/watcher/tasks/config.yml b/ansible/roles/watcher/tasks/config.yml index 8d9ac24978..aa2e09fe3a 100644 --- a/ansible/roles/watcher/tasks/config.yml +++ b/ansible/roles/watcher/tasks/config.yml @@ -82,6 +82,7 @@ - Restart watcher-engine container - name: Check watcher containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/watcher/tasks/pull.yml b/ansible/roles/watcher/tasks/pull.yml index e221c30ed4..de7b7f4d83 100644 --- a/ansible/roles/watcher/tasks/pull.yml +++ b/ansible/roles/watcher/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling watcher images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/zookeeper/handlers/main.yml b/ansible/roles/zookeeper/handlers/main.yml index 1c73c7992b..51b0a01c1d 100644 --- a/ansible/roles/zookeeper/handlers/main.yml +++ b/ansible/roles/zookeeper/handlers/main.yml @@ -7,6 +7,7 @@ zookeeper_conf: "{{ zookeeper_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" zookeeper_instance_id: "{{ zookeeper_instance_id.results|selectattr('item.key', 'equalto', service_name)|first }}" zookeeper_container: "{{ check_zookeeper_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/zookeeper/tasks/config.yml b/ansible/roles/zookeeper/tasks/config.yml index c389721e94..fe2f0b9f32 100644 --- a/ansible/roles/zookeeper/tasks/config.yml +++ b/ansible/roles/zookeeper/tasks/config.yml @@ -59,6 +59,7 @@ - Restart zookeeper container - name: Check zookeeper containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/zookeeper/tasks/pull.yml b/ansible/roles/zookeeper/tasks/pull.yml index f5614aca34..7a02e4fe91 100644 --- a/ansible/roles/zookeeper/tasks/pull.yml +++ b/ansible/roles/zookeeper/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling zookeeper images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/zun/handlers/main.yml b/ansible/roles/zun/handlers/main.yml index 5031aa8d81..4daa3dbfbf 100644 --- a/ansible/roles/zun/handlers/main.yml +++ b/ansible/roles/zun/handlers/main.yml @@ -7,6 +7,7 @@ zun_conf: "{{ zun_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ zun_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" zun_api_container: "{{ check_zun_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" @@ -32,6 +33,7 @@ zun_conf: "{{ zun_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_overwriting: "{{ zun_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" zun_compute_container: "{{ check_zun_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" + become: true kolla_docker: action: "recreate_or_restart_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/zun/tasks/bootstrap_service.yml b/ansible/roles/zun/tasks/bootstrap_service.yml index fd5480c9d8..17abc43d87 100644 --- a/ansible/roles/zun/tasks/bootstrap_service.yml +++ b/ansible/roles/zun/tasks/bootstrap_service.yml @@ -2,6 +2,7 @@ - name: Running Zun bootstrap container vars: zun_api: "{{ zun_services['zun-api'] }}" + become: true kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/zun/tasks/config.yml b/ansible/roles/zun/tasks/config.yml index 1c905475ec..c9e7997559 100644 --- a/ansible/roles/zun/tasks/config.yml +++ b/ansible/roles/zun/tasks/config.yml @@ -95,6 +95,7 @@ - Restart zun-compute container - name: Check zun containers + become: true kolla_docker: action: "compare_container" common_options: "{{ docker_common_options }}" diff --git a/ansible/roles/zun/tasks/pull.yml b/ansible/roles/zun/tasks/pull.yml index 0af5700dc0..bc827a389d 100644 --- a/ansible/roles/zun/tasks/pull.yml +++ b/ansible/roles/zun/tasks/pull.yml @@ -1,5 +1,6 @@ --- - name: Pulling zun images + become: true kolla_docker: action: "pull_image" common_options: "{{ docker_common_options }}"