Fix idempotency/recurrence of download and preinstall
* Don't push containers if not changed
* Do preinstall role only once and redistribute defaults to
corresponding roles
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
when:ansible_os_family != "CoreOS" and download_run_once|bool and download.enabled|bool and download.container|bool
when:ansible_os_family != "CoreOS" and download_run_once|bool and download.enabled|bool and download.container|bool and container_changed|bool
- name:Download | get container images
- name:Download | get container images
synchronize:
synchronize:
@ -76,8 +87,8 @@
until:get_task|success
until:get_task|success
retries:4
retries:4
delay:"{{ retry_stagger | random + 3 }}"
delay:"{{ retry_stagger | random + 3 }}"
when:ansible_os_family != "CoreOS" and inventory_hostname != groups['kube-master'][0] and download_run_once|bool and download.enabled|bool and download.container|bool
when:ansible_os_family != "CoreOS" and inventory_hostname != groups['kube-master'][0] and download_run_once|bool and download.enabled|bool and download.container|bool and container_changed|bool
- name:Download | load container images
- name:Download | load container images
shell:docker load < "{{ fname }}"
shell:docker load < "{{ fname }}"
when:ansible_os_family != "CoreOS" and inventory_hostname != groups['kube-master'][0] and download_run_once|bool and download.enabled|bool and download.container|bool
when:ansible_os_family != "CoreOS" and inventory_hostname != groups['kube-master'][0] and download_run_once|bool and download.enabled|bool and download.container|bool and container_changed|bool