From af1e393e07dc595db72c26b330955cc60a36f922 Mon Sep 17 00:00:00 2001 From: Carlos Camacho Date: Fri, 11 Oct 2019 05:47:15 -0400 Subject: [PATCH] Add missing step tag in updates/upgrades/ffu tasks We are missing some step tags in updates/upgrades/ffu tasks to make the Ansible lint check to work. Change-Id: I7eb07d6b0b3738c63184ab5b900bbf1b2d62da8f --- .../haproxy/haproxy-container-puppet.yaml | 1 + .../tripleo-packages-baremetal-puppet.yaml | 49 ++++++++++--------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/deployment/haproxy/haproxy-container-puppet.yaml b/deployment/haproxy/haproxy-container-puppet.yaml index d037def2c0..88e9c5e7ab 100644 --- a/deployment/haproxy/haproxy-container-puppet.yaml +++ b/deployment/haproxy/haproxy-container-puppet.yaml @@ -315,6 +315,7 @@ outputs: state: directory setype: var_log_t recurse: yes + when: step|int == 1 post_upgrade_tasks: - when: step|int == 1 import_role: diff --git a/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml b/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml index c18b9d4956..ddca7df794 100644 --- a/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml +++ b/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml @@ -402,16 +402,17 @@ outputs: enabled: yes state: started fast_forward_upgrade_tasks: - - name: set is_bootstrap_node fact - set_fact: is_bootstrap_node={{tripleo_packages_short_bootstrap_node_name|lower == ansible_hostname|lower}} - - name: Register repo type and args - set_fact: - fast_forward_repo_type: {get_param: FastForwardRepoType} - fast_forward_repo_args: {get_param: FastForwardRepoArgs} - when: step|int == 3 - - debug: - msg: "fast_forward_repo_type: {{ fast_forward_repo_type }} fast_forward_repo_args: {{ fast_forward_repo_args }}" - when: step|int == 3 + - block: + - name: set is_bootstrap_node fact + set_fact: is_bootstrap_node={{tripleo_packages_short_bootstrap_node_name|lower == ansible_hostname|lower}} + - name: Register repo type and args + set_fact: + fast_forward_repo_type: {get_param: FastForwardRepoType} + fast_forward_repo_args: {get_param: FastForwardRepoArgs} + - debug: + msg: "fast_forward_repo_type: {{ fast_forward_repo_type }} fast_forward_repo_args: {{ fast_forward_repo_args }}" + when: + - step|int == 3 - block: - name: clone tripleo-repos git: @@ -424,9 +425,9 @@ outputs: - name: Enable tripleo-repos command: "tripleo-repos {{ fast_forward_repo_args.tripleo_repos[release] }}" when: - - step|int == 3 - - is_bootstrap_node|bool - - fast_forward_repo_type == 'tripleo-repos' + - step|int == 3 + - is_bootstrap_node|bool + - fast_forward_repo_type == 'tripleo-repos' - block: - name: Create custom Script for upgrading repo. copy: @@ -440,12 +441,15 @@ outputs: - is_bootstrap_node|bool - fast_forward_repo_type == 'custom-script' fast_forward_post_upgrade_tasks: - - name: Register repo type and args - set_fact: - fast_forward_repo_type: {get_param: FastForwardRepoType} - fast_forward_repo_args: {get_param: FastForwardRepoArgs} - - debug: - msg: "fast_forward_repo_type: {{ fast_forward_repo_type }} fast_forward_repo_args: {{ fast_forward_repo_args }}" + - block: + - name: Register repo type and args + set_fact: + fast_forward_repo_type: {get_param: FastForwardRepoType} + fast_forward_repo_args: {get_param: FastForwardRepoArgs} + - debug: + msg: "fast_forward_repo_type: {{ fast_forward_repo_type }} fast_forward_repo_args: {{ fast_forward_repo_args }}" + when: + - step|int == 3 - block: - name: clone tripleo-repos git: @@ -458,9 +462,9 @@ outputs: - name: Enable tripleo-repos command: "tripleo-repos {{ fast_forward_repo_args.tripleo_repos[release] }}" when: - - is_bootstrap_node|bool - - fast_forward_repo_type == 'tripleo-repos' - + - step|int == 3 + - is_bootstrap_node|bool + - fast_forward_repo_type == 'tripleo-repos' - block: - name: Create custom Script for upgrading repo. copy: @@ -470,5 +474,6 @@ outputs: - name: Execute custom script for upgrading repo. shell: "/root/ffu_update_repo.sh {{release}}" when: + - step|int == 3 - is_bootstrap_node|bool - fast_forward_repo_type == 'custom-script'