X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=docker%2Fdeploy-steps-playbook.yaml;h=446c73a69c28db6dc23b1c69068a3c6d5e8a8a86;hb=511d34eedca27756cfbbfdd6b0e43d916745367a;hp=87587a4b672357fac0e4fa4e5c7755eddefe8642;hpb=a759deedf0fb599d4fba89fc8741623f68a16322;p=apex-tripleo-heat-templates.git diff --git a/docker/deploy-steps-playbook.yaml b/docker/deploy-steps-playbook.yaml index 87587a4b..446c73a6 100644 --- a/docker/deploy-steps-playbook.yaml +++ b/docker/deploy-steps-playbook.yaml @@ -7,9 +7,19 @@ - name: Write the config_step hieradata copy: content="{{dict(step=step|int)|to_json}}" dest=/etc/puppet/hieradata/config_step.json force=true - name: Run puppet host configuration for step {{step}} - # FIXME: modulepath requires ansible 2.4, our builds currently only have 2.3 - # puppet: manifest=/var/lib/tripleo-config/puppet_step_config.pp modulepath=/etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules - puppet: manifest=/var/lib/tripleo-config/puppet_step_config.pp + command: >- + puppet apply + --modulepath=/etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules + --logdest syslog --color=false + /var/lib/tripleo-config/puppet_step_config.pp + changed_when: false + check_mode: no + register: outputs + failed_when: false + no_log: true + - debug: var=(outputs.stderr|default('')).split('\n')|union(outputs.stdout_lines|default([])) + when: outputs is defined + failed_when: outputs|failed ###################################### # Generate config via docker-puppet.py ###################################### @@ -21,6 +31,12 @@ when: step == "1" changed_when: false check_mode: no + register: outputs + failed_when: false + no_log: true + - debug: var=(outputs.stderr|default('')).split('\n')|union(outputs.stdout_lines|default([])) + when: outputs is defined + failed_when: outputs|failed ################################################## # Per step starting of the containers using paunch ################################################## @@ -32,10 +48,19 @@ # the *step_n.json with a hash of the generated external config added # This acts as a salt to enable restarting the container if config changes - name: Start containers for step {{step}} - command: paunch --debug apply --file /var/lib/tripleo-config/hashed-docker-container-startup-config-step_{{step}}.json --config-id tripleo_step{{step}} --managed-by tripleo-{{role_name}} + command: >- + paunch --debug apply + --file /var/lib/tripleo-config/hashed-docker-container-startup-config-step_{{step}}.json + --config-id tripleo_step{{step}} --managed-by tripleo-{{role_name}} when: docker_config_json.stat.exists changed_when: false check_mode: no + register: outputs + failed_when: false + no_log: true + - debug: var=(outputs.stderr|default('')).split('\n')|union(outputs.stdout_lines|default([])) + when: outputs is defined + failed_when: outputs|failed ######################################################## # Bootstrap tasks, only performed on bootstrap_server_id ######################################################## @@ -49,3 +74,9 @@ when: deploy_server_id == bootstrap_server_id changed_when: false check_mode: no + register: outputs + failed_when: false + no_log: true + - debug: var=(outputs.stderr|default('')).split('\n')|union(outputs.stdout_lines|default([])) + when: outputs is defined + failed_when: outputs|failed