Debut de separation par distribution + ajout keepalived

This commit is contained in:
stef
2026-02-16 22:20:56 +00:00
parent 618c5ef1a0
commit f3855df1a8
15 changed files with 741 additions and 54 deletions

View File

@@ -0,0 +1,41 @@
- name: Front - Install packages
ansible.builtin.apt:
name: "{{ item }}"
state: latest
loop: "{{ front.packages }}"
tags:
- install_front
- name: Front - Configure nginx port
ansible.builtin.lineinfile:
path: /etc/zabbix/nginx.conf
regexp: 'listen 8080;'
line: " listen 80;"
tags:
- install_front
# - name: Front - Setup
# ansible.builtin.template:
# src: zabbix_front.conf.j2
# dest: /etc/zabbix/web/zabbix.conf.php
# owner: www-data
# group: www-data
# mode: 0600
- name: Front - Configure nginx url
ansible.builtin.lineinfile:
path: /etc/zabbix/nginx.conf
regexp: 'server_name example.com;'
line: " server_name {{ inventory_hostname }};"
tags:
- install_front
notify: Restart nginx
- name: Front - Configure keepalived
ansible.builtin.template:
src: keepalived.conf.j2
dest: /etc/keepalived/keepalived.conf
owner: root
group: root
mode: 0644
notify: Restart Keepalived