Cleverer loop

This commit is contained in:
Wojciech Kozlowski 2022-12-20 18:56:02 +01:00
parent 59c5f5a17d
commit 4ec9d5ef96

View File

@ -7,10 +7,10 @@
ansible.builtin.lineinfile: ansible.builtin.lineinfile:
path: "/etc/hosts" path: "/etc/hosts"
line: "127.0.0.1 {{ item }}" line: "127.0.0.1 {{ item }}"
loop: loop: "{{ [system_mail_smtp_server | default([])] |
- "{{ system_mail_smtp_server }}" union( [vpn_wireguard_server_address | default([])] ) |
- "{{ vpn_wireguard_server_address | default('localhost') }}" union( [services_backups_restic_aws_bucket_endpoint | default([])] ) |
- "{{ services_backups_restic_aws_bucket_endpoint | default('localhost') }}" flatten }}"
when: not (the_nine_worlds_production | bool) when: not (the_nine_worlds_production | bool)
tags: "always" tags: "always"