Merge pull request #2646 from Atoms/fix-sync-container
move when condition to main.yml
This commit is contained in:
commit
5d9bb300d7
3 changed files with 4 additions and 13 deletions
|
@ -2,12 +2,11 @@
|
||||||
- name: container_download | Make download decision if pull is required by tag or sha256
|
- name: container_download | Make download decision if pull is required by tag or sha256
|
||||||
include_tasks: set_docker_image_facts.yml
|
include_tasks: set_docker_image_facts.yml
|
||||||
delegate_to: "{{ download_delegate if download_run_once or omit }}"
|
delegate_to: "{{ download_delegate if download_run_once or omit }}"
|
||||||
delegate_facts: no
|
delegate_facts: yes
|
||||||
run_once: "{{ download_run_once }}"
|
run_once: "{{ download_run_once }}"
|
||||||
when:
|
when:
|
||||||
- download.enabled
|
- download.enabled
|
||||||
- download.container
|
- download.container
|
||||||
- group_names | intersect(download.groups) | length
|
|
||||||
tags:
|
tags:
|
||||||
- facts
|
- facts
|
||||||
|
|
||||||
|
@ -24,7 +23,6 @@
|
||||||
- download.enabled
|
- download.enabled
|
||||||
- download.container
|
- download.container
|
||||||
- pull_required|default(download_always_pull)
|
- pull_required|default(download_always_pull)
|
||||||
- group_names | intersect(download.groups) | length
|
|
||||||
delegate_to: "{{ download_delegate }}"
|
delegate_to: "{{ download_delegate }}"
|
||||||
delegate_facts: yes
|
delegate_facts: yes
|
||||||
run_once: yes
|
run_once: yes
|
||||||
|
|
|
@ -22,3 +22,4 @@
|
||||||
- item.value.enabled
|
- item.value.enabled
|
||||||
- item.value.container
|
- item.value.container
|
||||||
- download_run_once
|
- download_run_once
|
||||||
|
- group_names | intersect(download.groups) | length
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
when:
|
when:
|
||||||
- download.enabled
|
- download.enabled
|
||||||
- download.container
|
- download.container
|
||||||
- group_names | intersect(download.groups) | length
|
|
||||||
tags:
|
tags:
|
||||||
- facts
|
- facts
|
||||||
|
|
||||||
|
@ -18,7 +17,7 @@
|
||||||
- download.enabled
|
- download.enabled
|
||||||
- download.container
|
- download.container
|
||||||
- download_run_once
|
- download_run_once
|
||||||
- group_names | intersect(download.groups) | length
|
|
||||||
tags:
|
tags:
|
||||||
- facts
|
- facts
|
||||||
|
|
||||||
|
@ -29,7 +28,6 @@
|
||||||
- download.enabled
|
- download.enabled
|
||||||
- download.container
|
- download.container
|
||||||
- download_run_once
|
- download_run_once
|
||||||
- group_names | intersect(download.groups) | length
|
|
||||||
|
|
||||||
- name: "container_download | Update the 'container_changed' fact"
|
- name: "container_download | Update the 'container_changed' fact"
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -39,7 +37,6 @@
|
||||||
- download.container
|
- download.container
|
||||||
- download_run_once
|
- download_run_once
|
||||||
- pull_required|default(download_always_pull)
|
- pull_required|default(download_always_pull)
|
||||||
- group_names | intersect(download.groups) | length
|
|
||||||
run_once: "{{ download_run_once }}"
|
run_once: "{{ download_run_once }}"
|
||||||
tags:
|
tags:
|
||||||
- facts
|
- facts
|
||||||
|
@ -57,7 +54,6 @@
|
||||||
- download.enabled
|
- download.enabled
|
||||||
- download.container
|
- download.container
|
||||||
- download_run_once
|
- download_run_once
|
||||||
- group_names | intersect(download.groups) | length
|
|
||||||
tags:
|
tags:
|
||||||
- facts
|
- facts
|
||||||
|
|
||||||
|
@ -73,7 +69,6 @@
|
||||||
- download_run_once
|
- download_run_once
|
||||||
- (ansible_os_family not in ["CoreOS", "Container Linux by CoreOS"] or download_delegate == "localhost")
|
- (ansible_os_family not in ["CoreOS", "Container Linux by CoreOS"] or download_delegate == "localhost")
|
||||||
- (container_changed or not img.stat.exists)
|
- (container_changed or not img.stat.exists)
|
||||||
- group_names | intersect(download.groups) | length
|
|
||||||
|
|
||||||
- name: container_download | copy container images to ansible host
|
- name: container_download | copy container images to ansible host
|
||||||
synchronize:
|
synchronize:
|
||||||
|
@ -93,7 +88,6 @@
|
||||||
- inventory_hostname == download_delegate
|
- inventory_hostname == download_delegate
|
||||||
- download_delegate != "localhost"
|
- download_delegate != "localhost"
|
||||||
- saved.changed
|
- saved.changed
|
||||||
- group_names | intersect(download.groups) | length
|
|
||||||
|
|
||||||
- name: container_download | upload container images to nodes
|
- name: container_download | upload container images to nodes
|
||||||
synchronize:
|
synchronize:
|
||||||
|
@ -115,7 +109,6 @@
|
||||||
- (ansible_os_family not in ["CoreOS", "Container Linux by CoreOS"] and
|
- (ansible_os_family not in ["CoreOS", "Container Linux by CoreOS"] and
|
||||||
inventory_hostname != download_delegate or
|
inventory_hostname != download_delegate or
|
||||||
download_delegate == "localhost")
|
download_delegate == "localhost")
|
||||||
- group_names | intersect(download.groups) | length
|
|
||||||
tags:
|
tags:
|
||||||
- upload
|
- upload
|
||||||
- upgrade
|
- upgrade
|
||||||
|
@ -128,7 +121,6 @@
|
||||||
- download_run_once
|
- download_run_once
|
||||||
- (ansible_os_family not in ["CoreOS", "Container Linux by CoreOS"] and
|
- (ansible_os_family not in ["CoreOS", "Container Linux by CoreOS"] and
|
||||||
inventory_hostname != download_delegate or download_delegate == "localhost")
|
inventory_hostname != download_delegate or download_delegate == "localhost")
|
||||||
- group_names | intersect(download.groups) | length
|
|
||||||
tags:
|
tags:
|
||||||
- upload
|
- upload
|
||||||
- upgrade
|
- upgrade
|
||||||
|
|
Loading…
Reference in a new issue