Skip to content

Commit

Permalink
Why wont ansible work
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo committed Jun 28, 2024
1 parent 8f83744 commit 4501aa2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions automation/playbooks/initialize_worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,29 @@
pkg:
- nfs-common

- name: 'Change timezone to Toronto time'
shell: timedatectl set-timezone America/Toronto

- name: 'Installing docker'
include_role:
name: geerlingguy.docker

- name: Join Docker Swarm
become: yes
- name: 'Change timezone to Toronto time'
shell: timedatectl set-timezone America/Toronto

- name: 'Get Swarm join token from manager'
tasks:
- name: Get Swarm join token from manager
shell: docker swarm join-token worker
register: join_token
delegate_to: "{{ groups['managers'] | random }}" # Run on the first manager node

- name: Join the Swarm as a worker
- name: 'Join the Swarm as a worker'
community.docker.docker_swarm:
state: join
join_token: "{{ join_token.stdout_lines[0] }}"
advertise_addr: "{{ groups['managers'][0] }}" # Use Docker factP



- name: 'Mount problem data nfs share'
- name: 'Mount nfs share'
file:
path: /var/share
state: directory
Expand Down

0 comments on commit 4501aa2

Please sign in to comment.