mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 13:46:59 +01:00
Cleanup fetched tinc certificates
This commit is contained in:
parent
6ad25c79f6
commit
30b83f9067
1 changed files with 24 additions and 14 deletions
|
|
@ -93,21 +93,31 @@
|
||||||
notify:
|
notify:
|
||||||
- restart tinc
|
- restart tinc
|
||||||
|
|
||||||
- name: Fetch tinc hosts file after key creation
|
- block:
|
||||||
fetch:
|
- name: Fetch tinc hosts file after key creation
|
||||||
src: /etc/tinc/{{ netname }}/hosts/{{ inventory_hostname }}
|
fetch:
|
||||||
dest: fetch/{{ inventory_hostname }}
|
src: /etc/tinc/{{ netname }}/hosts/{{ inventory_hostname }}
|
||||||
flat: yes
|
dest: fetch/{{ inventory_hostname }}
|
||||||
notify:
|
flat: yes
|
||||||
- reload tinc
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Sync the fetched tinc hosts files on each host
|
||||||
|
synchronize:
|
||||||
|
src: fetch/
|
||||||
|
dest: /etc/tinc/{{ netname }}/hosts/
|
||||||
|
use_ssh_args: yes
|
||||||
|
notify:
|
||||||
|
- reload tinc
|
||||||
|
|
||||||
|
always:
|
||||||
|
- name: Remove fetched files
|
||||||
|
local_action:
|
||||||
|
module: file
|
||||||
|
path: fetch
|
||||||
|
state: absent
|
||||||
|
run_once: True
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: Sync the fetched tinc hosts files on each host
|
|
||||||
synchronize:
|
|
||||||
src: fetch/
|
|
||||||
dest: /etc/tinc/{{ netname }}/hosts/
|
|
||||||
use_ssh_args: yes
|
|
||||||
notify:
|
|
||||||
- reload tinc
|
|
||||||
|
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue