mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-01-23 12:38:11 +00:00
bitwarden
This commit is contained in:
parent
a2ba1ae83e
commit
92f3fea8d0
@ -1,7 +1,7 @@
|
||||
- hosts: datacenter
|
||||
name: Install zabbix agent
|
||||
vars:
|
||||
ZABBIX_SERVER_IP: "192.168.77.216"
|
||||
ZABBIX_SERVER: "zabbix-server.lan"
|
||||
tasks:
|
||||
|
||||
- name: Combine list1 and list2 into a merged_list var
|
||||
@ -85,7 +85,7 @@
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ zabbix_agent_cfg }}"
|
||||
regexp: "^ServerActive=.*"
|
||||
line: "ServerActive={{ ZABBIX_SERVER_IP }}"
|
||||
line: "ServerActive={{ ZABBIX_SERVER }}"
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||
|
||||
- name: Reconfigure zabbix agent ListenPort
|
||||
@ -108,11 +108,18 @@
|
||||
- name: Reconfigure zabbix-agent2 hostname
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ zabbix_agent_cfg }}"
|
||||
regexp: "^UserParameter=.*"
|
||||
insertafter: '^# UserParameter='
|
||||
line: "UserParameter=system.temperature,vcgencmd measure_temp"
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||
|
||||
- name: Reconfigure zabbix-agent2 config
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ zabbix_agent_cfg }}"
|
||||
insertafter: '^# UserParameter='
|
||||
line: "UserParameter=system.certs,python3 /share/ZFS530_DATA/.qpkg/ZabbixAgent/cert_check2.py"
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||
when: inventory_hostname not in groups['nas']
|
||||
|
||||
- name: Reconfigure zabbix-agent2 hostname
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ zabbix_agent_cfg }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user