Merge "Change local_action to delegate_to: localhost"
This commit is contained in:
commit
25e98f9047
@ -13,8 +13,10 @@
|
||||
with_dict: "{{ aodh_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
run_once: True
|
||||
delegate_to: localhost
|
||||
register: aodh_policy
|
||||
with_first_found:
|
||||
- files: "{{ supported_policy_format_list }}"
|
||||
|
@ -29,8 +29,10 @@
|
||||
- "barbican-api/vassals"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
run_once: True
|
||||
delegate_to: localhost
|
||||
register: barbican_policy
|
||||
with_first_found:
|
||||
- files: "{{ supported_policy_format_list }}"
|
||||
@ -78,8 +80,10 @@
|
||||
- name: Checking whether barbican-api-paste.ini file exists
|
||||
vars:
|
||||
service: "{{ barbican_services['barbican-api'] }}"
|
||||
local_action: stat path="{{ node_custom_config }}/barbican/barbican-api-paste.ini"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/barbican/barbican-api-paste.ini"
|
||||
run_once: True
|
||||
delegate_to: localhost
|
||||
register: check_barbican_api_paste_ini
|
||||
when:
|
||||
- inventory_hostname in groups[service.group]
|
||||
|
@ -13,8 +13,10 @@
|
||||
with_dict: "{{ blazar_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
run_once: True
|
||||
delegate_to: localhost
|
||||
register: blazar_policy
|
||||
with_first_found:
|
||||
- files: "{{ supported_policy_format_list }}"
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ ceilometer_services }}"
|
||||
|
||||
- name: Check if the folder for custom meter definitions exist
|
||||
local_action: stat path="{{ node_custom_config }}/ceilometer/{{ ceilometer_custom_meters_local_folder }}"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/ceilometer/{{ ceilometer_custom_meters_local_folder }}"
|
||||
delegate_to: localhost
|
||||
register: ceilometer_custom_meters_folder
|
||||
|
||||
- name: Set variable that indicates if we have a folder for custom meter YAML files
|
||||
@ -21,7 +23,10 @@
|
||||
custom_meter_folder_exist: "{{ ceilometer_custom_meters_folder.stat.exists and ceilometer_custom_meters_folder.stat.isdir }}"
|
||||
|
||||
- name: Find all *.yaml files in custom meter definitions folder (if the folder exist)
|
||||
local_action: find paths="{{ node_custom_config }}/ceilometer/{{ ceilometer_custom_meters_local_folder }}" patterns="*.yaml"
|
||||
find:
|
||||
paths: "{{ node_custom_config }}/ceilometer/{{ ceilometer_custom_meters_local_folder }}"
|
||||
patterns: "*.yaml"
|
||||
delegate_to: localhost
|
||||
register: ceilometer_custom_meters_folder_found_files
|
||||
when: custom_meter_folder_exist
|
||||
|
||||
@ -59,7 +64,9 @@
|
||||
- "Restart {{ item.key }} container"
|
||||
|
||||
- name: Check if custom polling.yaml exists
|
||||
local_action: stat path="{{ node_custom_config }}/ceilometer/polling.yaml"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/ceilometer/polling.yaml"
|
||||
delegate_to: localhost
|
||||
register: ceilometer_polling_file
|
||||
|
||||
- name: Copying over polling.yaml
|
||||
@ -84,7 +91,9 @@
|
||||
- ceilometer_polling_file.stat.exists
|
||||
|
||||
- name: Check custom gnocchi_resources.yaml exists
|
||||
local_action: stat path="{{ node_custom_config }}/ceilometer/gnocchi_resources.yaml"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/ceilometer/gnocchi_resources.yaml"
|
||||
delegate_to: localhost
|
||||
register: ceilometer_gnocchi_resources_file
|
||||
|
||||
- name: Copying over gnocchi_resources.yaml
|
||||
@ -109,7 +118,9 @@
|
||||
- ceilometer_gnocchi_resources_file.stat.exists
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: ceilometer_policy
|
||||
with_first_found:
|
||||
@ -159,7 +170,9 @@
|
||||
- "Restart {{ item.key }} container"
|
||||
|
||||
- name: Check custom event_definitions.yaml exists
|
||||
local_action: stat path="{{ node_custom_config }}/ceilometer/event_definitions.yaml"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/ceilometer/event_definitions.yaml"
|
||||
delegate_to: localhost
|
||||
register: ceilometer_event_definitions_file
|
||||
|
||||
- name: Copying over event_definitions.yaml
|
||||
@ -196,7 +209,9 @@
|
||||
- Restart ceilometer-notification container
|
||||
|
||||
- name: Check custom event_pipeline.yaml exists
|
||||
local_action: stat path="{{ node_custom_config }}/ceilometer/event_pipeline.yaml"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/ceilometer/event_pipeline.yaml"
|
||||
delegate_to: localhost
|
||||
register: ceilometer_event_pipeline_file
|
||||
|
||||
- name: Copying over event_pipeline.yaml
|
||||
@ -232,7 +247,9 @@
|
||||
- Restart ceilometer-notification container
|
||||
|
||||
- name: Check custom pipeline.yaml exists
|
||||
local_action: stat path="{{ node_custom_config }}/ceilometer/pipeline.yaml"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/ceilometer/pipeline.yaml"
|
||||
delegate_to: localhost
|
||||
register: ceilometer_pipeline_file
|
||||
|
||||
- name: Copying over pipeline.yaml
|
||||
|
@ -1,7 +1,8 @@
|
||||
---
|
||||
- name: Checking gnocchi backend for ceilometer
|
||||
fail:
|
||||
msg: "gnocchi is required but not enabled"
|
||||
run_once: True
|
||||
local_action: fail msg="gnocchi is required but not enabled"
|
||||
changed_when: false
|
||||
when:
|
||||
- enable_ceilometer | bool
|
||||
|
@ -1,12 +1,19 @@
|
||||
---
|
||||
- name: Cleaning up temp file on localhost
|
||||
local_action: file path=/tmp/kolla_ceph_cluster state=absent
|
||||
file:
|
||||
path: /tmp/kolla_ceph_cluster
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
run_once: True
|
||||
|
||||
- name: Creating temp file on localhost
|
||||
local_action: copy content=None dest=/tmp/kolla_ceph_cluster mode=0644
|
||||
copy:
|
||||
content: None
|
||||
dest: /tmp/kolla_ceph_cluster
|
||||
mode: 0644
|
||||
delegate_to: localhost
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
run_once: True
|
||||
@ -20,7 +27,11 @@
|
||||
register: ceph_mon_config_volume
|
||||
|
||||
- name: Writing hostname of host with existing cluster files to temp file
|
||||
local_action: copy content="{{ inventory_hostname }}" dest=/tmp/kolla_ceph_cluster mode=0644
|
||||
copy:
|
||||
content: "{{ inventory_hostname }}"
|
||||
dest: /tmp/kolla_ceph_cluster
|
||||
mode: 0644
|
||||
delegate_to: localhost
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
when: not ceph_mon_config_volume.changed
|
||||
@ -30,7 +41,10 @@
|
||||
delegate_host: "{{ lookup('file', '/tmp/kolla_ceph_cluster') }}"
|
||||
|
||||
- name: Cleaning up temp file on localhost
|
||||
local_action: file path=/tmp/kolla_ceph_cluster state=absent
|
||||
file:
|
||||
path: /tmp/kolla_ceph_cluster
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
run_once: True
|
||||
|
@ -18,6 +18,7 @@
|
||||
- inventory_hostname in groups['ceph-rgw']
|
||||
|
||||
- name: Check whether the Swift service is enabled
|
||||
local_action: fail msg='Ceph-rgw conflicts with Swift, and so you should only enable one of them'
|
||||
fail:
|
||||
msg: 'Ceph-rgw conflicts with Swift, and so you should only enable one of them'
|
||||
when: enable_swift | bool and enable_ceph_rgw | bool
|
||||
run_once: True
|
||||
|
@ -28,7 +28,9 @@
|
||||
inventory_hostname in groups['cinder-backup']
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: cinder_policy
|
||||
with_first_found:
|
||||
|
@ -19,7 +19,8 @@
|
||||
|
||||
- name: Checking at least one valid backend is enabled for Cinder
|
||||
run_once: True
|
||||
local_action: fail msg="Please enable at least one backend when enabling Cinder"
|
||||
fail:
|
||||
msg: "Please enable at least one backend when enabling Cinder"
|
||||
when:
|
||||
- not skip_cinder_backend_check | bool
|
||||
- not enable_cinder_backend_hnas_nfs | bool
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ cloudkitty_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: cloudkitty_policy
|
||||
with_first_found:
|
||||
@ -30,7 +32,9 @@
|
||||
- cloudkitty_policy.results
|
||||
|
||||
- name: Check if custom {{ cloudkitty_custom_metrics_yaml_file }} exists
|
||||
local_action: stat path="{{ node_custom_config }}/cloudkitty/{{ cloudkitty_custom_metrics_yaml_file }}"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/cloudkitty/{{ cloudkitty_custom_metrics_yaml_file }}"
|
||||
delegate_to: localhost
|
||||
register: cloudkitty_custom_metrics_file
|
||||
|
||||
- name: Copying {{ cloudkitty_custom_metrics_yaml_file }} if it exists
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ congress_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: congress_policy
|
||||
with_first_found:
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ cyborg_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: cyborg_policy
|
||||
with_first_found:
|
||||
@ -79,7 +81,9 @@
|
||||
- name: Checking whether cyborg-api-paste.ini file exists
|
||||
vars:
|
||||
service: "{{ cyborg_services['cyborg-api'] }}"
|
||||
local_action: stat path="{{ node_custom_config }}/cyborg/cyborg-api-paste.ini"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/cyborg/cyborg-api-paste.ini"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: check_cyborg_api_paste_ini
|
||||
when:
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ designate_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: designate_policy
|
||||
with_first_found:
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ freezer_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: freezer_policy
|
||||
with_first_found:
|
||||
|
@ -23,7 +23,9 @@
|
||||
- glance_backend_ceph | bool
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: glance_policy
|
||||
with_first_found:
|
||||
|
@ -23,7 +23,9 @@
|
||||
- gnocchi_backend_storage == 'ceph'
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: gnocchi_policy
|
||||
with_first_found:
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ grafana_services }}"
|
||||
|
||||
- name: Check if extra configuration file exists
|
||||
local_action: find path="{{ node_custom_config }}/grafana/"
|
||||
find:
|
||||
path: "{{ node_custom_config }}/grafana/"
|
||||
delegate_to: localhost
|
||||
changed_when: False
|
||||
run_once: True
|
||||
register: check_extra_conf_grafana
|
||||
@ -63,7 +65,9 @@
|
||||
- Restart grafana container
|
||||
|
||||
- name: Check if custom grafana home dashboard exists
|
||||
local_action: "stat path={{ node_custom_config }}/grafana/grafana_home_dashboard.json"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/grafana/grafana_home_dashboard.json"
|
||||
delegate_to: localhost
|
||||
register: grafana_custom_dashboard_file
|
||||
run_once: True
|
||||
|
||||
|
@ -8,7 +8,10 @@
|
||||
register: container_facts
|
||||
|
||||
- name: Clearing temp kolla_keepalived_running file
|
||||
local_action: file path=/tmp/kolla_keepalived_running state=absent
|
||||
file:
|
||||
path: /tmp/kolla_keepalived_running
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
run_once: true
|
||||
@ -16,15 +19,23 @@
|
||||
- enable_keepalived | bool
|
||||
|
||||
- name: Create empty temp kolla_keepalived_running file
|
||||
local_action: copy content=None dest=/tmp/kolla_keepalived_running mode=0644
|
||||
copy:
|
||||
content: None
|
||||
dest: /tmp/kolla_keepalived_running
|
||||
mode: 0644
|
||||
changed_when: False
|
||||
delegate_to: localhost
|
||||
check_mode: no
|
||||
run_once: true
|
||||
when:
|
||||
- enable_keepalived | bool
|
||||
|
||||
- name: Getting hosts who is running keepalived
|
||||
local_action: copy content={{ ansible_hostname }} dest=/tmp/kolla_keepalived_running mode=0644
|
||||
copy:
|
||||
content: "{{ ansible_hostname }}"
|
||||
dest: /tmp/kolla_keepalived_running
|
||||
mode: 0644
|
||||
delegate_to: localhost
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
when:
|
||||
@ -39,7 +50,10 @@
|
||||
- enable_keepalived | bool
|
||||
|
||||
- name: Clearing temp kolla_keepalived_running file
|
||||
local_action: file path=/tmp/kolla_keepalived_running state=absent
|
||||
file:
|
||||
path: /tmp/kolla_keepalived_running
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
run_once: true
|
||||
@ -47,19 +61,30 @@
|
||||
- enable_keepalived | bool
|
||||
|
||||
- name: Clearing temp kolla_haproxy_running file
|
||||
local_action: file path=/tmp/kolla_haproxy_running state=absent
|
||||
file:
|
||||
path: /tmp/kolla_haproxy_running
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
run_once: true
|
||||
|
||||
- name: Create empty temp kolla_haproxy_running file
|
||||
local_action: copy content=None dest=/tmp/kolla_haproxy_running mode=0644
|
||||
copy:
|
||||
content: None
|
||||
dest: /tmp/kolla_haproxy_running
|
||||
mode: 0644
|
||||
delegate_to: localhost
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
run_once: true
|
||||
|
||||
- name: Getting hosts who is running haproxy
|
||||
local_action: copy content={{ ansible_hostname }} dest=/tmp/kolla_haproxy_running mode=0644
|
||||
copy:
|
||||
content: "{{ ansible_hostname }}"
|
||||
dest: /tmp/kolla_haproxy_running
|
||||
mode: 0644
|
||||
delegate_to: localhost
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
when:
|
||||
@ -72,35 +97,44 @@
|
||||
host_running_haproxy: "{{ lookup('file', '/tmp/kolla_haproxy_running') }}"
|
||||
|
||||
- name: Clearing temp kolla_haproxy_running file
|
||||
local_action: file path=/tmp/kolla_haproxy_running state=absent
|
||||
file:
|
||||
path: /tmp/kolla_haproxy_running
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
run_once: true
|
||||
|
||||
- name: Checking if external haproxy certificate exists
|
||||
run_once: true
|
||||
local_action: stat path={{ kolla_external_fqdn_cert }}
|
||||
stat:
|
||||
path: "{{ kolla_external_fqdn_cert }}"
|
||||
delegate_to: localhost
|
||||
register: haproxy_cert_file
|
||||
changed_when: false
|
||||
when: kolla_enable_tls_external | bool
|
||||
|
||||
- name: Fail if external haproxy certificate is absent
|
||||
run_once: true
|
||||
local_action: fail msg="External haproxy certificate file is not found. It is configured via 'kolla_external_fqdn_cert'"
|
||||
fail:
|
||||
msg: "External haproxy certificate file is not found. It is configured via 'kolla_external_fqdn_cert'"
|
||||
when:
|
||||
- kolla_enable_tls_external | bool
|
||||
- haproxy_cert_file.stat.exists == false
|
||||
|
||||
- name: Checking if internal haproxy certificate exists
|
||||
run_once: true
|
||||
local_action: stat path={{ kolla_internal_fqdn_cert }}
|
||||
stat:
|
||||
path: "{{ kolla_internal_fqdn_cert }}"
|
||||
delegate_to: localhost
|
||||
register: haproxy_internal_cert_file
|
||||
changed_when: false
|
||||
when: kolla_enable_tls_internal | bool
|
||||
|
||||
- name: Fail if internal haproxy certificate is absent
|
||||
run_once: true
|
||||
local_action: fail msg="Internal haproxy certificate file is not found. It is configured via 'kolla_internal_fqdn_cert'"
|
||||
fail:
|
||||
msg: "Internal haproxy certificate file is not found. It is configured via 'kolla_internal_fqdn_cert'"
|
||||
when:
|
||||
- kolla_enable_tls_internal | bool
|
||||
- haproxy_internal_cert_file.stat.exists == false
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ heat_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: heat_policy
|
||||
with_first_found:
|
||||
|
@ -5,7 +5,9 @@
|
||||
supported_policy_files: "{{ supported_policy_format_list | map('regex_replace', '(.+)', '{{ project_name }}_\\1') | list }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ fullpath }}"
|
||||
stat:
|
||||
path: "{{ fullpath }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: overwritten_files
|
||||
with_first_found:
|
||||
|
@ -20,7 +20,9 @@
|
||||
with_dict: "{{ ironic_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: ironic_policy
|
||||
with_first_found:
|
||||
|
@ -43,7 +43,9 @@
|
||||
- inventory_hostname in groups['ironic-ipxe']
|
||||
|
||||
- name: Checking ironic-agent files exist for Ironic Inspector
|
||||
local_action: stat path="{{ node_custom_config }}/ironic/{{ item }}"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/ironic/{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: result
|
||||
failed_when: not result.stat.exists
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ keystone_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: keystone_policy
|
||||
with_first_found:
|
||||
@ -30,7 +32,9 @@
|
||||
- keystone_policy.results
|
||||
|
||||
- name: Check if Keystone domain-specific config is supplied
|
||||
local_action: stat path="{{ node_custom_config }}/keystone/domains"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/keystone/domains"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: keystone_domain_directory
|
||||
|
||||
@ -82,7 +86,11 @@
|
||||
- keystone_domain_directory.stat.exists
|
||||
|
||||
- name: Get file list in custom domains folder
|
||||
local_action: find path="{{ node_custom_config }}/keystone/domains" recurse=no file_type=file
|
||||
find:
|
||||
path: "{{ node_custom_config }}/keystone/domains"
|
||||
recurse: no
|
||||
file_type: file
|
||||
delegate_to: localhost
|
||||
register: keystone_domains
|
||||
when: keystone_domain_directory.stat.exists
|
||||
|
||||
@ -139,7 +147,9 @@
|
||||
- name: Checking whether keystone-paste.ini file exists
|
||||
vars:
|
||||
keystone: "{{ keystone_services.keystone }}"
|
||||
local_action: stat path="{{ node_custom_config }}/keystone/keystone-paste.ini"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/keystone/keystone-paste.ini"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: check_keystone_paste_ini
|
||||
when:
|
||||
|
@ -45,7 +45,9 @@
|
||||
|
||||
- name: Checking fernet_token_expiry in globals.yml. Update fernet_token_expiry to allowed value if this task fails
|
||||
run_once: true
|
||||
local_action: command awk '/^fernet_token_expiry/ { print $2 }' "{{ node_config }}/globals.yml"
|
||||
command:
|
||||
cmd: awk '/^fernet_token_expiry/ { print $2 }' "{{ node_config }}/globals.yml"
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
changed_when: false
|
||||
failed_when: result.stdout | regex_replace('(60|120|180|240|300|360|600|720|900|1200|1800|3600|7200|10800|14400|21600|28800|43200|86400|604800)', '') is search(".+")
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ kuryr_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: kuryr_policy
|
||||
with_first_found:
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ magnum_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: magnum_policy
|
||||
with_first_found:
|
||||
|
@ -27,7 +27,9 @@
|
||||
- inventory_hostname in groups['manila-share']
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: manila_policy
|
||||
with_first_found:
|
||||
|
@ -1,12 +1,20 @@
|
||||
---
|
||||
- name: Cleaning up temp file on localhost
|
||||
local_action: file path=/tmp/kolla_mariadb_cluster state=absent
|
||||
file:
|
||||
path: /tmp/kolla_mariadb_cluster
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
run_once: True
|
||||
|
||||
# NOTE(mnasiadka): Due to the way that we are setting fact has_cluster - content needs to be ''
|
||||
- name: Creating temp file on localhost
|
||||
local_action: copy content='' dest=/tmp/kolla_mariadb_cluster mode=0644
|
||||
copy:
|
||||
content: ''
|
||||
dest: /tmp/kolla_mariadb_cluster
|
||||
mode: 0644
|
||||
delegate_to: localhost
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
run_once: True
|
||||
@ -20,7 +28,11 @@
|
||||
register: mariadb_volume
|
||||
|
||||
- name: Writing hostname of host with existing cluster files to temp file
|
||||
local_action: copy content={{ ansible_hostname }} dest=/tmp/kolla_mariadb_cluster mode=0644
|
||||
copy:
|
||||
content: "{{ ansible_hostname }}"
|
||||
dest: /tmp/kolla_mariadb_cluster
|
||||
mode: 0644
|
||||
delegate_to: localhost
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
when: mariadb_volume is not changed
|
||||
@ -30,7 +42,10 @@
|
||||
has_cluster: "{{ lookup('file', '/tmp/kolla_mariadb_cluster') | length > 0 }}"
|
||||
|
||||
- name: Cleaning up temp file on localhost
|
||||
local_action: file path=/tmp/kolla_mariadb_cluster state=absent
|
||||
file:
|
||||
path: /tmp/kolla_mariadb_cluster
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
run_once: True
|
||||
|
@ -11,10 +11,10 @@
|
||||
check_mode: no
|
||||
|
||||
- name: Cleaning up temp file on localhost
|
||||
local_action:
|
||||
module: file
|
||||
file:
|
||||
path: /tmp/kolla_mariadb_recover_inventory_name
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
changed_when: false
|
||||
check_mode: no
|
||||
run_once: true
|
||||
@ -81,7 +81,11 @@
|
||||
changed_when: false
|
||||
|
||||
- name: Writing hostname of host with the largest seqno to temp file
|
||||
local_action: copy content={{ inventory_hostname }} dest=/tmp/kolla_mariadb_recover_inventory_name mode=0644
|
||||
copy:
|
||||
content: "{{ inventory_hostname }}"
|
||||
dest: /tmp/kolla_mariadb_recover_inventory_name
|
||||
mode: 0644
|
||||
delegate_to: localhost
|
||||
changed_when: false
|
||||
when: seqno_compare.results | map(attribute='stdout') | join('') == ""
|
||||
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ masakari_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: masakari_policy
|
||||
with_first_found:
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ mistral_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: mistral_policy
|
||||
with_first_found:
|
||||
|
@ -59,13 +59,13 @@
|
||||
- service.enabled | bool
|
||||
|
||||
- name: Find monasca-agent-collector plugin configuration files
|
||||
local_action:
|
||||
module: find
|
||||
find:
|
||||
paths:
|
||||
- "{{ role_path }}/templates/monasca-agent-collector/plugins/"
|
||||
- "{{ node_custom_config }}/monasca/agent_plugins/"
|
||||
- "{{ node_custom_config }}/monasca/{{ inventory_hostname }}/agent_plugins/"
|
||||
patterns: '*.yaml'
|
||||
delegate_to: localhost
|
||||
register: agent_plugins
|
||||
|
||||
- name: Copying over monasca-agent-collector plugins
|
||||
@ -221,10 +221,10 @@
|
||||
- service.enabled | bool
|
||||
|
||||
- name: Find custom logstash patterns
|
||||
local_action:
|
||||
module: find
|
||||
find:
|
||||
path: "{{ node_custom_config }}/monasca/logstash_patterns"
|
||||
pattern: "*"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: monasca_custom_logstash_patterns
|
||||
|
||||
@ -356,7 +356,9 @@
|
||||
- Restart monasca-notification container
|
||||
|
||||
- name: Check for monasca-notification templates
|
||||
local_action: stat path="{{ node_custom_config }}/monasca/notification_templates"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/monasca/notification_templates"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: notification_templates
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
---
|
||||
- name: Copying the mongodb replication set bootstrap script
|
||||
local_action: template src=bootstrap_cluster.js.j2 dest=/tmp/mongodb_bootstrap_replication_set.js
|
||||
template:
|
||||
src: bootstrap_cluster.js.j2
|
||||
dest: /tmp/mongodb_bootstrap_replication_set.js
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
|
||||
- name: Bootstrapping the mongodb replication set
|
||||
@ -12,7 +15,10 @@
|
||||
run_once: True
|
||||
|
||||
- name: Deleting the mongodb replication set bootstrap script
|
||||
local_action: file path=/tmp/mongodb_bootstrap_replication_set.js state=absent
|
||||
file:
|
||||
path: /tmp/mongodb_bootstrap_replication_set.js
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
run_once: True
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ murano_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: murano_policy
|
||||
with_first_found:
|
||||
|
@ -26,7 +26,9 @@
|
||||
with_dict: "{{ neutron_services }}"
|
||||
|
||||
- name: Check if extra ml2 plugins exists
|
||||
local_action: find path="{{ node_custom_config }}/neutron/plugins/"
|
||||
find:
|
||||
path: "{{ node_custom_config }}/neutron/plugins/"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
changed_when: False
|
||||
register: check_extra_ml2_plugins
|
||||
@ -313,7 +315,9 @@
|
||||
- "Restart {{ service_name }} container"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ node_custom_config }}/neutron/policy.json"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/neutron/policy.json"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: neutron_policy
|
||||
|
||||
|
@ -18,7 +18,8 @@
|
||||
- inventory_hostname in groups['neutron-server']
|
||||
|
||||
- name: Checking number of network agents
|
||||
local_action: fail msg="Number of network agents are less than two when enabling agent ha"
|
||||
fail:
|
||||
msg: "Number of network agents are less than two when enabling agent ha"
|
||||
changed_when: false
|
||||
run_once: True
|
||||
when:
|
||||
@ -30,14 +31,16 @@
|
||||
vars:
|
||||
type_drivers: "{{ neutron_type_drivers.replace(' ', '').split(',') | reject('equalto', '') | list }}"
|
||||
tenant_network_types: "{{ neutron_tenant_network_types.replace(' ', '').split(',') | reject('equalto', '') | list }}"
|
||||
local_action: fail msg="Tenant network type '{{ item }}' is not in type drivers [{{ neutron_type_drivers }}]"
|
||||
fail:
|
||||
msg: "Tenant network type '{{ item }}' is not in type drivers [{{ neutron_type_drivers }}]"
|
||||
changed_when: false
|
||||
when: item not in type_drivers
|
||||
run_once: true
|
||||
with_items: "{{ tenant_network_types }}"
|
||||
|
||||
- name: Checking whether Ironic enabled
|
||||
local_action: fail msg="Ironic must be enabled when using networking-baremetal/ironic-neutron-agent"
|
||||
fail:
|
||||
msg: "Ironic must be enabled when using networking-baremetal/ironic-neutron-agent"
|
||||
changed_when: false
|
||||
run_once: True
|
||||
when:
|
||||
|
@ -36,7 +36,9 @@
|
||||
- inventory_hostname in groups[nova_cell_compute_group]
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: nova_policy
|
||||
with_first_found:
|
||||
|
@ -10,7 +10,9 @@
|
||||
when: inventory_hostname in groups[nova_cell_compute_group]
|
||||
|
||||
- name: Check nova keyring file
|
||||
local_action: stat path="{{ node_custom_config }}/nova/ceph.client.nova.keyring"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/nova/ceph.client.nova.keyring"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: nova_cephx_keyring_file
|
||||
failed_when: not nova_cephx_keyring_file.stat.exists
|
||||
@ -19,7 +21,9 @@
|
||||
- external_ceph_cephx_enabled | bool
|
||||
|
||||
- name: Check cinder keyring file
|
||||
local_action: stat path="{{ node_custom_config }}/nova/ceph.client.cinder.keyring"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/nova/ceph.client.cinder.keyring"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: cinder_cephx_keyring_file
|
||||
failed_when: not cinder_cephx_keyring_file.stat.exists
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ nova_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: nova_policy
|
||||
with_first_found:
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ octavia_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: octavia_policy
|
||||
with_first_found:
|
||||
|
@ -30,7 +30,9 @@
|
||||
- inventory_hostname in groups['octavia-health-manager']
|
||||
|
||||
- name: Checking certificate files exist for octavia
|
||||
local_action: stat path="{{ node_custom_config }}/octavia/{{ item }}"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/octavia/{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: result
|
||||
failed_when: not result.stat.exists
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ panko_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: panko_policy
|
||||
with_first_found:
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ placement_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: placement_policy
|
||||
with_first_found:
|
||||
|
@ -7,6 +7,7 @@
|
||||
failed_when: result is failed or result.stdout is version(docker_py_version_min, '<')
|
||||
|
||||
- name: Checking Ansible version
|
||||
local_action: fail msg="Current Ansible version {{ ansible_version.full }} is less than {{ ansible_version_min }}"
|
||||
fail:
|
||||
msg: "Current Ansible version {{ ansible_version.full }} is less than {{ ansible_version_min }}"
|
||||
run_once: true
|
||||
when: ansible_version.full is version(ansible_version_min, '<')
|
||||
|
@ -12,7 +12,9 @@
|
||||
# will pass, but only because nothing in the vault file has the format of a
|
||||
# YAML dict item.
|
||||
- name: Checking empty passwords in passwords.yml. Run kolla-genpwd if this task fails
|
||||
local_action: command grep '^[^#].*:\s*$' "{{ node_config }}/passwords.yml"
|
||||
command:
|
||||
cmd: grep '^[^#].*:\s*$' "{{ node_config }}/passwords.yml"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: result
|
||||
changed_when: false
|
||||
@ -35,7 +37,8 @@
|
||||
|
||||
- name: Validate that internal and external vip address are different when TLS is enabled only on either the internal and external network
|
||||
run_once: True
|
||||
local_action: fail msg='kolla_external_vip_address and kolla_internal_vip_address must not be the same when only one network has TLS enabled'
|
||||
fail:
|
||||
msg: 'kolla_external_vip_address and kolla_internal_vip_address must not be the same when only one network has TLS enabled'
|
||||
changed_when: false
|
||||
when:
|
||||
- kolla_enable_tls_external | bool or kolla_enable_tls_internal | bool
|
||||
|
@ -27,11 +27,11 @@
|
||||
|
||||
- name: Find custom prometheus alert rules files
|
||||
become: true
|
||||
local_action:
|
||||
module: find
|
||||
find:
|
||||
path: "{{ node_custom_config }}/prometheus/"
|
||||
pattern: "*.rules"
|
||||
run_once: True
|
||||
delegate_to: localhost
|
||||
register: prometheus_alert_rules
|
||||
when:
|
||||
- enable_prometheus_alertmanager | bool
|
||||
|
@ -18,7 +18,9 @@
|
||||
- inventory_hostname in groups['qinling-engine']
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: qinling_policy
|
||||
with_first_found:
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ rally_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: rally_policy
|
||||
with_first_found:
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ sahara_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: sahara_policy
|
||||
with_first_found:
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ searchlight_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: searchlight_policy
|
||||
with_first_found:
|
||||
|
@ -13,7 +13,9 @@
|
||||
with_dict: "{{ senlin_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: senlin_policy
|
||||
with_first_found:
|
||||
|
@ -193,7 +193,9 @@
|
||||
- "{{ swift_extra_ring_files }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ node_custom_config }}/swift/policy.json"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/swift/policy.json"
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
register: swift_policy
|
||||
|
||||
|
@ -99,7 +99,9 @@
|
||||
|
||||
- name: Checking Swift ring files
|
||||
run_once: True
|
||||
local_action: stat path="{{ node_custom_config }}/swift/{{ item }}"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/swift/{{ item }}"
|
||||
delegate_to: localhost
|
||||
register: swift_ring_files
|
||||
with_items:
|
||||
- "account.builder"
|
||||
@ -112,7 +114,8 @@
|
||||
|
||||
- name: Fail if ring files don't exist
|
||||
run_once: True
|
||||
local_action: fail msg="Swift ring files do not exist. Ensure .builder and .gz are available for each of account/container/object under {{ node_custom_config }}/swift before deploying Swift."
|
||||
fail:
|
||||
msg: "Swift ring files do not exist. Ensure .builder and .gz are available for each of account/container/object under {{ node_custom_config }}/swift before deploying Swift."
|
||||
with_items: '{{ swift_ring_files.results }}'
|
||||
when:
|
||||
- item.stat.exists == false
|
||||
|
@ -13,8 +13,10 @@
|
||||
with_dict: "{{ tacker_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
run_once: True
|
||||
delegate_to: localhost
|
||||
register: tacker_policy
|
||||
with_first_found:
|
||||
- files: "{{ supported_policy_format_list }}"
|
||||
|
@ -13,8 +13,10 @@
|
||||
with_dict: "{{ trove_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
run_once: True
|
||||
delegate_to: localhost
|
||||
register: trove_policy
|
||||
with_first_found:
|
||||
- files: "{{ supported_policy_format_list }}"
|
||||
|
@ -13,8 +13,10 @@
|
||||
with_dict: "{{ vitrage_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
run_once: True
|
||||
delegate_to: localhost
|
||||
register: vitrage_policy
|
||||
with_first_found:
|
||||
- files: "{{ supported_policy_format_list }}"
|
||||
|
@ -17,7 +17,9 @@
|
||||
- inventory_hostname in groups['vitrage-api']
|
||||
|
||||
- name: Checking custom prometheus_conf.yaml exists
|
||||
local_action: stat path="{{ node_custom_config }}/vitrage/prometheus_conf.yaml"
|
||||
stat:
|
||||
path: "{{ node_custom_config }}/vitrage/prometheus_conf.yaml"
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
run_once: true
|
||||
failed_when: not result.stat.exists
|
||||
|
@ -13,8 +13,10 @@
|
||||
with_dict: "{{ watcher_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
run_once: True
|
||||
delegate_to: localhost
|
||||
register: watcher_policy
|
||||
with_first_found:
|
||||
- files: "{{ supported_policy_format_list }}"
|
||||
|
@ -13,8 +13,10 @@
|
||||
with_dict: "{{ zun_services }}"
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
run_once: True
|
||||
delegate_to: localhost
|
||||
register: zun_policy
|
||||
with_first_found:
|
||||
- files: "{{ supported_policy_format_list }}"
|
||||
|
@ -30,8 +30,9 @@
|
||||
- inventory_hostname in groups['zun-wsproxy']
|
||||
|
||||
- name: Ensure kuryr enabled for zun
|
||||
fail:
|
||||
msg: "kuryr is required but not enabled"
|
||||
run_once: True
|
||||
local_action: fail msg="kuryr is required but not enabled"
|
||||
changed_when: false
|
||||
when:
|
||||
- enable_zun | bool
|
||||
|
@ -172,13 +172,19 @@ def check_docker_become():
|
||||
"task %s in %s",
|
||||
module, task['name'], fullpath)
|
||||
for module in cmd_modules:
|
||||
if (module in task and
|
||||
task[module].startswith('docker') and
|
||||
not task.get('become')):
|
||||
return_code = 1
|
||||
LOG.error("Use of docker in %s module without "
|
||||
"become in task %s in %s",
|
||||
module, task['name'], fullpath)
|
||||
docker_without_become = False
|
||||
if (module in task and not task.get('become')):
|
||||
if (isinstance(task[module], str) and
|
||||
(task[module]).startswith('docker')):
|
||||
docker_without_become = True
|
||||
if (isinstance(task[module], dict) and
|
||||
task[module]['cmd'].startswith('docker')):
|
||||
docker_without_become = True
|
||||
if docker_without_become:
|
||||
return_code = 1
|
||||
LOG.error("Use of docker in %s module without "
|
||||
"become in task %s in %s",
|
||||
module, task['name'], fullpath)
|
||||
|
||||
return return_code
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user