From 3ed48340b3553a811fdc948c467e902f3a3c1e1a Mon Sep 17 00:00:00 2001 From: Glenn Stewart Date: Thu, 10 Oct 2019 16:52:51 +1100 Subject: [PATCH] ITOPSENG-164 Yamllint fix --- roles/product_install/tasks/main.yml | 81 ++++++++++++++-------------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/roles/product_install/tasks/main.yml b/roles/product_install/tasks/main.yml index 94cd6ba..8a90eb3 100644 --- a/roles/product_install/tasks/main.yml +++ b/roles/product_install/tasks/main.yml @@ -126,15 +126,18 @@ dest: "{{ atl_product_version_cache }}" force: true -# For the first run a temp binary should be downloaded but moved to shared home to ensure all subsequent nodes have access +# For the first run a temp binary should be downloaded but moved to +# shared home to ensure all subsequent nodes have access # to the same specific version binary. -# To prevent a race condition with multiple downloads at the same time a directory is used as a lockfile (atomic operation). +# To prevent a race condition with multiple downloads at the same time +# a directory is used as a lockfile (atomic operation). - name: Assume temp binary should be downloaded set_fact: - download_binary: yes + download_binary: true -# Check for product installer in home_shared and lockdir to determine if it needs to be downloaded again. +# Check for product installer in home_shared and lockdir to determine +# if it needs to be downloaded again. - name: Check download lock directory exists stat: path: "{{ atl_product_home_shared_download_lockdir }}" @@ -148,51 +151,51 @@ # If binary exists and lockdir exists use this binary instead - name: Check Lock Directory and binary exists on shared_home set_fact: - download_binary: no + download_binary: false when: - - home_shared_downloaded.stat.exists - - download_lockdir.stat.isdir is defined - - download_lockdir.stat.isdir + - home_shared_downloaded.stat.exists + - download_lockdir.stat.isdir is defined + - download_lockdir.stat.isdir # If the binary was never installed, download it - name: "Download product installer and move to shared directory" block: - - name: Fetch product installer - get_url: - url: "{{ atl_product_download_url }}" - dest: "{{ atl_product_download }}" - mode: 0755 - force: false - register: atl_product_downloaded + - name: Fetch product installer + get_url: + url: "{{ atl_product_download_url }}" + dest: "{{ atl_product_download }}" + mode: 0755 + force: false + register: atl_product_downloaded - - name: Remove lockdir to prevent nodes relying on binary when copying - file: - path: "{{ atl_product_home_shared_download_lockdir }}" - state: absent - when: atl_product_downloaded is succeeded - register: lockdir_removed + - name: Remove lockdir to prevent nodes relying on binary when copying + file: + path: "{{ atl_product_home_shared_download_lockdir }}" + state: absent + when: atl_product_downloaded is succeeded + register: lockdir_removed - - name: Copy temp installer to home_shared - copy: - src: "{{ atl_product_download }}" - dest: "{{ atl_product_home_shared_download }}" - remote_src: yes - when: lockdir_removed is succeeded - register: copied + - name: Copy temp installer to home_shared + copy: + src: "{{ atl_product_download }}" + dest: "{{ atl_product_home_shared_download }}" + remote_src: true + when: lockdir_removed is succeeded + register: copied - - name: Delete old temp installer - file: - path: "{{ atl_product_download }}" - state: absent - when: copied is succeeded - register: temp_deleted + - name: Delete old temp installer + file: + path: "{{ atl_product_download }}" + state: absent + when: copied is succeeded + register: temp_deleted - - name: Create lockdir once product installer downloaded and moved - file: - path: "{{ atl_product_home_shared_download_lockdir }}" - state: directory - when: temp_deleted is succeeded + - name: Create lockdir once product installer downloaded and moved + file: + path: "{{ atl_product_home_shared_download_lockdir }}" + state: directory + when: temp_deleted is succeeded when: download_binary