ITOPSENG-164 Debug some changes to logic

This commit is contained in:
Glenn Stewart
2019-10-15 10:50:48 +11:00
parent 2ac847dd3a
commit 46e3665cd5

View File

@@ -159,18 +159,20 @@
- completed_lock.stat.isdir is defined - completed_lock.stat.isdir is defined
- completed_lock.stat.isdir - completed_lock.stat.isdir
# If the binary was never installed, download it to temp location # Fetch binary if required
- name: Installer not on home_shared. Fetch it. - name: download_binary is true so fetch and do all the things
block:
- 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
when: download_binary
# If product installer was fetched make the moving directory # If product installer was fetched make the moving 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
@@ -178,23 +180,25 @@
- 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
# - Move binary # - 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
# Directory lock was either already created or could not be # Directory lock was either already created or could not be
# - Continue and install from temp # - Continue and install from temp
- name: Continue Scenario - lock cannot be created or created by previous run - name: Continue Scenario - lock cannot be created or created by previous run
debug: debug:
msg: lock not created msg: lock not created
when: moving_lock_created is not succeeded or when: moving_lock_created is not succeeded or
( moving_lock_created is succeeded and moving_lock_created.changed == False ) ( moving_lock_created is succeeded and moving_lock_created.changed == False )
when: download_binary
# Move binary block # Move binary block
- name: Move product installer to home_shared - name: Move product installer to home_shared