2017-07-20 15:04:10 +01:00
|
|
|
# Note the indentation here is required as it's joined
|
|
|
|
# to create a playbook in deploy-steps.j2
|
2017-12-04 13:55:10 +00:00
|
|
|
##################################################
|
|
|
|
# Step 1 block, write data for subsequent steps
|
|
|
|
##################################################
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-12-04 13:55:10 +00:00
|
|
|
- name: Write config data at the start of step 1
|
|
|
|
when: step == "1"
|
|
|
|
become: true
|
|
|
|
block:
|
|
|
|
- name: Create /var/lib/tripleo-config directory
|
|
|
|
file: path=/var/lib/tripleo-config state=directory setype=svirt_sandbox_file_t selevel=s0 recurse=true
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-12-04 13:55:10 +00:00
|
|
|
# Puppet manifest for baremetal host configuration
|
2018-02-15 14:36:52 -05:00
|
|
|
- name: Check if puppet step_config.pp manifest exists
|
|
|
|
delegate_to: localhost
|
|
|
|
become: false
|
|
|
|
stat:
|
2018-05-14 11:15:09 -07:00
|
|
|
path: "{{ tripleo_role_name + '/step_config.pp' }}"
|
2018-02-15 14:36:52 -05:00
|
|
|
register: stat_step_config
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-02-15 14:36:52 -05:00
|
|
|
- name: Set fact when file existed
|
2018-04-03 17:43:57 -04:00
|
|
|
no_log: True
|
2018-02-15 14:36:52 -05:00
|
|
|
set_fact:
|
2018-05-14 11:15:09 -07:00
|
|
|
role_data_step_config: "{{lookup('file', tripleo_role_name + '/step_config.pp')}}"
|
2018-02-15 14:36:52 -05:00
|
|
|
when: stat_step_config.stat.exists
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-12-04 13:55:10 +00:00
|
|
|
- name: Write the puppet step_config manifest
|
|
|
|
copy: content="{{role_data_step_config}}" dest=/var/lib/tripleo-config/puppet_step_config.pp force=yes mode=0600
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-12-04 13:55:10 +00:00
|
|
|
# Config file for our docker-puppet.py script, used to generate container configs
|
|
|
|
- name: Create /var/lib/docker-puppet
|
|
|
|
file: path=/var/lib/docker-puppet state=directory setype=svirt_sandbox_file_t selevel=s0 recurse=true
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-02-15 14:36:52 -05:00
|
|
|
- name: Check if docker-puppet puppet_config.yaml configuration file exists
|
|
|
|
delegate_to: localhost
|
|
|
|
become: false
|
|
|
|
stat:
|
2018-05-14 11:15:09 -07:00
|
|
|
path: "{{ tripleo_role_name + '/puppet_config.yaml' }}"
|
2018-02-15 14:36:52 -05:00
|
|
|
register: stat_puppet_config
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-02-15 14:36:52 -05:00
|
|
|
- name: Set fact when file existed
|
2018-04-03 17:43:57 -04:00
|
|
|
no_log: True
|
2018-02-15 14:36:52 -05:00
|
|
|
set_fact:
|
2018-05-14 11:15:09 -07:00
|
|
|
role_data_puppet_config: "{{lookup('file', tripleo_role_name + '/puppet_config.yaml') | from_yaml | to_json}}"
|
2018-02-15 14:36:52 -05:00
|
|
|
when: stat_puppet_config.stat.exists
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-02-15 14:36:52 -05:00
|
|
|
- name: Write docker-puppet.json file
|
|
|
|
copy: content="{{role_data_puppet_config}}" dest=/var/lib/docker-puppet/docker-puppet.json force=yes mode=0600
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-12-04 13:55:10 +00:00
|
|
|
- name: Create /var/lib/docker-config-scripts
|
|
|
|
file: path=/var/lib/docker-config-scripts state=directory
|
|
|
|
|
|
|
|
# The container config files
|
|
|
|
# /var/lib/docker-container-startup-configs.json is removed as we now write
|
|
|
|
# per-step files instead
|
|
|
|
- name: Clean old /var/lib/docker-container-startup-configs.json file
|
|
|
|
file:
|
|
|
|
path: /var/lib/docker-container-startup-configs.json
|
|
|
|
state: absent
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-02-15 14:36:52 -05:00
|
|
|
- name: Check if docker_config_scripts.yaml file exists
|
|
|
|
delegate_to: localhost
|
|
|
|
become: false
|
|
|
|
stat:
|
2018-05-14 11:15:09 -07:00
|
|
|
path: "{{ tripleo_role_name + '/docker_config_scripts.yaml' }}"
|
2018-02-15 14:36:52 -05:00
|
|
|
register: stat_docker_config_scripts
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-02-15 14:36:52 -05:00
|
|
|
- name: Set fact when file existed
|
2018-04-03 17:43:57 -04:00
|
|
|
no_log: True
|
2018-02-15 14:36:52 -05:00
|
|
|
set_fact:
|
2018-05-14 11:15:09 -07:00
|
|
|
role_data_docker_config_scripts: "{{lookup('file', tripleo_role_name + '/docker_config_scripts.yaml') | from_yaml}}"
|
2018-02-15 14:36:52 -05:00
|
|
|
when: stat_docker_config_scripts.stat.exists
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-12-04 13:55:10 +00:00
|
|
|
- name: Write docker config scripts
|
|
|
|
copy: content="{{item.value.content}}" dest="/var/lib/docker-config-scripts/{{item.key}}" force=yes mode="{{item.value.mode|default('0600', true)}}"
|
|
|
|
with_dict: "{{role_data_docker_config_scripts}}"
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-12-04 13:55:10 +00:00
|
|
|
# Here we are dumping all the docker container startup configuration data
|
|
|
|
# so that we can have access to how they are started outside of heat
|
|
|
|
# and docker-cmd. This lets us create command line tools to test containers.
|
|
|
|
# FIXME We need to update the defaults e.g in docker-toool so we can remove the
|
|
|
|
# docker-container-startup-configs.json and use per-step configs instead
|
|
|
|
- name: Set docker_config_default fact
|
2018-04-03 17:43:57 -04:00
|
|
|
no_log: True
|
2017-12-04 13:55:10 +00:00
|
|
|
set_fact:
|
|
|
|
docker_config_default: "{{ docker_config_default|default({}) | combine( {'step_'+item: {}} ) }}"
|
|
|
|
with_sequence: count={{deploy_steps_max}}
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-02-15 14:36:52 -05:00
|
|
|
- name: Check if docker_config.yaml file exists
|
|
|
|
delegate_to: localhost
|
|
|
|
become: false
|
|
|
|
stat:
|
2018-05-14 11:15:09 -07:00
|
|
|
path: "{{ tripleo_role_name + '/docker_config.yaml' }}"
|
2018-02-15 14:36:52 -05:00
|
|
|
register: stat_docker_config
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-02-15 14:36:52 -05:00
|
|
|
- name: Set fact when file existed
|
2018-04-03 17:43:57 -04:00
|
|
|
no_log: True
|
2018-02-15 14:36:52 -05:00
|
|
|
set_fact:
|
2018-05-14 11:15:09 -07:00
|
|
|
role_data_docker_config: "{{lookup('file', tripleo_role_name + '/docker_config.yaml') | from_yaml}}"
|
2018-02-15 14:36:52 -05:00
|
|
|
when: stat_docker_config.stat.exists
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-12-04 13:55:10 +00:00
|
|
|
- name: Set docker_startup_configs_with_default fact
|
2018-04-03 17:43:57 -04:00
|
|
|
no_log: True
|
2017-12-04 13:55:10 +00:00
|
|
|
set_fact:
|
|
|
|
docker_config_with_default: "{{docker_config_default | combine(role_data_docker_config)}}"
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-12-04 13:55:10 +00:00
|
|
|
- name: Write docker-container-startup-configs
|
|
|
|
copy: content="{{docker_config_with_default | to_json }}" dest=/var/lib/docker-container-startup-configs.json force=yes mode=0600
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-12-04 13:55:10 +00:00
|
|
|
- name: Write per-step docker-container-startup-configs
|
|
|
|
copy: content="{{item.value|to_json}}" dest="/var/lib/tripleo-config/docker-container-startup-config-{{item.key}}.json" force=yes mode=0600
|
|
|
|
with_dict: "{{docker_config_with_default}}"
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-12-04 13:55:10 +00:00
|
|
|
- name: Create /var/lib/kolla/config_files directory
|
|
|
|
file: path=/var/lib/kolla/config_files state=directory setype=svirt_sandbox_file_t selevel=s0 recurse=true
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-02-15 14:36:52 -05:00
|
|
|
- name: Check if kolla_config.yaml file exists
|
|
|
|
delegate_to: localhost
|
|
|
|
become: false
|
|
|
|
stat:
|
2018-05-14 11:15:09 -07:00
|
|
|
path: "{{ tripleo_role_name + '/kolla_config.yaml' }}"
|
2018-02-15 14:36:52 -05:00
|
|
|
register: stat_kolla_config
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-02-15 14:36:52 -05:00
|
|
|
- name: Set fact when file existed
|
2018-04-03 17:43:57 -04:00
|
|
|
no_log: True
|
2018-02-15 14:36:52 -05:00
|
|
|
set_fact:
|
2018-05-14 11:15:09 -07:00
|
|
|
role_data_kolla_config: "{{lookup('file', tripleo_role_name + '/kolla_config.yaml') | from_yaml}}"
|
2018-02-15 14:36:52 -05:00
|
|
|
when: stat_kolla_config.stat.exists
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-12-04 13:55:10 +00:00
|
|
|
- name: Write kolla config json files
|
|
|
|
copy: content="{{item.value|to_json}}" dest="{{item.key}}" force=yes mode=0600
|
|
|
|
with_dict: "{{role_data_kolla_config}}"
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-12-04 13:55:10 +00:00
|
|
|
########################################################
|
|
|
|
# Bootstrap tasks, only performed on bootstrap_server_id
|
|
|
|
########################################################
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-12-04 13:55:10 +00:00
|
|
|
- name: Clean /var/lib/docker-puppet/docker-puppet-tasks*.json files
|
|
|
|
file:
|
|
|
|
path: "{{item}}"
|
|
|
|
state: absent
|
|
|
|
with_fileglob:
|
|
|
|
- /var/lib/docker-puppet/docker-puppet-tasks*.json
|
|
|
|
when: deploy_server_id == bootstrap_server_id
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-02-15 14:36:52 -05:00
|
|
|
- name: Check if docker_puppet_tasks.yaml file exists
|
|
|
|
delegate_to: localhost
|
|
|
|
become: false
|
|
|
|
stat:
|
2018-05-14 11:15:09 -07:00
|
|
|
path: "{{ tripleo_role_name + '/docker_puppet_tasks.yaml' }}"
|
2018-02-15 14:36:52 -05:00
|
|
|
register: stat_docker_puppet_tasks
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-02-15 14:36:52 -05:00
|
|
|
- name: Set fact when file existed
|
2018-04-03 17:43:57 -04:00
|
|
|
no_log: True
|
2018-02-15 14:36:52 -05:00
|
|
|
set_fact:
|
2018-05-14 11:15:09 -07:00
|
|
|
role_data_docker_puppet_tasks: "{{lookup('file', tripleo_role_name + '/docker_puppet_tasks.yaml') | from_yaml}}"
|
2018-02-15 14:36:52 -05:00
|
|
|
when: stat_docker_puppet_tasks.stat.exists
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-12-04 13:55:10 +00:00
|
|
|
- name: Write docker-puppet-tasks json files
|
|
|
|
copy: content="{{item.value|to_json}}" dest=/var/lib/docker-puppet/docker-puppet-tasks{{item.key.replace("step_", "")}}.json force=yes mode=0600
|
|
|
|
with_dict: "{{role_data_docker_puppet_tasks}}"
|
|
|
|
when: deploy_server_id == bootstrap_server_id
|
|
|
|
|
2017-05-03 17:12:55 +01:00
|
|
|
#####################################################
|
|
|
|
# Per step puppet configuration of the baremetal host
|
|
|
|
#####################################################
|
2018-01-30 19:41:35 -05:00
|
|
|
|
Fix ConfigDebug for puppet host runs
Before pike we used to be able to add -e environments/config-debug.yaml
and that would give us debug logs for puppet. With the move to ansible
running puppet we lost this feature.
Let's make sure that the old ConfigDebug variable still works with
the ansible playbook-based deploy steps. With this patch and ConfigDebug
set to true, we correctly get the puppet debug logs:
TASK [debug] *******************************************************************
ok: [localhost] => {
"(outputs.stderr|default('')).split('\n')|union(outputs.stdout_lines|default([]))": [
"Warning: Undefined variable 'deploy_config_name'; ",
" (file & line not available)",
"Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README. at [\"/etc/puppet/modules/ntp/manifests/init.pp\", 54]:[\"/etc/puppet/modules/tripleo/manifests/profile/base/time/ntp.pp\", 29]",
" (at /etc/puppet/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')",
"Debug: Runtime environment: puppet_version=4.8.2, ruby_version=2.0.0, run_mode=user, default_encoding=UTF-8",
"Debug: Loading external facts from /etc/puppet/modules/openstacklib/facts.d",
"Debug: Loading external facts from /var/lib/puppet/facts.d",
....
Change-Id: Ia726fb8ca4a6f7bbbd7a1284d76ff42df6825d01
Closes-Bug: #1722752
2017-10-11 12:47:01 +02:00
|
|
|
- name: Set host puppet debugging fact string
|
|
|
|
set_fact:
|
|
|
|
host_puppet_config_debug: "--debug --verbose"
|
2018-03-06 13:43:07 -05:00
|
|
|
when:
|
|
|
|
- enable_puppet|default(true)|bool
|
|
|
|
- enable_debug|default(false)|bool
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-05-03 17:12:55 +01:00
|
|
|
- name: Write the config_step hieradata
|
2017-09-04 13:53:04 +01:00
|
|
|
copy: content="{{dict(step=step|int)|to_json}}" dest=/etc/puppet/hieradata/config_step.json force=true mode=0600
|
2017-09-14 10:08:07 -06:00
|
|
|
become: true
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-05-03 17:12:55 +01:00
|
|
|
- name: Run puppet host configuration for step {{step}}
|
2018-03-06 13:43:07 -05:00
|
|
|
when: enable_puppet|default(true)|bool
|
2017-06-09 18:03:50 +02:00
|
|
|
command: >-
|
Fix ConfigDebug for puppet host runs
Before pike we used to be able to add -e environments/config-debug.yaml
and that would give us debug logs for puppet. With the move to ansible
running puppet we lost this feature.
Let's make sure that the old ConfigDebug variable still works with
the ansible playbook-based deploy steps. With this patch and ConfigDebug
set to true, we correctly get the puppet debug logs:
TASK [debug] *******************************************************************
ok: [localhost] => {
"(outputs.stderr|default('')).split('\n')|union(outputs.stdout_lines|default([]))": [
"Warning: Undefined variable 'deploy_config_name'; ",
" (file & line not available)",
"Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README. at [\"/etc/puppet/modules/ntp/manifests/init.pp\", 54]:[\"/etc/puppet/modules/tripleo/manifests/profile/base/time/ntp.pp\", 29]",
" (at /etc/puppet/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')",
"Debug: Runtime environment: puppet_version=4.8.2, ruby_version=2.0.0, run_mode=user, default_encoding=UTF-8",
"Debug: Loading external facts from /etc/puppet/modules/openstacklib/facts.d",
"Debug: Loading external facts from /var/lib/puppet/facts.d",
....
Change-Id: Ia726fb8ca4a6f7bbbd7a1284d76ff42df6825d01
Closes-Bug: #1722752
2017-10-11 12:47:01 +02:00
|
|
|
puppet apply {{ host_puppet_config_debug|default('') }}
|
2017-06-09 18:03:50 +02:00
|
|
|
--modulepath=/etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules
|
2017-10-12 17:37:50 +02:00
|
|
|
--detailed-exitcodes
|
2018-01-03 12:55:55 -08:00
|
|
|
--summarize
|
2017-07-27 13:59:04 -04:00
|
|
|
--logdest syslog --logdest console --color=false
|
2017-06-09 18:03:50 +02:00
|
|
|
/var/lib/tripleo-config/puppet_step_config.pp
|
2017-10-12 17:37:50 +02:00
|
|
|
changed_when: outputs.rc == 2
|
2017-06-09 18:03:50 +02:00
|
|
|
check_mode: no
|
|
|
|
register: outputs
|
|
|
|
failed_when: false
|
|
|
|
no_log: true
|
2017-09-14 10:08:07 -06:00
|
|
|
become: true
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-02-09 13:18:49 +00:00
|
|
|
- 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([]))
|
2018-03-06 13:43:07 -05:00
|
|
|
when:
|
|
|
|
- enable_puppet|default(true)|bool
|
|
|
|
- outputs.rc is defined
|
2017-10-12 17:37:50 +02:00
|
|
|
failed_when: outputs.rc not in [0, 2]
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-05-03 17:12:55 +01:00
|
|
|
######################################
|
|
|
|
# Generate config via docker-puppet.py
|
|
|
|
######################################
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-01-25 16:42:07 -05:00
|
|
|
- name: Run docker-puppet tasks (generate config) during step {{step}}
|
2017-05-03 17:12:55 +01:00
|
|
|
shell: python /var/lib/docker-puppet/docker-puppet.py
|
|
|
|
environment:
|
|
|
|
NET_HOST: 'true'
|
2017-07-21 11:21:09 +01:00
|
|
|
DEBUG: '{{docker_puppet_debug|default(false)}}'
|
2017-08-25 23:01:24 -04:00
|
|
|
PROCESS_COUNT: '{{docker_puppet_process_count|default(3)}}'
|
2017-05-03 17:12:55 +01:00
|
|
|
when: step == "1"
|
|
|
|
changed_when: false
|
|
|
|
check_mode: no
|
2017-06-09 18:03:50 +02:00
|
|
|
register: outputs
|
|
|
|
failed_when: false
|
|
|
|
no_log: true
|
2017-09-14 10:08:07 -06:00
|
|
|
become: true
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-02-09 13:18:49 +00:00
|
|
|
- name: "Debug output for task which failed: Run docker-puppet tasks (generate config) during step {{step}}"
|
|
|
|
debug: var=outputs.stdout_lines|default([])|union(outputs.stderr_lines|default([]))
|
2017-11-20 20:48:50 +01:00
|
|
|
when: outputs.rc is defined
|
|
|
|
failed_when: outputs.rc != 0
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-05-03 17:12:55 +01:00
|
|
|
##################################################
|
|
|
|
# Per step starting of the containers using paunch
|
|
|
|
##################################################
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-05-19 16:38:56 +01:00
|
|
|
# Note docker-puppet.py generates the hashed-*.json file, which is a copy of
|
|
|
|
# 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
|
2017-05-03 17:12:55 +01:00
|
|
|
- name: Start containers for step {{step}}
|
2017-06-09 18:03:50 +02:00
|
|
|
command: >-
|
|
|
|
paunch --debug apply
|
|
|
|
--file /var/lib/tripleo-config/hashed-docker-container-startup-config-step_{{step}}.json
|
2018-05-14 11:15:09 -07:00
|
|
|
--config-id tripleo_step{{step}} --managed-by tripleo-{{tripleo_role_name}}
|
2017-05-03 17:12:55 +01:00
|
|
|
changed_when: false
|
|
|
|
check_mode: no
|
2017-06-09 18:03:50 +02:00
|
|
|
register: outputs
|
|
|
|
failed_when: false
|
|
|
|
no_log: true
|
2017-09-14 10:08:07 -06:00
|
|
|
become: true
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-02-09 13:18:49 +00:00
|
|
|
- name: "Debug output for task which failed: Start containers for step {{step}}"
|
|
|
|
debug: var=outputs.stdout_lines|default([])|union(outputs.stderr_lines|default([]))
|
2017-11-20 20:48:50 +01:00
|
|
|
when: outputs.rc is defined
|
|
|
|
failed_when: outputs.rc != 0
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-05-03 17:12:55 +01:00
|
|
|
########################################################
|
|
|
|
# Bootstrap tasks, only performed on bootstrap_server_id
|
|
|
|
########################################################
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2017-07-19 20:36:11 +01:00
|
|
|
- name: Check if /var/lib/docker-puppet/docker-puppet-tasks{{step}}.json exists
|
|
|
|
stat:
|
|
|
|
path: /var/lib/docker-puppet/docker-puppet-tasks{{step}}.json
|
|
|
|
register: docker_puppet_tasks_json
|
2017-09-14 10:08:07 -06:00
|
|
|
become: true
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-01-25 16:42:07 -05:00
|
|
|
- name: Run docker-puppet tasks (bootstrap tasks) for step {{step}}
|
2017-05-03 17:12:55 +01:00
|
|
|
shell: python /var/lib/docker-puppet/docker-puppet.py
|
|
|
|
environment:
|
|
|
|
CONFIG: /var/lib/docker-puppet/docker-puppet-tasks{{step}}.json
|
|
|
|
NET_HOST: "true"
|
|
|
|
NO_ARCHIVE: "true"
|
|
|
|
STEP: "{{step}}"
|
2017-07-19 20:36:11 +01:00
|
|
|
when: deploy_server_id == bootstrap_server_id and docker_puppet_tasks_json.stat.exists
|
2017-05-03 17:12:55 +01:00
|
|
|
changed_when: false
|
|
|
|
check_mode: no
|
2017-06-09 18:03:50 +02:00
|
|
|
register: outputs
|
|
|
|
failed_when: false
|
|
|
|
no_log: true
|
2017-09-14 10:08:07 -06:00
|
|
|
become: true
|
2018-01-30 19:41:35 -05:00
|
|
|
|
2018-02-09 13:18:49 +00:00
|
|
|
- name: "Debug output for task which failed: Run docker-puppet tasks (bootstrap tasks) for step {{step}}"
|
|
|
|
debug: var=outputs.stdout_lines|default([])|union(outputs.stderr_lines|default([]))
|
2017-11-20 20:48:50 +01:00
|
|
|
when: outputs.rc is defined
|
|
|
|
failed_when: outputs.rc != 0
|
2018-01-30 19:41:35 -05:00
|
|
|
|