2021-02-19 08:29:01 -07:00
|
|
|
- name: Write container-puppet-tasks json file for {{ansible_facts['hostname'] | lower}} step {{step}}
|
2020-01-22 14:11:33 -05:00
|
|
|
no_log: True
|
|
|
|
copy:
|
2020-04-02 12:51:21 +05:30
|
|
|
content: "{{lookup ('vars', 'host_container_puppet_tasks_' ~ step, default=[]) | to_nice_json}}"
|
2020-09-25 10:19:33 -04:00
|
|
|
dest: "/var/lib/container-puppet/{{ ansible_check_mode | bool | ternary('check-mode/', '') }}container-puppet-tasks{{step}}.json"
|
2020-01-22 14:11:33 -05:00
|
|
|
force: yes
|
|
|
|
mode: '0600'
|
2020-09-25 10:19:33 -04:00
|
|
|
check_mode: no
|
2020-01-22 14:11:33 -05:00
|
|
|
tags:
|
|
|
|
- container_config_tasks
|
|
|
|
|
2020-02-03 21:48:46 -05:00
|
|
|
- name: Block for container-puppet tasks (bootstrap tasks) for step {{ step }} with tripleo-ansible
|
2020-01-22 14:11:33 -05:00
|
|
|
tags:
|
|
|
|
- container_config_tasks
|
2020-02-03 21:48:46 -05:00
|
|
|
block:
|
|
|
|
- name: "Generate container puppet configs for step {{ step }}"
|
|
|
|
container_puppet_config:
|
|
|
|
check_mode: '{{ ansible_check_mode | bool | ternary(1, 0) }}'
|
|
|
|
config_vol_prefix: "/var/lib/config-data{{ ansible_check_mode | bool | ternary('/check-mode', '') }}"
|
|
|
|
debug: "{{ docker_puppet_debug | bool }}"
|
|
|
|
net_host: true
|
|
|
|
no_archive: true
|
|
|
|
puppet_config: "/var/lib/container-puppet/{{ ansible_check_mode | bool | ternary('check-mode/', '') }}container-puppet-tasks{{ step }}.json"
|
2021-02-19 08:29:01 -07:00
|
|
|
short_hostname: "{{ ansible_facts['hostname'] | lower }}"
|
2020-02-03 21:48:46 -05:00
|
|
|
step: "{{ step }}"
|
|
|
|
|
2021-05-04 10:47:48 -06:00
|
|
|
- name: "Manage Puppet containers (bootstrap tasks) for step {{ step }}"
|
|
|
|
tripleo_container_manage:
|
|
|
|
config_id: "tripleo_puppet_step{{ step }}"
|
|
|
|
config_dir: "/var/lib/tripleo-config/container-puppet-config/step_{{ step }}"
|
|
|
|
config_patterns: 'container-puppet-*.json'
|
|
|
|
debug: "{{ docker_puppet_debug | bool }}"
|
|
|
|
concurrency: "{{ docker_puppet_process_count }}"
|