ens18 is the new interface for swarm need to put this in a param
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
|
||||
vars:
|
||||
join_addr:
|
||||
"{{ hostvars[groups['swarm-bootstrap'][0]].ansible_eth0.ipv4.address }}"
|
||||
"{{ hostvars[groups['swarm-bootstrap'][0]].ansible_ens18.ipv4.address }}"
|
||||
manager_key:
|
||||
"{{ hostvars[groups['swarm-bootstrap'][0]]['manager_key']['stdout'] }}"
|
||||
tasks:
|
||||
@@ -61,7 +61,7 @@
|
||||
ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
|
||||
vars:
|
||||
join_addr:
|
||||
"{{ hostvars[groups['swarm-bootstrap'][0]].ansible_eth0.ipv4.address }}"
|
||||
"{{ hostvars[groups['swarm-bootstrap'][0]].ansible_ens18.ipv4.address }}"
|
||||
worker_key:
|
||||
"{{ hostvars[groups['swarm-bootstrap'][0]]['worker_key']['stdout'] }}"
|
||||
tasks:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: Initialize swarm on the bootstrap manager
|
||||
command: >
|
||||
docker swarm init --advertise-addr "{{ ansible_eth0.ipv4.address }}"
|
||||
docker swarm init --advertise-addr "{{ ansible_ens18.ipv4.address }}"
|
||||
register: docker_swarm_init
|
||||
changed_when: docker_swarm_init.rc == 0
|
||||
ignore_errors: true
|
||||
@@ -19,4 +19,4 @@
|
||||
- name: Set work and manager key facts
|
||||
set_fact:
|
||||
manager_key: "{{ manager_key }}"
|
||||
worker_key: "{{ worker_key }}"
|
||||
worker_key: "{{ worker_key }}"
|
||||
|
||||
Reference in New Issue
Block a user