-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_zabbix_user.yml
86 lines (81 loc) · 2.48 KB
/
test_zabbix_user.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
- hosts: all
name: Run tests with zabbix_user module
tasks:
- block:
- name: Create Zabbix user (new)
zabbix_user:
server_url: '{{ zbx_server_url }}'
login_user: '{{ zbx_user }}'
login_password: '{{ zbx_password }}'
validate_certs: '{{ zbx_validate_certs }}'
alias: example
name: user name
surname: user surname
usrgrps:
- Guests
- Disabled
passwd: password
lang: en_GB
theme: blue-theme
autologin: no
autologout: 0
refresh: 30
rows_per_page: 200
after_login_url: ''
user_medias:
- mediatype: Email
sendto: [email protected]
period: 1-7,00:00-24:00
severity:
not_classified: no
infomation: yes
warning: yes
average: yes
high: yes
disaster: yes
active: no
type: Zabbix super admin
state: present
register: zbx_user_new
- debug:
msg: '{{ zbx_user_new }}'
- assert:
that: zbx_user_new.changed
- name: Create Zabbix user (existing)
zabbix_user:
server_url: '{{ zbx_server_url }}'
login_user: '{{ zbx_user }}'
login_password: '{{ zbx_password }}'
validate_certs: '{{ zbx_validate_certs }}'
alias: example
name: user name
surname: user surname
usrgrps:
- Guests
- Disabled
passwd: password
lang: en_GB
theme: blue-theme
autologin: no
autologout: 0
refresh: 30
rows_per_page: 200
after_login_url: ''
user_medias:
- mediatype: Email
sendto: [email protected]
period: 1-7,00:00-24:00
severity:
not_classified: no
infomation: yes
warning: yes
average: yes
high: yes
disaster: yes
active: no
type: Zabbix super admin
state: present
register: zbx_user_existing
- assert:
that: not zbx_user_existing.changed
delegate_to: localhost