mirror of
https://github.com/Crocmagnon/ansible.git
synced 2024-12-22 14:01:58 +01:00
50 lines
1.9 KiB
YAML
50 lines
1.9 KiB
YAML
---
|
|
- name: Lyon-transports
|
|
hosts: servers
|
|
gather_facts: false
|
|
tasks:
|
|
- name: Write service file
|
|
become: true
|
|
ansible.builtin.template:
|
|
src: templates/lyon-transports/lyon-transports.service.j2
|
|
dest: /etc/systemd/system/lyon-transports.service
|
|
mode: "0600"
|
|
owner: root
|
|
group: root
|
|
notify:
|
|
- Restart service
|
|
- name: Flush handlers
|
|
ansible.builtin.meta: flush_handlers
|
|
- name: Ensure service is running
|
|
become: true
|
|
ansible.builtin.service:
|
|
name: lyon-transports
|
|
state: started
|
|
enabled: true
|
|
|
|
handlers:
|
|
- name: Restart service
|
|
become: true
|
|
ansible.builtin.systemd:
|
|
name: lyon-transports
|
|
state: restarted
|
|
daemon_reload: true
|
|
|
|
vars:
|
|
dir: /mnt/data/lyon-transports
|
|
lyon_transports_password: !vault |
|
|
$ANSIBLE_VAULT;1.1;AES256
|
|
35356364616633356164376433623139333165626433303437666266613762643239373730616131
|
|
6463316639393663396462383461306330636531663166380a623166666631303361346333323363
|
|
62656138313133323637356363313564323634616363333237336338633365333236363637396432
|
|
3566303038333234650a343861366331346532666532666363323863326461313639303238623039
|
|
64326435353962616464666663613763316662326432363334383363336539356639323632623132
|
|
63306638663038326364626132616161616665393132316163616638646539346466313562346330
|
|
396162653537663634316439386636393534
|
|
lyon_transports_username: !vault |
|
|
$ANSIBLE_VAULT;1.1;AES256
|
|
35646462383237353130323736613632336664643633396163363561396562623963313664383666
|
|
6239376430316663303836656230396636626533323361320a353637666362646364636431653862
|
|
39613062303438356436613733396164646662333938353433313135356531373139323939653335
|
|
3730663430656439640a613532326434343438656330363964303766363666393962393065663938
|
|
30643033303263346538353564333535656437336639336461363261623435656131
|