@ -1,4 +1,5 @@
- name : Create and ensure setype for /var/log/containers directory
become : true
file:
path : /var/log/containers
state : directory
@ -9,6 +10,7 @@
- host_config
- name : Create ContainerLogStdoutPath directory
become : true
file:
path : "{{ container_log_stdout_path }}"
state : directory
@ -17,6 +19,7 @@
- host_config
- name : Create /var/lib/tripleo-config directory
become : true
file:
path : /var/lib/tripleo-config
state : directory
@ -31,6 +34,7 @@
- container_startup_configs
- name : Delete existing /var/lib/tripleo-config/check-mode directory for check mode
become : true
file:
path : /var/lib/tripleo-config/check-mode
state : absent
@ -45,6 +49,7 @@
check_mode : no
- name : Create /var/lib/tripleo-config/check-mode directory for check mode
become : true
file:
path : /var/lib/tripleo-config/check-mode
state : directory
@ -63,6 +68,7 @@
# Puppet manifest for baremetal host configuration
- name : Write the puppet step_config manifest
become : true
no_log : True
copy:
content : "{{ lookup('file', tripleo_role_name + '/step_config.pp', errors='ignore') | default('', True) }}"
@ -99,6 +105,7 @@
# Puppet Containers Config directory used to generate container configs
- name : Create /var/lib/container-puppet
become : true
file:
path : /var/lib/container-puppet
state : directory
@ -109,6 +116,7 @@
- container_config_tasks
- name : Delete existing /var/lib/container-puppet/check-mode for check mode
become : true
file:
path : /var/lib/container-puppet/check-mode
state : absent
@ -119,6 +127,7 @@
- ansible_check_mode|bool
- name : Create /var/lib/container-puppet/check-mode for check mode
become : true
file:
path : /var/lib/container-puppet/check-mode
state : directory
@ -131,6 +140,7 @@
- ansible_check_mode|bool
- name : Write container-puppet.json file
become : true
no_log : True
copy:
content : "{{ lookup('file', tripleo_role_name + '/puppet_config.yaml', errors='ignore') | default([], True) | from_yaml | to_nice_json }}"
@ -166,6 +176,7 @@
- container_config
- name : Create /var/lib/container-config-scripts
become : true
file:
path : /var/lib/container-config-scripts
state : directory
@ -177,6 +188,7 @@
# /var/lib/container-startup-configs.json is removed as we now write
# per-step files instead
- name : Clean old /var/lib/container-startup-configs.json file
become : true
file:
path : /var/lib/container-startup-configs.json
state : absent
@ -185,6 +197,7 @@
# For legacy, can be removed in Train cycle
- name : Clean old /var/lib/docker-container-startup-configs.json file
become : true
file:
path : /var/lib/docker-container-startup-configs.json
state : absent
@ -193,6 +206,7 @@
- name : Write container config scripts
become : true
no_log : True
copy:
content : "{{ item[1].content }}"
@ -232,6 +246,7 @@
# /var/lib/tripleo-config/container-startup-config/step_X/<container_name>.json
# Can be removed in V cycle
- name : Write /var/lib/tripleo-config/container-startup-config-readme.txt
become : true
no_log : True
copy:
content : "Container startup configs moved to /var/lib/tripleo-config/container-startup-config"
@ -255,6 +270,7 @@
- container_startup_configs
- name : Create /var/lib/kolla/config_files directory
become : true
file:
path : /var/lib/kolla/config_files
state : directory
@ -265,6 +281,7 @@
- container_startup_configs
- name : Create /var/lib/config-data directory
become : true
file:
path : /var/lib/config-data
state : directory
@ -272,6 +289,7 @@
selevel : s0
- name : Write kolla config json files
become : true
no_log : True
copy:
content : "{{ item[1] | to_nice_json }}"
@ -319,6 +337,7 @@
- container_config
- name : Create /etc/puppet/check-mode/hieradata directory for check mode
become : true
file:
path : /etc/puppet/check-mode/hieradata
state : directory
@ -334,6 +353,7 @@
- container_config
- name : Create puppet check-mode files if they don't exist for check mode
become : true
shell : |
cp -a /etc/puppet/hiera.yaml /etc/puppet/check-mode/hiera.yaml
cp -a /etc/puppet/hieradata/* /etc/puppet/check-mode/hieradata/