Properly solve ansible-lint 306 warning about shell task with pipe

Do not ignore such warnings! They are there for a reason!
This commit is contained in:
Robin Schneider 2020-09-13 23:15:28 +02:00
parent 713a7683ef
commit a56a4d6600
No known key found for this signature in database
GPG key ID: A81E8006DC95EFE6

View file

@ -80,7 +80,9 @@
when: wireguard__register_config_file.stat.exists
- name: Derive WireGuard public key
shell: "echo '{{ wireguard__fact_private_key }}' | wg pubkey" # noqa 306
command: "wg pubkey"
args:
stdin: "{{ wireguard__fact_private_key }}"
register: wireguard__register_public_key
changed_when: false
tags: