From 288a8c59efd71b1b31993c60b9fc5d9678bbacd5 Mon Sep 17 00:00:00 2001 From: Tyler Hale Date: Thu, 25 Aug 2022 16:19:52 -0600 Subject: [PATCH] Adding steps for handling map files --- roles/haproxy/tasks/main.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/roles/haproxy/tasks/main.yml b/roles/haproxy/tasks/main.yml index 34e5fd0..def0b5f 100644 --- a/roles/haproxy/tasks/main.yml +++ b/roles/haproxy/tasks/main.yml @@ -78,6 +78,20 @@ state: yes persistent: yes +- name: Ensure maps directory exists + file: + path: "/etc/haproxy/maps" + state: directory + +- name: Deploy map files + copy: + src: "{{ item }}" + dest: /etc/haproxy/maps + mode: 0644 + with_fileglob: + - "maps/*" + notify: reload haproxy + - name: Update HAProxy configuration template: src: haproxy.cfg.j2