From 9a0e70ee25a5376a52658b97dd4b19bf4495db8f Mon Sep 17 00:00:00 2001 From: Robert Wimmer <2039811+githubixx@users.noreply.github.com> Date: Thu, 26 Sep 2019 22:36:36 +0200 Subject: [PATCH] remove unneeded with_inventory_hostnames loops (#27) * remove unneeded with_inventory_hostnames loops * update CHANGELOG --- CHANGELOG.md | 4 ++++ tasks/main.yml | 8 ++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d85f188..4ad5178 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/tasks/main.yml b/tasks/main.yml index 3c3ac6e..dea3068 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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