From 8fb3a0b88951fbeb439585071c02d98b7ed317c4 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Tue, 4 May 2021 10:47:48 -0600 Subject: [PATCH] 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 --- common/generate-config-tasks.yaml | 21 ++++++--------------- common/host-container-puppet-tasks.yaml | 22 +++++++--------------- 2 files changed, 13 insertions(+), 30 deletions(-) diff --git a/common/generate-config-tasks.yaml b/common/generate-config-tasks.yaml index 471edf266e..e465d3dc7a 100644 --- a/common/generate-config-tasks.yaml +++ b/common/generate-config-tasks.yaml @@ -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 diff --git a/common/host-container-puppet-tasks.yaml b/common/host-container-puppet-tasks.yaml index b172ba5bff..404b545838 100644 --- a/common/host-container-puppet-tasks.yaml +++ b/common/host-container-puppet-tasks.yaml @@ -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 }}"