ITOPSENG-164 yamllint fixes

This commit is contained in:
Glenn Stewart
2019-10-16 14:37:05 +11:00
parent 5f2e5929ab
commit 1dedfa827e

View File

@@ -163,34 +163,34 @@
- name: download_binary is true so fetch and do all the things - name: download_binary is true so fetch and do all the things
block: block:
# Fetch binary and copy to temp # Fetch binary and copy to temp
- name: Fetch binary - name: Fetch binary
get_url: get_url:
url: "{{ atl_product_download_url }}" url: "{{ atl_product_download_url }}"
dest: "{{ atl_product_temp_download }}" dest: "{{ atl_product_temp_download }}"
mode: 0755 mode: 0755
force: false force: false
register: atl_product_completed register: atl_product_completed
# If product installer was fetched make the lock directory # If product installer was fetched make the lock directory
- name: Create moving_lock. - name: Create moving_lock.
file: file:
path: "{{ atl_product_home_shared_moving_lock }}" path: "{{ atl_product_home_shared_moving_lock }}"
state: directory state: directory
when: when:
- atl_product_completed is succeeded - atl_product_completed is succeeded
register: moving_lock_created register: moving_lock_created
# Directory lock was created by this run? # Directory lock was created by this run?
# If so, then set a fact intending to move binary # If so, then set a fact intending to move binary
- name: Move binary Scenario - lock created by this run - name: Move binary Scenario - lock created by this run
set_fact: set_fact:
move_binary: true move_binary: true
when: when:
- moving_lock_created is succeeded - moving_lock_created is succeeded
- moving_lock_created.changed == True - moving_lock_created.changed == True
# Otherwise directory lock was either already created or # Otherwise directory lock was either already created or
# could not be created. Fall back is to continue and install from temp # could not be created. Fall back is to continue and install from temp
when: download_binary when: download_binary
@@ -198,43 +198,43 @@
- name: Move product installer to home_shared - name: Move product installer to home_shared
block: block:
- name: Copy temp installer to home_shared - name: Copy temp installer to home_shared
copy: copy:
src: "{{ atl_product_temp_download }}" src: "{{ atl_product_temp_download }}"
dest: "{{ atl_product_home_shared_download }}" dest: "{{ atl_product_home_shared_download }}"
remote_src: true remote_src: true
when: when:
- moving_lock_created is succeeded - moving_lock_created is succeeded
- moving_lock_created.changed == True - moving_lock_created.changed == True
register: copied register: copied
- name: Create completed_lock once product installer downloaded and copied - name: Create completed_lock once product installer downloaded and copied
file: file:
path: "{{ atl_product_home_shared_completed_lock }}" path: "{{ atl_product_home_shared_completed_lock }}"
state: directory state: directory
when: copied is succeeded when: copied is succeeded
register: completed_lock_created register: completed_lock_created
- name: Remove moving_lock to show that binary is completed - name: Remove moving_lock to show that binary is completed
file: file:
path: "{{ atl_product_home_shared_moving_lock }}" path: "{{ atl_product_home_shared_moving_lock }}"
state: absent state: absent
when: when:
- completed_lock_created is succeeded - completed_lock_created is succeeded
- copied is succeeded - copied is succeeded
register: moving_lock_removed register: moving_lock_removed
- name: Delete old temp installer - name: Delete old temp installer
file: file:
path: "{{ atl_product_temp_download }}" path: "{{ atl_product_temp_download }}"
state: absent state: absent
when: moving_lock_removed is succeeded when: moving_lock_removed is succeeded
register: temp_deleted register: temp_deleted
- name: Set install to home_shared location - name: Set install to home_shared location
set_fact: set_fact:
atl_product_download: "{{ atl_product_home_shared_download }}" atl_product_download: "{{ atl_product_home_shared_download }}"
when: temp_deleted is succeeded when: temp_deleted is succeeded
when: move_binary when: move_binary