feat: add alpine support

This commit is contained in:
Simon Cornet 2026-04-17 14:13:25 +02:00
commit 78b6e081cb
3 changed files with 49 additions and 14 deletions

View file

@ -1,16 +1,41 @@
---
# install haproxy
- name: "install - haproxy"
ansible.builtin.apt:
name: "haproxy"
state: "latest"
cache_valid_time: "120"
# install on debian
- name: "install on debian"
when: 'ansible_os_family == "Debian"'
block:
# start haproxy service
- name: "service - start haproxy"
ansible.builtin.systemd:
name: "haproxy"
state: "started"
enabled: true
# install haproxy
- name: "install - haproxy"
ansible.builtin.apt:
name: "haproxy"
state: "latest"
cache_valid_time: "120"
# start haproxy service
- name: "service - start haproxy"
ansible.builtin.systemd:
name: "haproxy"
state: "started"
enabled: true
# install on alpine
- name: "install on alpine"
when: 'ansible_os_family == "Alpine"'
block:
# install haproxy
- name: "install - haproxy"
community.general.apk:
name: "haproxy"
state: "latest"
update_cache: true
when: 'ansible_os_family == "Alpine"'
# start haproxy service
- name: "service - start haproxy"
ansible.builtin.service:
name: "haproxy"
state: "started"
enabled: true