IamTheFij
57efee14e9
Splits servers and clients to their own groups so that plays can target specific roles. Prior, everything was "both", but i want to and another server for recovery purposes but not host containers on it.
28 lines
482 B
YAML
28 lines
482 B
YAML
- name: Restart nomad and wesher
|
|
hosts: nomad_instances
|
|
|
|
tasks:
|
|
- name: Stop Nomad
|
|
systemd:
|
|
name: nomad
|
|
state: stopped
|
|
become: true
|
|
|
|
- name: Restart wesher
|
|
systemd:
|
|
name: wesher
|
|
state: restarted
|
|
become: true
|
|
|
|
- name: Start Docker
|
|
systemd:
|
|
name: docker
|
|
state: started
|
|
become: true
|
|
|
|
- name: Start Nomad
|
|
systemd:
|
|
name: nomad
|
|
state: started
|
|
become: true
|