tripleo-heat-templates/common/host-container-puppet-tasks.yaml
Takashi Kajinami 76adfd4202 Use true/false for boolean values
In ansible, usage of true/false for boolean values, instead of yes/no,
is considered as a best practise and is enforced by ansible-lint with
the "truthy value should be one of false, true (truthy)" rule.

This change replaces usage of yes/no by true/false to follow that
practise.

Change-Id: I3313278f1ef6cbee0f906aca0a77bde1a3c53784
2021-10-12 09:35:38 +09:00

34 lines
1.6 KiB
YAML

- name: Write container-puppet-tasks json file for {{ansible_facts['hostname'] | lower}} step {{step}}
no_log: True
copy:
content: "{{lookup ('vars', 'host_container_puppet_tasks_' ~ step, default=[]) | to_nice_json}}"
dest: "/var/lib/container-puppet/{{ ansible_check_mode | bool | ternary('check-mode/', '') }}container-puppet-tasks{{step}}.json"
force: true
mode: '0600'
check_mode: false
tags:
- container_config_tasks
- name: Block for container-puppet tasks (bootstrap tasks) for step {{ step }} with tripleo-ansible
tags:
- container_config_tasks
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"
short_hostname: "{{ ansible_facts['hostname'] | lower }}"
step: "{{ step }}"
- 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 }}"