diff --git a/common/deploy-steps-tasks.yaml b/common/deploy-steps-tasks.yaml index 19b9aa020f..e299f451cd 100644 --- a/common/deploy-steps-tasks.yaml +++ b/common/deploy-steps-tasks.yaml @@ -134,11 +134,14 @@ - name: Set host puppet debugging fact string set_fact: host_puppet_config_debug: "--debug --verbose" - when: enable_debug|default(false)|bool + when: + - enable_puppet|default(true)|bool + - enable_debug|default(false)|bool - name: Write the config_step hieradata copy: content="{{dict(step=step|int)|to_json}}" dest=/etc/puppet/hieradata/config_step.json force=true mode=0600 become: true - name: Run puppet host configuration for step {{step}} + when: enable_puppet|default(true)|bool command: >- puppet apply {{ host_puppet_config_debug|default('') }} --modulepath=/etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules @@ -154,7 +157,9 @@ become: true - name: "Debug output for task which failed: Run puppet host configuration for step {{step}}" debug: var=outputs.stdout_lines|default([])|union(outputs.stderr_lines|default([])) - when: outputs.rc is defined + when: + - enable_puppet|default(true)|bool + - outputs.rc is defined failed_when: outputs.rc not in [0, 2] ###################################### # Generate config via docker-puppet.py diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index a7aa3a001c..0606fbb6c8 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -55,6 +55,10 @@ parameters: default: false description: Whether to run config management (e.g. Puppet) in debug mode. type: boolean + EnablePuppet: + default: true + description: Whether to run the puppet (baremetal) deployment tasks. + type: boolean DockerPuppetDebug: type: string default: '' @@ -105,6 +109,7 @@ resources: - name: update_identifier - name: bootstrap_server_id - name: enable_debug + - name: enable_puppet - name: docker_puppet_debug - name: docker_puppet_process_count - name: role_data_step_config @@ -323,6 +328,7 @@ resources: update_identifier: {get_param: DeployIdentifier} bootstrap_server_id: {get_attr: [BootstrapServerId, value]} enable_debug: {get_param: ConfigDebug} + enable_puppet: {get_param: EnablePuppet} docker_puppet_debug: {get_param: DockerPuppetDebug} docker_puppet_process_count: {get_param: DockerPuppetProcessCount} role_data_step_config: {get_param: [role_data, {{role.name}}, step_config]}