Fix linter issues
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
eec95be2de
commit
43ebb7b044
9 changed files with 33 additions and 23 deletions
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: Create ClusterSwarm group
|
||||
group_by: key=ClusterSwarm
|
||||
ansible.builtin.group_by: key=ClusterSwarm
|
||||
when:
|
||||
- docker_swarmmode
|
||||
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
check_mode: false
|
||||
|
||||
- name: Create Master Swarm group
|
||||
group_by: key=MasterSwarm
|
||||
gansible.builtin.roup_by: key=MasterSwarm
|
||||
when:
|
||||
- '"Swarm: active" in docker_info.stdout'
|
||||
- '" Is Manager: true" in docker_info.stdout'
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
- inventory_hostname == groups['ClusterSwarm'][0]
|
||||
|
||||
- name: Add the new master to MasterSwarm group
|
||||
add_host:
|
||||
ansible.builtin.add_host:
|
||||
name: '{{ inventory_hostname }}'
|
||||
groups: MasterSwarm
|
||||
when:
|
||||
|
|
@ -96,7 +96,7 @@
|
|||
# inventory_hostname in groups[docker_swarm_workers_ansible_group] and
|
||||
# 'Swarm: active' not in docker_info.stdout and
|
||||
# 'Swarm: pending' not in docker_info.stdout
|
||||
#
|
||||
#
|
||||
###############
|
||||
# - name: Initialize Swarm Master
|
||||
# hosts: swarm-master
|
||||
|
|
@ -111,7 +111,10 @@
|
|||
# hosts: swarm-nodes
|
||||
# gather_facts: yes
|
||||
# tasks:
|
||||
# - ansible.builtin.command: "docker swarm join --advertise-addr {{inventory_hostname}} --token {{hostvars[groups['swarm-master'][0]].swarmtoken}} {{hostvars[groups['swarm-master'][0]].inventory_hostname}}:2377"
|
||||
# - ansible.builtin.command: >
|
||||
# docker swarm join --advertise-addr {{inventory_hostname}}
|
||||
# --token {{hostvars[groups['swarm-master'][0]].swarmtoken}}
|
||||
# {{hostvars[groups['swarm-master'][0]].inventory_hostname}}:2377
|
||||
#
|
||||
## - name: Leave Swarm
|
||||
## hosts: swarm-master:swarm-nodes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue