1
0
Fork 0

remove unneeded with_inventory_hostnames loops (#27)

* remove unneeded with_inventory_hostnames loops

* update CHANGELOG
This commit is contained in:
Robert Wimmer 2019-09-26 22:36:36 +02:00 committed by GitHub
parent fa595d8f35
commit 9a0e70ee25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -1,6 +1,10 @@
Changelog
---------
**3.2.2**
- remove unneeded `with_inventory_hostnames` loops (thanks to pierreozoux for initial PR)
**3.2.1**
- remove unecessary files (contribution by pierreozoux)

View file

@ -67,8 +67,6 @@
- name: Generate WireGuard private key
shell: "wg genkey"
register: wg_private_key_result
with_inventory_hostnames:
- vpn
when: not private_key_file_stat.stat.exists
tags:
- wg-generate-keys
@ -76,7 +74,7 @@
- name: Set private key fact
set_fact:
wg_private_key: "{{ wg_private_key_result.results[0].stdout }}"
wg_private_key: "{{ wg_private_key_result.stdout }}"
when: not private_key_file_stat.stat.exists
tags:
- wg-generate-keys
@ -85,14 +83,12 @@
shell: "echo '{{ wg_private_key }}' | wg pubkey"
register: wg_public_key_result
when: not private_key_file_stat.stat.exists
with_inventory_hostnames:
- vpn
tags:
- wg-generate-keys
- name: Set public key fact
set_fact:
wg_public_key: "{{ wg_public_key_result.results[0].stdout }}"
wg_public_key: "{{ wg_public_key_result.stdout }}"
when: not private_key_file_stat.stat.exists
tags:
- wg-generate-keys