-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* removed commented line and extra line * Added role docker_image_pull and playbook to pull all images * changed delegate to docker_swarm_nodes for image pull
- Loading branch information
Showing
4 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- hosts: docker_services | ||
# no need for gathered facts to push the image | ||
gather_facts: no | ||
roles: | ||
- role: docker_image_pull |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dependencies: | ||
- role: docker_login |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- name: pull images on all hosts | ||
docker_image: | ||
name: "{{ repository_deploy_image }}" | ||
source: pull | ||
loop: "{{ groups['docker_swarm_nodes'] }}" | ||
delegate_to: "{{ item }}" | ||
become: "{{ docker_become_user is defined }}" | ||
become_user: "{{ docker_become_user|default(omit) }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
--- | ||
- name: pull images on all hosts | ||
docker_image: | ||
#name: "{{ repository }}:443/{{ docker_image_name }}:{{ version }}" | ||
name: "{{ repository_deploy_image }}" | ||
source: pull | ||
loop: "{{ groups['docker_swarm_managers'] }}" | ||
loop: "{{ groups['docker_swarm_nodes'] }}" | ||
delegate_to: "{{ item }}" | ||
become: "{{ docker_become_user is defined }}" | ||
become_user: "{{ docker_become_user|default(omit) }}" | ||
|