-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathf5-users.yml
50 lines (48 loc) · 1.21 KB
/
f5-users.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
- hosts: "{{ target_hosts | default('f5') }}"
gather_facts: False
vars:
bigip_provider:
server: 10.1.1.245
user: admin
password: admin
validate_certs: no
users:
admin:
full_path: 'admin'
description: 'Admin User'
p_name: 'all-partitions'
p_role: 'admin'
shell: 'none'
backup:
full_path: 'backup'
description: 'backup'
p_name: 'all-partitions'
p_role: 'admin'
shell: 'bash'
foo:
full_path: 'foo'
description: 'foo'
p_name: 'all-partitions'
p_role: 'admin'
shell: 'bash'
bar:
full_path: 'bar'
description: 'bar'
p_name: 'all-partitions'
p_role: 'admin'
shell: 'bash'
tasks:
- name: do stuff
bigip_user:
username_credential: "{{ item.key }}"
partition_access: "all:{{ item.value.p_role }}"
shell: "{{ item.value.shell }}"
state: present
provider: "{{ bigip_provider }}"
#full_path: "{{ item.value.full_path }}"
#description: "{{ item.value.description }}"
#p_name: "{{ item.value.p_name }}"
loop: "{{ users | dict2items }}"
vars:
key: "{{ item.key }}"
value: "{{ item.value }}"