Ajout proxy postgresql

This commit is contained in:
stef
2026-07-29 03:14:39 +00:00
parent 3dcc57ff2c
commit 82cbb26838
13 changed files with 446 additions and 70 deletions

View File

@@ -1,8 +1,8 @@
- name: Agent2 - Install packages
ansible.builtin.apt:
ansible.builtin.dnf:
name: "{{ item }}"
state: latest
state: present
loop: "{{ agent.packages }}"
tags:
- install_agent
@@ -10,7 +10,8 @@
- name: Agent2 - Find Group
set_fact:
my_group: "{{ group_names | first }}"
tags:
- install_agent
- name: Agent2 - Créer la liste des hôtes correspondant aux rôles cibles
set_fact:
hotes_filtres: >-
@@ -19,15 +20,18 @@
selectattr('role', 'in', roles_cibles) |
map(attribute='inventory_hostname') |
list }}
tags:
- install_agent
- name: Agent2 - Generate Server List
set_fact:
Server: "{{ hotes_filtres | join(',') }}"
tags:
- install_agent
- name: Agent2 - Generate ActiveServer List
set_fact:
ServerActive: "{{ hotes_filtres | join(';') }}"
tags:
- install_agent
- name: Agent2 - Generate agent2 config
ansible.builtin.template:
src: zabbix_agent2.conf.j2
@@ -35,7 +39,8 @@
owner: zabbix
group: zabbix
mode: 0640
tags:
- install_agent
- name: Agent2 - Create cert directory if zabbix_crypt=="tls"
ansible.builtin.file:
path: "/etc/zabbix/certs"
@@ -44,7 +49,8 @@
owner: zabbix
group: zabbix
when: zabbix_crypt=="tls"
tags:
- install_agent
- name: Agent2 - Copy Certificats
ansible.builtin.copy:
src: "{{ item }}"
@@ -56,6 +62,8 @@
- "{{ zabbix_agent }}.crt"
- "{{ zabbix_agent }}.key"
when: zabbix_crypt=="tls"
tags:
- install_agent
- name: Enable and start service zabbix agent2
ansible.builtin.service:
@@ -64,3 +72,5 @@
enabled: true
loop:
- zabbix-agent2
tags:
- install_agent