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

9 lines
206 B
YAML
Raw Permalink Normal View History

2024-09-20 13:59:46 +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 != ""