Browse Source

Merge "Split upgrade_steps_playbook into different plays." into stable/stein

tags/10.6.1
Zuul 1 week ago
parent
commit
b3a6ba0bdf
1 changed files with 46 additions and 32 deletions
  1. 46
    32
      common/deploy-steps.j2

+ 46
- 32
common/deploy-steps.j2 View File

@@ -693,19 +693,6 @@ outputs:
693 693
                   with_sequence: start=0 end={{pre_upgrade_rolling_steps_max-1}}
694 694
                   loop_control:
695 695
                     loop_var: step
696
-{%- endfor %}
697
-      upgrade_steps_tasks: |
698
-            - name: ensure /var/lib/config-data exists
699
-              file:
700
-                path: /var/lib/config-data
701
-                state: directory
702
-            - name: ensure we get the right selinux context
703
-              command: chcon -R -t svirt_sandbox_file_t /var/lib/config-data
704
-              args:
705
-                warn: no
706
-{%- for role in roles %}
707
-            - import_tasks: {{role.name}}/upgrade_tasks.yaml
708
-              when: tripleo_role_name == '{{role.name}}'
709 696
 {%- endfor %}
710 697
       upgrade_steps_playbook:
711 698
         str_replace:
@@ -718,30 +705,57 @@ outputs:
718 705
             DEPLOY_IDENTIFIER: {get_param: DeployIdentifier}
719 706
             BOOTSTRAP_SERVER_ID: {get_attr: [BootstrapServerId, value]}
720 707
             ENABLE_DEBUG: {get_param: ConfigDebug}
721
-            ENABLE_PUPPET: {get_param: EnablePuppet}
722
-            DOCKER_PUPPET_DEBUG: {get_param: DockerPuppetDebug}
723
-            DOCKER_PUPPET_PROCESS_COUNT: {get_param: DockerPuppetProcessCount}
724
-            DOCKER_PUPPET_MOUNT_HOST_PUPPET: {get_param: DockerPuppetMountHostPuppet}
725 708
           template: |
709
+            - hosts: DEPLOY_SOURCE_HOST
710
+              name: Gather facts from undercloud
711
+              gather_facts: yes
712
+              become: false
713
+              tags:
714
+                - facts
715
+
716
+            - hosts: DEPLOY_TARGET_HOST
717
+              name: Gather facts from overcloud
718
+              gather_facts: yes
719
+              tags:
720
+                - facts
721
+
722
+            - hosts: all
723
+              name: Load global variables
724
+              gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
725
+              tasks:
726
+                - include_vars: global_vars.yaml
727
+                - name: ensure we get the right selinux context
728
+                  command: chcon -R -t svirt_sandbox_file_t /var/lib/config-data
729
+                  args:
730
+                    warn: no
731
+              tags:
732
+                - always
733
+
734
+{%- for step in range(0,upgrade_steps_max) %}
735
+
726 736
             - hosts: DEPLOY_TARGET_HOST
737
+              name: Upgrade tasks for step {{step}}
738
+              gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
727 739
               any_errors_fatal: yes
740
+              vars:
741
+                bootstrap_server_id: BOOTSTRAP_SERVER_ID
742
+                step: '{{step}}'
743
+                deploy_identifier: DEPLOY_IDENTIFIER
744
+                enable_debug: ENABLE_DEBUG
745
+                container_cli: CONTAINER_CLI
746
+                container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
747
+                container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED
728 748
               tasks:
729
-                - include_tasks: upgrade_steps_tasks.yaml
730
-                  with_sequence: start=0 end={{upgrade_steps_max-1}}
731
-                  vars:
732
-                    bootstrap_server_id: BOOTSTRAP_SERVER_ID
733
-                    deploy_identifier: DEPLOY_IDENTIFIER
734
-                    enable_debug: ENABLE_DEBUG
735
-                    enable_puppet: ENABLE_PUPPET
736
-                    container_cli: CONTAINER_CLI
737
-                    container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
738
-                    container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED
739
-                    docker_puppet_debug: DOCKER_PUPPET_DEBUG
740
-                    docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
741
-                    docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
742
-                  loop_control:
743
-                    loop_var: step
749
+{%- for role in roles %}
750
+                - import_tasks: {{role.name}}/upgrade_tasks_step{{step}}.yaml
751
+                  when: tripleo_role_name == '{{role.name}}'
744 752
                   tags: always
753
+{%- endfor %}
754
+              tags:
755
+                - upgrade_steps
756
+                - upgrade_step{{step}}
757
+
758
+{%- endfor %}
745 759
       post_upgrade_steps_tasks: |
746 760
 {%- for role in roles %}
747 761
             - import_tasks: {{role.name}}/post_upgrade_tasks.yaml

Loading…
Cancel
Save