forked from pdacity/zabbix_nfs_client_iostat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy_zbx.yaml
43 lines (38 loc) · 977 Bytes
/
deploy_zbx.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
# run with ansible-playbook -v -i .host.linux deploy_zbx.yaml --limit host/group
#
- hosts: all
become: yes
tasks:
- name: Check folder script folder exists
stat:
path: "{{ zbx_scr_dir }}"
register: workdir
- name: "echo if directory already existed"
debug:
msg: "Folder script folder is already existed"
when: workdir.stat.exists
- name: "Ansible Create directory if not exists"
file:
path: "{{ zbx_scr_dir }}"
state: directory
mode: 0755
group: root
owner: root
when: workdir.stat.exists == false
- name: Copy file with owner and permissions
copy:
src: "{{ item }}"
dest: "{{ zbx_scr_dir }}"
owner: root
group: root
mode: '0744'
backup: yes
validate: ls %s
with_items:
- nfsio_perf.bash
- nfsio_discovery.bash
- rpcinfo-monitor.bash
- rpcinfo-errcount.bash
- rpcinfo-errdetail.bash
- nfs_mnt_client.bash