Actualizar 'zabbix/agent.yaml'

This commit is contained in:
David Lopez 2023-07-24 11:17:05 +00:00
parent 080b8f3625
commit 91611189f4
1 changed files with 33 additions and 33 deletions

View File

@ -1,34 +1,34 @@
# ansible-playbook -i inventory agent.yaml -u centos --key-file=node.pem -b
---
- hosts: "{{ nodes}}"
gather_facts: false
vars:
ansible_python_interpreter: /usr/bin/python3
tasks:
- name: get zabbix package
get_url:
url: https://repo.zabbix.com/zabbix/6.4/debian/pool/main/z/zabbix/zabbix-agent_6.4.0-1%2Bdebian11_amd64.deb
dest: /tmp
- name: dpkg zabbix
ansible.builtin.dpkg_selections:
name: zabbix-release_6.0-3+ubuntu22.04_all.deb
selection: install
- name: update package index
ansible.builtin.apt:
update_cache: yes
# - name: Copy zabbix_agentd.conf file with owner and permissions
# ansible.builtin.copy:
# src: zabbix_agentd.conf
# dest: /etc/zabbix/zabbix_agentd.conf
- name: install zabbix-agent #Zabbixエージェントをインストールします。
ansible.builtin.apt:
name:
- zabbix-agent
state: present
# ansible-playbook -i inventory agent.yaml -u centos --key-file=node.pem -b
---
- hosts: all
gather_facts: false
vars:
ansible_python_interpreter: /usr/bin/python3
tasks:
- name: get zabbix package
get_url:
url: https://repo.zabbix.com/zabbix/6.4/debian/pool/main/z/zabbix/zabbix-agent_6.4.0-1%2Bdebian11_amd64.deb
dest: /tmp
- name: dpkg zabbix
ansible.builtin.dpkg_selections:
name: zabbix-release_6.0-3+ubuntu22.04_all.deb
selection: install
- name: update package index
ansible.builtin.apt:
update_cache: yes
# - name: Copy zabbix_agentd.conf file with owner and permissions
# ansible.builtin.copy:
# src: zabbix_agentd.conf
# dest: /etc/zabbix/zabbix_agentd.conf
- name: install zabbix-agent #Zabbixエージェントをインストールします。
ansible.builtin.apt:
name:
- zabbix-agent
state: present