Restart the container if fileChanged is defined
This commit is contained in:
parent
3b47f34642
commit
db4c4fbefd
|
@ -79,6 +79,7 @@
|
|||
loop_control:
|
||||
loop_var: outer_item
|
||||
when: templates_Defined ==1 and outer_item.value.generic is not defined
|
||||
register: fileChanged
|
||||
tags: always
|
||||
|
||||
#Copy templates form a generic dir, allow ansible to search
|
||||
|
@ -90,6 +91,7 @@
|
|||
loop_control:
|
||||
loop_var: outer_item
|
||||
when: templates_Defined ==1 and outer_item.value.generic is defined
|
||||
register: fileChanged
|
||||
tags: always
|
||||
|
||||
- name: Append templated files to the mapping list
|
||||
|
@ -131,6 +133,7 @@
|
|||
loop_control:
|
||||
loop_var: outer_item
|
||||
when: files_Defined == 1 and outer_item.value.generic is not defined and outer_item.value.src_text is not defined
|
||||
register: fileChanged
|
||||
tags: always
|
||||
#Copy files from a generic dir, allow ansible to search
|
||||
- name: "Generic File mappings for {{ container_Name }}"
|
||||
|
@ -141,6 +144,7 @@
|
|||
loop_control:
|
||||
loop_var: outer_item
|
||||
when: files_Defined == 1 and outer_item.value.generic is defined and outer_item.value.src_text is not defined
|
||||
register: fileChanged
|
||||
tags: always
|
||||
#Create files based on the suplied src_text param
|
||||
- name: "Text based file creation for {{ container_Name }}"
|
||||
|
@ -151,6 +155,7 @@
|
|||
loop_control:
|
||||
loop_var: outer_item
|
||||
when: files_Defined == 1 and outer_item.value.src_text is defined
|
||||
register: fileChanged
|
||||
tags: always
|
||||
|
||||
- name: Append static remote files to the mapping list
|
||||
|
@ -192,6 +197,7 @@
|
|||
loop_control:
|
||||
loop_var: outer_item
|
||||
when: local_Defined == 1
|
||||
register: fileChanged
|
||||
tags: always
|
||||
#----------------------------------/LOCAL----------------------------------
|
||||
|
||||
|
@ -208,7 +214,9 @@
|
|||
tags: always
|
||||
#----------------------------------/Check ENV----------------------------------
|
||||
|
||||
|
||||
- name: Restart the container if fileChanged is defined
|
||||
set_fact: item.value.restart='yes'
|
||||
when: fileChanged is defined
|
||||
|
||||
|
||||
- name: "Container {{ container_Name }}"
|
||||
|
|
Loading…
Reference in New Issue