diff options
| author | Ahmed Abdelhalim <[email protected]> | 2025-09-20 20:55:03 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2025-09-20 20:55:03 +0200 |
| commit | 19a7d7053b721a22b805ba7a9daff1cb7a70a630 (patch) | |
| tree | e5f394ec8e01d66f3aa7e944d356a4bbb1509711 /roles/wireguard | |
| parent | 534e7486f3db1f56e9a4f54572c8724c2aca88f4 (diff) | |
Migrate to the new loop syntax
Diffstat (limited to 'roles/wireguard')
| -rw-r--r-- | roles/wireguard/tasks/main.yml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/roles/wireguard/tasks/main.yml b/roles/wireguard/tasks/main.yml index a0f0cca1..070e73d2 100644 --- a/roles/wireguard/tasks/main.yml +++ b/roles/wireguard/tasks/main.yml @@ -17,7 +17,7 @@ group: "root" mode: "0600" backup: true - with_items: "{{ wireguard_connections.keys() }}" + loop: "{{ wireguard_connections.keys() }}" when: wireguard_connections | length > 0 tags: - molecule-idempotence-notest @@ -31,12 +31,12 @@ name: "wg-quick@{{ item }}" enabled: false state: "stopped" - with_items: "{{ wireguard_connections.keys() | list }}" + loop: "{{ wireguard_connections.keys() | list }}" - name: "Ensure all wireguard interfaces are down" ansible.builtin.command: cmd: "wg-quick down {{ item }}" - with_items: "{{ wireguard_connections.keys() | list }}" + loop: "{{ wireguard_connections.keys() | list }}" changed_when: false failed_when: false |
