Merge branch 'master' of git.hackbever.be:Chewing_Bever/ansible-debian
commit
80619bef74
|
@ -1 +1,3 @@
|
|||
.vagrant/
|
||||
|
||||
*hosts.ini
|
||||
|
|
3
main.yml
3
main.yml
|
@ -12,21 +12,18 @@
|
|||
|
||||
- name: Initialize Docker swarm.
|
||||
hosts: admin
|
||||
become: yes
|
||||
roles:
|
||||
- docker-swarm-init
|
||||
tags: swarm
|
||||
|
||||
- name: Add managers to swarm.
|
||||
hosts: managers
|
||||
become: yes
|
||||
roles:
|
||||
- docker-swarm-add-manager
|
||||
tags: swarm
|
||||
|
||||
- name: Add workers to swarm.
|
||||
hosts: workers
|
||||
become: yes
|
||||
roles:
|
||||
- docker-swarm-add-worker
|
||||
tags: swarm
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
register: node_state
|
||||
shell: "docker info --format '{{ '{{' }}.Swarm.LocalNodeState{{ '}}' }}'"
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
||||
- name: Add managers to the swarm
|
||||
shell: >
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
register: node_state
|
||||
shell: "docker info --format '{{ '{{' }}.Swarm.LocalNodeState{{ '}}' }}'"
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
||||
- name: Add worker to swarm.
|
||||
register: join_cmd
|
||||
|
|
Loading…
Reference in New Issue