Use module for container puppet tasks

Switch container puppet tasks to use the module for management rather
than the tripleo_container_manage role which has a bunch of unrelated
tasks.

Change-Id: I4398322a02f6f899ea226b60336da83fc841812f
Depends-On: https://review.opendev.org/c/openstack/tripleo-ansible/+/796884
This commit is contained in:
Alex Schultz 2021-05-04 10:47:48 -06:00
parent d9b6ed3fb2
commit 8fb3a0b889
2 changed files with 13 additions and 30 deletions

View File

@ -21,21 +21,12 @@
short_hostname: "{{ ansible_facts['hostname'] | lower }}"
step: "{{ step }}"
- name: "Manage Puppet containers (generate config) for step {{ step }} with tripleo-ansible"
include_role:
name: tripleo_container_manage
vars:
tripleo_container_manage_concurrency: "{{ docker_puppet_process_count }}"
tripleo_container_manage_systemd_order: false
tripleo_container_manage_systemd_teardown: false
tripleo_container_manage_config: "/var/lib/tripleo-config/container-puppet-config/step_{{ step }}"
tripleo_container_manage_config_patterns: 'container-puppet-*.json'
tripleo_container_manage_config_id: "tripleo_puppet_step{{ step }}"
tripleo_container_manage_debug: "{{ docker_puppet_debug | bool }}"
# puppet with --detailed-exitcodes will return 0 for success and
# no changes and 2 for success and resource changes. Other
# numbers are failures
tripleo_container_manage_valid_exit_code: [0, 2]
- name: "Manage Puppet containers (generate config) 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"
concurrency: "{{ docker_puppet_process_count }}"
- name: Diff puppet-generated changes for check mode
become: true

View File

@ -24,18 +24,10 @@
short_hostname: "{{ ansible_facts['hostname'] | lower }}"
step: "{{ step }}"
- name: "Manage Puppet containers (bootstrap tasks) for step {{ step }} with tripleo-ansible"
include_role:
name: tripleo_container_manage
vars:
tripleo_container_manage_concurrency: "{{ docker_puppet_process_count }}"
tripleo_container_manage_systemd_order: false
tripleo_container_manage_systemd_teardown: false
tripleo_container_manage_config: "/var/lib/tripleo-config/container-puppet-config/step_{{ step }}"
tripleo_container_manage_config_patterns: 'container-puppet-*.json'
tripleo_container_manage_config_id: "tripleo_puppet_step{{ step }}"
tripleo_container_manage_debug: "{{ docker_puppet_debug | bool }}"
# puppet with --detailed-exitcodes will return 0 for success and
# no changes and 2 for success and resource changes. Other
# numbers are failures
tripleo_container_manage_valid_exit_code: [0, 2]
- 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 }}"