Created
August 10, 2017 09:45
-
-
Save anonymous/855df0b952afd34b0d26f78c90bc46e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#####DEPLOY ZABBIX AGENT | |
zabbix_agentd.conf: | |
file.managed: | |
- name: /etc/zabbix/zabbix_agentd.conf | |
- source: | |
- salt://base/etc/zabbix/zabbix_agentd.conf | |
- user: root | |
- group: root | |
- mode: 644 | |
{% if grains['virtual'] == 'VMware' %} | |
/etc/zabbix/zabbix_agentd.conf: | |
file.replace: | |
- pattern: IPSERVER | |
- repl: 10.XX.XX.XX | |
- show_changes: True | |
- bufsize: file | |
{% else %} | |
/etc/zabbix/zabbix_agentd.conf: | |
file.replace: | |
- pattern: IPSERVER | |
- repl: 81.XXX.XXX.XXX.X | |
- show_changes: True | |
- bufsize: file | |
{% endif %} | |
{% set hostname = grains['host'] %} | |
hostname_zabbix_agentd.conf: | |
file.replace: | |
- name: /etc/zabbix/zabbix_agentd.conf | |
- pattern: HOSTNAMEAGENT | |
- repl: {{ hostname }} | |
- show_changes: True | |
- bufsize: file | |
systemctl enable zabbix-agent: | |
cmd.run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment