feat: add alpine support
This commit is contained in:
parent
4f048ce7a7
commit
78b6e081cb
3 changed files with 49 additions and 14 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# restart haproxy
|
||||
- name: "restart haproxy"
|
||||
ansible.builtin.systemd:
|
||||
ansible.builtin.service:
|
||||
name: "haproxy"
|
||||
state: "restarted"
|
||||
enabled: true
|
||||
|
|
|
|||
|
|
@ -2,7 +2,17 @@
|
|||
|
||||
galaxy_info:
|
||||
author: "siempie"
|
||||
description: "install and configure HAProxy load balancer"
|
||||
description: "install and configure HAProxy load balancer on Debian and Alpine systems"
|
||||
license: "MIT"
|
||||
role_name: "haproxy"
|
||||
platforms:
|
||||
- name: "Debian"
|
||||
versions:
|
||||
- "all"
|
||||
- name: "Ubuntu"
|
||||
versions:
|
||||
- "all"
|
||||
- name: "Alpine"
|
||||
versions:
|
||||
- "all"
|
||||
dependencies: []
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue