2024-11/extra/wireguard-key-anlegen_changed_when.yml

9 lines
206 B
YAML
Raw Normal View History

2024-11-28 08:56:02 +00:00
---
- hosts: localhost
gather_facts: no
tasks:
- shell: "[ ! -f wg.pub ] && wg genkey | tee wg.priv | wg pubkey | tee wg.pub || true"
register: output
changed_when: output.stdout != ""