Debut de separation par distribution + ajout keepalived
This commit is contained in:
41
tasks/Debian/install-front.yml
Normal file
41
tasks/Debian/install-front.yml
Normal 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
|
||||
Reference in New Issue
Block a user