2024-09/extra/wireguard-key-anlegen_changed_when.yml
2024-09-20 15:59:46 +02:00

9 lines
206 B
YAML

---
- 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 != ""