Show reminder when key generated
This commit is contained in:
parent
768c54b227
commit
34f33e820d
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
shell: umask 077 && wg genkey | tee /etc/wireguard/privatekey | wg pubkey > /etc/wireguard/publickey
|
||||
args:
|
||||
creates: /etc/wireguard/publickey
|
||||
register: key_generation
|
||||
notify:
|
||||
- Restart Wireguard service
|
||||
|
||||
|
@ -24,7 +25,6 @@
|
|||
set_fact:
|
||||
public_key: "{{ public_key_slurp.content | b64decode }}"
|
||||
|
||||
|
||||
- name: Ensure Wireguard client is configured
|
||||
template:
|
||||
src: templates/wireguard_client.conf
|
||||
|
@ -43,6 +43,7 @@
|
|||
- name: Show public key reminder
|
||||
debug:
|
||||
msg: "Remember to add this host '{{ inventory_hostname }}'' public key to the inventory '{{ public_key }}'"
|
||||
when: key_generation.changed
|
||||
|
||||
- name: Ensure cron to ping VPN server exists
|
||||
cron:
|
||||
|
|
Loading…
Reference in a new issue