From 156c60c8fa917f0148cce3bc137fa4c8290615cf Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Wed, 22 Oct 2025 15:34:42 +0200 Subject: [PATCH] add requirements && create config file --- tasks/configure.yml | 8 ++++++++ tasks/main.yml | 3 +++ tasks/requirements.yml | 9 +++++++++ 3 files changed, 20 insertions(+) create mode 100644 tasks/requirements.yml diff --git a/tasks/configure.yml b/tasks/configure.yml index b923d41..a743605 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -10,6 +10,14 @@ - '/etc/haproxy/ssl/certs' - '/etc/haproxy/ssl/self' +- name: haproxy | create ACL file + file: + path: /etc/haproxy/without_ssl.txt + state: touch + owner: root + group: root + mode: '0644' + - name: haproxy | create default self-signed certificate shell: | openssl req -newkey rsa:2048 -nodes -sha256 -x509 -subj "{{ haproxy_ssl_self_signed_subj }}/CN={{ item }}" -days {{ haproxy_ssl_self_signed_days }} -keyout "{{ item }}.key" -out "{{ item }}.crt" -extensions v3_ca diff --git a/tasks/main.yml b/tasks/main.yml index 80207a6..88aac22 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,4 +1,7 @@ --- +- name: haproxy | install requirements + include_tasks: requirements.yml + - name: haproxy | install from backports include_tasks: install_from_backports.yml when: not haproxy_use_debian_repo | bool diff --git a/tasks/requirements.yml b/tasks/requirements.yml new file mode 100644 index 0000000..2f9525f --- /dev/null +++ b/tasks/requirements.yml @@ -0,0 +1,9 @@ +--- +- name: haproxy | install requirements + apt: + name: "{{ item }}" + state: present + update_cache: yes + with_items: + - apt-transport-https + - gpg