]> git.ekhem.eu.org Git - metadata.git/commitdiff
[fail2ban] Expand environment variables in configuration files.
authorJakub Czajka <jakub@ekhem.eu.org>
Sun, 7 Jan 2024 09:49:51 +0000 (10:49 +0100)
committerJakub Czajka <jakub@ekhem.eu.org>
Sun, 7 Jan 2024 09:49:51 +0000 (10:49 +0100)
server.git/fail2ban.yaml

index 9a4d3b844d8ea329164defd52cb53e75648dcd5e..28e1f338ba3dbccc84696edafefd036f6654673b 100644 (file)
         fail2ban/*
       become: true
     - name: Copy files from /tmp to /etc/fail2ban
-      copy:
-        src: /tmp/fail2ban/{{ item }}
-        dest: /etc/fail2ban
-        remote_src: true
+      shell: envsubst < /tmp/fail2ban/{{ item }} > /etc/fail2ban/{{ item }}
+      environment: "{{ ansible_local.env.vars }}"
       become: true
       with_items:
         - fail2ban.local