Skip to content

Commit

Permalink
fix playbook node setup order
Browse files Browse the repository at this point in the history
  • Loading branch information
rikukissa committed Feb 9, 2024
1 parent 8a093fb commit aab5be4
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions infrastructure/server-setup/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,6 @@
tags:
- traefik

- name: Label nodes
shell: docker node update --label-add {{ hostvars[hostname]['data_label'] }}=true {{ hostname }}
loop: "{{ groups['docker-manager-first'] + groups['docker-workers'] }}"
loop_control:
loop_var: hostname
when: hostvars[hostname]['data_label'] is defined

- hosts: docker-workers
become: yes
become_method: sudo
Expand All @@ -183,4 +176,15 @@
retries: 3
delay: 20

- hosts: docker-manager-first
become: yes
become_method: sudo
tasks:
- name: Label nodes
shell: docker node update --label-add {{ hostvars[hostname]['data_label'] }}=true {{ hostname }}
loop: "{{ groups['docker-manager-first'] + groups['docker-workers'] }}"
loop_control:
loop_var: hostname
when: hostvars[hostname]['data_label'] is defined

- import_playbook: backups.yml

0 comments on commit aab5be4

Please sign in to comment.