Browse Source

Merge "Replace include_tasks with import_tasks" into stable/stein

tags/10.6.1
Zuul 1 week ago
parent
commit
11262ef5e6
1 changed files with 25 additions and 25 deletions
  1. 25
    25
      common/deploy-steps.j2

+ 25
- 25
common/deploy-steps.j2 View File

@@ -606,13 +606,15 @@ outputs:
606 606
                 - include_vars: global_vars.yaml
607 607
               tags:
608 608
                 - always
609
+{%- for step in range(external_update_steps_max) %}
609 610
             - hosts: DEPLOY_SOURCE_HOST
610
-              name: External update steps
611
+              name: External update step {{step}}
611 612
               gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
612 613
               any_errors_fatal: yes
613 614
               become: false
614 615
               vars:
615 616
                 bootstrap_server_id: BOOTSTRAP_SERVER_ID
617
+                step: '{{step}}'
616 618
                 deploy_identifier: DEPLOY_IDENTIFIER
617 619
                 enable_debug: ENABLE_DEBUG
618 620
                 enable_puppet: ENABLE_PUPPET
@@ -623,24 +625,24 @@ outputs:
623 625
                 docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
624 626
                 docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
625 627
               tasks:
626
-                - include_tasks: external_update_steps_tasks.yaml
627
-                  with_sequence: start=0 end={{external_update_steps_max-1}}
628
-                  loop_control:
629
-                    loop_var: step
630
-                  tags: always
628
+                - import_tasks: external_update_steps_tasks.yaml
631 629
               tags:
630
+                - step{{step}}
632 631
                 - external
633 632
                 - external_update_steps
633
+{%- endfor %}
634
+{%- for step in range(1,deploy_steps_max) %}
634 635
             # putting both update and deploy tasks in the same
635 636
             # playbook allows influencing the deploy tasks by
636 637
             # variables "exported" from update tasks
637 638
             - hosts: DEPLOY_SOURCE_HOST
638
-              name: External deploy steps
639
+              name: External deploy step {{step}}
639 640
               gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
640 641
               any_errors_fatal: yes
641 642
               become: false
642 643
               vars:
643 644
                 bootstrap_server_id: BOOTSTRAP_SERVER_ID
645
+                step: '{{step}}'
644 646
                 deploy_identifier: DEPLOY_IDENTIFIER
645 647
                 enable_debug: ENABLE_DEBUG
646 648
                 enable_puppet: ENABLE_PUPPET
@@ -651,14 +653,12 @@ outputs:
651 653
                 docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
652 654
                 docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
653 655
               tasks:
654
-                - include_tasks: external_deploy_steps_tasks.yaml
655
-                  with_sequence: start=1 end={{deploy_steps_max-1}}
656
-                  loop_control:
657
-                    loop_var: step
658
-                  tags: always
656
+                - import_tasks: external_deploy_steps_tasks.yaml
659 657
               tags:
658
+                - step{{step}}
660 659
                 - external
661 660
                 - external_deploy_steps
661
+{%- endfor %}
662 662
       pre_upgrade_rolling_steps_tasks: |
663 663
 {%- for role in roles %}
664 664
             - import_tasks: {{role.name}}/pre_upgrade_rolling_tasks.yaml
@@ -832,8 +832,9 @@ outputs:
832 832
                 - include_vars: global_vars.yaml
833 833
               tags:
834 834
                 - always
835
+{%- for step in range(external_upgrade_steps_max) %}
835 836
             - hosts: DEPLOY_SOURCE_HOST
836
-              name: External upgrade
837
+              name: External upgrade step {{step}}
837 838
               gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
838 839
               any_errors_fatal: yes
839 840
               become: false
@@ -841,6 +842,7 @@ outputs:
841 842
                 # Explicit ansible_python_interpreter to allow connecting
842 843
                 # to different OS releases (EL7/8) while using delegate_to.
843 844
                 ansible_python_interpreter: /usr/libexec/platform-python
845
+                step: '{{step}}'
844 846
                 bootstrap_server_id: BOOTSTRAP_SERVER_ID
845 847
                 deploy_identifier: DEPLOY_IDENTIFIER
846 848
                 enable_debug: ENABLE_DEBUG
@@ -852,19 +854,18 @@ outputs:
852 854
                 docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
853 855
                 docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
854 856
               tasks:
855
-                - include_tasks: external_upgrade_steps_tasks.yaml
856
-                  with_sequence: start=0 end={{external_upgrade_steps_max-1}}
857
-                  loop_control:
858
-                    loop_var: step
859
-                  tags: always
857
+                - import_tasks: external_upgrade_steps_tasks.yaml
860 858
               tags:
859
+                - step{{step}}
861 860
                 - external
862 861
                 - external_upgrade_steps
862
+{%- endfor %}
863
+{%- for step in range(1,deploy_steps_max) %}
863 864
             # putting both upgrade and deploy tasks in the same
864 865
             # playbook allows influencing the deploy tasks by
865 866
             # variables "exported" from upgrade tasks
866 867
             - hosts: DEPLOY_SOURCE_HOST
867
-              name: External deploy steps
868
+              name: External deploy step {{step}}
868 869
               gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
869 870
               any_errors_fatal: yes
870 871
               become: false
@@ -872,6 +873,7 @@ outputs:
872 873
                 # Explicit ansible_python_interpreter to allow connecting
873 874
                 # to different OS releases (EL7/8) while using delegate_to.
874 875
                 ansible_python_interpreter: /usr/libexec/platform-python
876
+                step: '{{step}}'
875 877
                 bootstrap_server_id: BOOTSTRAP_SERVER_ID
876 878
                 deploy_identifier: DEPLOY_IDENTIFIER
877 879
                 enable_debug: ENABLE_DEBUG
@@ -883,14 +885,12 @@ outputs:
883 885
                 docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
884 886
                 docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
885 887
               tasks:
886
-                - include_tasks: external_deploy_steps_tasks.yaml
887
-                  with_sequence: start=1 end={{deploy_steps_max-1}}
888
-                  loop_control:
889
-                    loop_var: step
890
-                  tags: always
891
-              tags:
888
+                - import_tasks: external_deploy_steps_tasks.yaml
889
+             tags:
890
+                - step{{step}}
892 891
                 - external
893 892
                 - external_deploy_steps
893
+{%- endfor %}
894 894
       fast_forward_upgrade_playbook:
895 895
         str_replace:
896 896
           params:

Loading…
Cancel
Save