Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include:
- - zabbix-release
- zabbix-agent:
- pkg:
- - installed
- - require:
- - pkg: zabbix-release
- service:
- - running
- - watch:
- - file: /etc/zabbix/zabbix_agentd.conf
- zabbix_agentd.conf:
- file.managed:
- - name: /etc/zabbix/zabbix_agentd.conf
- - source: salt://zabbix-agent/zabbix_agentd.conf
- - context:
- zabbix_server_ip: {{grains.master}}
- zabbix_proxy_ip: {{ salt["mine.get"]("test-mon-jcltest", "network.ip_addrs").get("test-mon-jcltest")[0] }}
- hostname_tag: {{grains.id}}
- - user: root
- - group: root
- - mode: 644
- - template: jinja
- pyzabbix:
- pip:
- - installed
- - require:
- - pkg: python-pip
- zabbix_register:
- file.managed:
- - name: /root/depot/zabbix_register
- - source: salt://zabbix-agent/zabbix_register
- - template: jinja
- - context:
- host_ip: {{ grains.ec2_private-ip }}
- host_tag: {{ grains.id }}
- zabbix_host_group: {{ pillar["zabbix_host_group"] }}
- zabbix_passwd: {{ pillar["zabbix_api_passwd"] }}
- zabbix_proxy_id: {{ pillar["zabbix_proxy_id"] }}
- zabbix_url: {{ pillar["zabbix_url"] }}
- zabbix_user: api
- - require:
- - pkg: zabbix-agent
- - file: /etc/zabbix/zabbix_agentd.conf
- - user: root
- - group: root
- - mode: 755
- cmd.wait:
- - cwd: /tmp
- - name: /root/depot/zabbix_register
- - watch:
- - file: /root/depot/zabbix_register
- - require:
- - pip: pyzabbix
- - pkg: zabbix-agent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement