Browse Source

Merge "Add named debug tasks to each play"

tags/11.2.0
Zuul 1 week ago
parent
commit
fd051e610e

+ 30
- 0
common/deploy-steps.j2 View File

@@ -452,6 +452,12 @@ outputs:
452 452
               name: Common roles for TripleO servers
453 453
               gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
454 454
               any_errors_fatal: yes
455
+              # pre_tasks run before any roles in a play, so we use it for the
456
+              # named debug task for --start-at-task.
457
+              pre_tasks:
458
+                - name: Common roles for TripleO servers
459
+                  debug:
460
+                    msg: Use --start-at-task "Common roles for TripleO servers" to resume from this task
455 461
               roles:
456 462
                 - tripleo-bootstrap
457 463
                 - tripleo-ssh-known-hosts
@@ -475,6 +481,9 @@ outputs:
475 481
                 docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
476 482
                 docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
477 483
               tasks:
484
+                - name: Overcloud deploy step tasks for step 0
485
+                  debug:
486
+                    msg: Use --start-at-task "Overcloud deploy step tasks for step 0" to resume from this task
478 487
                 - name: Create /var/lib/container-puppet
479 488
                   no_log: True
480 489
                   file: path=/var/lib/container-puppet state=directory setype=svirt_sandbox_file_t selevel=s0 recurse=true
@@ -536,6 +545,9 @@ outputs:
536 545
               gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
537 546
               any_errors_fatal: yes
538 547
               tasks:
548
+                - name: Server deployments
549
+                  debug:
550
+                    msg: Use --start-at-task "Server deployments" to resume from this task
539 551
                 - include_tasks: deployments.yaml
540 552
                   vars:
541 553
                     force: false
@@ -656,6 +668,9 @@ outputs:
656 668
                 docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
657 669
                 docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
658 670
               tasks:
671
+                - name: Host prep steps
672
+                  debug:
673
+                    msg: Use --start-at-task "{{role.name}} Host prep steps" to resume from this task
659 674
                 - import_tasks: {{role.name}}/host_prep_tasks.yaml
660 675
               tags:
661 676
                 - overcloud
@@ -682,6 +697,9 @@ outputs:
682 697
                 docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
683 698
                 docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
684 699
               tasks:
700
+                - name: External deployment step {{step}}
701
+                  debug:
702
+                    msg: Use --start-at-task "External deployment step {{step}}" to resume from this task
685 703
                 - import_tasks: external_deploy_steps_tasks.yaml
686 704
               tags:
687 705
                 - external
@@ -714,6 +732,9 @@ outputs:
714 732
                     dest: /etc/puppet/hieradata/config_step.json
715 733
                     force: true
716 734
                     mode: '0600'
735
+                - name: Overcloud deploy step tasks for {{step}}
736
+                  debug:
737
+                    msg: Use --start-at-task "Overcloud deploy step tasks for {{step}}" to resume from this task
717 738
 {%- for role in roles %}
718 739
                 - import_tasks: {{role.name}}/deploy_steps_tasks.yaml
719 740
                   when: tripleo_role_name == '{{role.name}}'
@@ -740,6 +761,9 @@ outputs:
740 761
                 docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
741 762
                 docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
742 763
               tasks:
764
+                - name: Overcloud common deploy step tasks {{step}}
765
+                  debug:
766
+                    msg: Use --start-at-task "Overcloud common deploy step tasks {{step}}" to resume from this task
743 767
                 - name: Check if /var/lib/tripleo-config/container-startup-config-1.json already exists
744 768
                   stat:
745 769
                     path: /var/lib/tripleo-config/container-startup-config-1.json
@@ -758,6 +782,9 @@ outputs:
758 782
               gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
759 783
               any_errors_fatal: yes
760 784
               tasks:
785
+                - name: Server Post Deployments
786
+                  debug:
787
+                    msg: Use --start-at-task "Server Post Deployments" to resume from this task
761 788
                 - include_tasks: deployments.yaml
762 789
                   vars:
763 790
                     force: false
@@ -783,6 +810,9 @@ outputs:
783 810
                 docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
784 811
                 docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
785 812
               tasks:
813
+                - name: External deployment Post Deploy tasks
814
+                  debug:
815
+                    msg: Use --start-at-task "External deployment Post Deploy tasks" to resume from this task
786 816
                 - import_tasks: external_post_deploy_steps_tasks.yaml
787 817
               tags:
788 818
                 - external

+ 6
- 0
releasenotes/notes/named-debug-tasks-start-at-task-28e4ff92ceec85d2.yaml View File

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

Loading…
Cancel
Save