| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- - name: Update hosts file
- lineinfile:
- path: /etc/hosts
- insertafter: '^127\.0\.0\.1'
- line: '127.0.0.1 stat.localhost zbx.localhost'
- owner: root
- group: root
- mode: 0644
- backup: yes
- - name: Create Nginx custom.d directory
- file:
- path: /etc/nginx/custom.d
- state: directory
- mode: 0755
- - name: Upload Nginx restricted config
- template:
- src=nginx_restricted_conf.j2
- dest=/etc/nginx/custom.d/restricted.conf
- # notify:
- # - reload nginx
- - name: Upload Nginx stat config
- template:
- src=nginx_stat_conf.j2
- dest=/etc/nginx/conf.d/00_stat.conf
- # notify:
- # - reload nginx
- - name: Create zabbix spool directory
- file:
- path: /var/spool/zabbix
- state: directory
- mode: 0755
- owner: zabbix
- group: zabbix
- - name: Create config for Zabbix
- copy: src=nginx.conf dest=/etc/zabbix/zabbix_agentd.d/nginx.conf
- notify:
- - restart zabbix-agent
- - name: Create script for Zabbix
- copy:
- src: nginx.sh
- dest: /etc/zabbix/scripts/nginx.sh
- mode: 0755
- backup: yes
- owner: zabbix
- group: zabbix
- notify:
- - restart zabbix-agent
|