From a5c8e001294284d270e7213dcfea3fb117fb01dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Franti=C5=A1ek=20=C5=98ezn=C3=AD=C4=8Dek?=
 <246254@mail.muni.cz>
Date: Fri, 31 May 2024 17:20:08 +0200
Subject: [PATCH] refactor: installing haproxy on bastion requires explicit apt
 update (moving to ubuntu/debian specific ansible module)

---
 ansible/01-playbook/roles/haproxy/tasks/main.yaml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/ansible/01-playbook/roles/haproxy/tasks/main.yaml b/ansible/01-playbook/roles/haproxy/tasks/main.yaml
index 071ec11..0a253d0 100644
--- a/ansible/01-playbook/roles/haproxy/tasks/main.yaml
+++ b/ansible/01-playbook/roles/haproxy/tasks/main.yaml
@@ -1,6 +1,12 @@
 ---
+#- name: Ensure HAProxy is installed.
+#  package: name=haproxy state=present
+
 - name: Ensure HAProxy is installed.
-  package: name=haproxy state=present
+  ansible.builtin.apt:
+    update_cache: true
+    name: haproxy
+    state: present
 
 - name: Ensure HAProxy is enabled (so init script will start it on Debian).
   lineinfile:
-- 
GitLab