Merge "Add named debug tasks to each play"

This commit is contained in:
Zuul 2019-09-10 00:37:00 +00:00 committed by Gerrit Code Review
commit fd051e610e
2 changed files with 36 additions and 0 deletions

View File

@ -452,6 +452,12 @@ outputs:
name: Common roles for TripleO servers
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
any_errors_fatal: yes
# pre_tasks run before any roles in a play, so we use it for the
# named debug task for --start-at-task.
pre_tasks:
- name: Common roles for TripleO servers
debug:
msg: Use --start-at-task "Common roles for TripleO servers" to resume from this task
roles:
- tripleo-bootstrap
- tripleo-ssh-known-hosts
@ -475,6 +481,9 @@ outputs:
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
tasks:
- name: Overcloud deploy step tasks for step 0
debug:
msg: Use --start-at-task "Overcloud deploy step tasks for step 0" to resume from this task
- name: Create /var/lib/container-puppet
no_log: True
file: path=/var/lib/container-puppet state=directory setype=svirt_sandbox_file_t selevel=s0 recurse=true
@ -536,6 +545,9 @@ outputs:
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
any_errors_fatal: yes
tasks:
- name: Server deployments
debug:
msg: Use --start-at-task "Server deployments" to resume from this task
- include_tasks: deployments.yaml
vars:
force: false
@ -656,6 +668,9 @@ outputs:
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
tasks:
- name: Host prep steps
debug:
msg: Use --start-at-task "{{role.name}} Host prep steps" to resume from this task
- import_tasks: {{role.name}}/host_prep_tasks.yaml
tags:
- overcloud
@ -682,6 +697,9 @@ outputs:
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
tasks:
- name: External deployment step {{step}}
debug:
msg: Use --start-at-task "External deployment step {{step}}" to resume from this task
- import_tasks: external_deploy_steps_tasks.yaml
tags:
- external
@ -714,6 +732,9 @@ outputs:
dest: /etc/puppet/hieradata/config_step.json
force: true
mode: '0600'
- name: Overcloud deploy step tasks for {{step}}
debug:
msg: Use --start-at-task "Overcloud deploy step tasks for {{step}}" to resume from this task
{%- for role in roles %}
- import_tasks: {{role.name}}/deploy_steps_tasks.yaml
when: tripleo_role_name == '{{role.name}}'
@ -740,6 +761,9 @@ outputs:
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
tasks:
- name: Overcloud common deploy step tasks {{step}}
debug:
msg: Use --start-at-task "Overcloud common deploy step tasks {{step}}" to resume from this task
- name: Check if /var/lib/tripleo-config/container-startup-config-1.json already exists
stat:
path: /var/lib/tripleo-config/container-startup-config-1.json
@ -758,6 +782,9 @@ outputs:
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
any_errors_fatal: yes
tasks:
- name: Server Post Deployments
debug:
msg: Use --start-at-task "Server Post Deployments" to resume from this task
- include_tasks: deployments.yaml
vars:
force: false
@ -783,6 +810,9 @@ outputs:
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
tasks:
- name: External deployment Post Deploy tasks
debug:
msg: Use --start-at-task "External deployment Post Deploy tasks" to resume from this task
- import_tasks: external_post_deploy_steps_tasks.yaml
tags:
- external

View File

@ -0,0 +1,6 @@
---
features:
- Named debug ansible tasks have been added to the plays that get generated
in deploy_steps_playbook.yaml (from common/deploy-steps.j2). The explicitly
named tasks allow for using ansible-playbook's --start-at-task option to
resume a deployment from the start of a given play.