Generate container startup configs with a new module
Remove container_startup_configs_tasks.yaml playbook, and some set_fact tasks that aren't needed anymore; since we now have a module to generate container startup config files. Change-Id: I8ebe7f5f52f14a14c3911748b2e2063e0c3ad9ac
This commit is contained in:
parent
e46d997c4a
commit
c587d74ae1
@ -1,28 +0,0 @@
|
||||
---
|
||||
|
||||
# TODO(emilien) convert this whole task in a module
|
||||
# https://bugs.launchpad.net/tripleo/+bug/1884577
|
||||
- name: "Remove old {{ item.0 }} container startup configs"
|
||||
become: true
|
||||
file:
|
||||
path: "/var/lib/tripleo-config/container-startup-config/{{ item.0 }}"
|
||||
state: absent
|
||||
|
||||
- name: "Create directory for {{ item.0 }} container startup configs"
|
||||
file:
|
||||
path: "/var/lib/tripleo-config/container-startup-config/{{ item.0 }}/"
|
||||
mode: 0600
|
||||
recurse: yes
|
||||
setype: container_file_t
|
||||
|
||||
- name: "Creating container startup configs for {{ item.0 }}"
|
||||
become: true
|
||||
copy:
|
||||
content: "{{ startup_data.value | to_nice_json }}"
|
||||
dest: "/var/lib/tripleo-config/container-startup-config/{{ item.0 }}/{{ startup_data.key }}.json"
|
||||
setype: container_file_t
|
||||
mode: 0600
|
||||
no_log: true
|
||||
loop_control:
|
||||
loop_var: startup_data
|
||||
loop: "{{ item.1 | dict2items }}"
|
@ -222,26 +222,6 @@
|
||||
tags:
|
||||
- container_config_scripts
|
||||
|
||||
# Here we are dumping all the container startup configuration data
|
||||
# so that we can have access to how they are started outside of heat
|
||||
# and container cmd. This lets us create command line tools to test containers.
|
||||
- name: Set container_config_default fact
|
||||
no_log: True
|
||||
set_fact:
|
||||
container_config_default: "{{ container_config_default | default({}) | combine( {'step_' + item: {}} ) }}"
|
||||
with_sequence: count={{ deploy_steps_max }}
|
||||
tags:
|
||||
- container_startup_configs
|
||||
|
||||
- name: Set container_startup_configs_with_default fact
|
||||
no_log: True
|
||||
set_fact:
|
||||
container_config_with_default: "{{ container_config_default | combine(role_data_container_config) }}"
|
||||
vars:
|
||||
role_data_container_config: "{{ lookup('file', tripleo_role_name + '/docker_config.yaml', errors='ignore') | default({}, True) | from_yaml }}"
|
||||
tags:
|
||||
- container_startup_configs
|
||||
|
||||
# This file location is deprecated and the new location is now:
|
||||
# /var/lib/tripleo-config/container-startup-config/step_X/<container_name>.json
|
||||
# Can be removed in V cycle
|
||||
@ -257,9 +237,9 @@
|
||||
- container_startup_configs
|
||||
|
||||
- name: Generate startup configs files per step and per container
|
||||
no_log: True
|
||||
include_tasks: container_startup_configs_tasks.yaml
|
||||
loop: "{{ container_config_with_default | dictsort }}"
|
||||
container_startup_config:
|
||||
config_base_dir: /var/lib/tripleo-config/container-startup-config
|
||||
config_data: "{{ lookup('file', (tripleo_role_name + '/docker_config.yaml'), errors='ignore') | default({}, True) | from_yaml }}"
|
||||
tags:
|
||||
- container_startup_configs
|
||||
|
||||
|
@ -416,7 +416,6 @@ outputs:
|
||||
hiera_steps_tasks: {get_file: hiera-steps-tasks.yaml}
|
||||
deploy_steps_tasks_step_0: {get_file: deploy-steps-tasks-step-0.yaml}
|
||||
common_deploy_steps_tasks_step_1: {get_file: deploy-steps-tasks-step-1.yaml}
|
||||
container_startup_configs_tasks: {get_file: container_startup_configs_tasks.yaml}
|
||||
container_puppet_script: {get_file: ./container-puppet.sh}
|
||||
all_nodes_validation_script.sh : {get_file: ../validation-scripts/all-nodes.sh}
|
||||
deploy-artifacts.sh : {get_file: ../puppet/deploy-artifacts.sh}
|
||||
|
Loading…
x
Reference in New Issue
Block a user