-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathuser-group.yml
40 lines (35 loc) · 843 Bytes
/
user-group.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
- hosts: fortigates
connection: httpapi
# when using the colltion
#collections:
#- fortinet.fortios
gather_facts: false
vars:
vdom: "root"
ansible_httpapi_use_ssl: yes
ansible_httpapi_validate_certs: no
#ansible_httpapi_port: 8443
ssl_verify: "False"
firewall_ip: "192.168.1.1"
username: "admin"
password: ""
tasks:
- name: Configure local users
fortios_user_local:
vdom: "{{ vdom }}"
state: "present"
user_local:
name: 'testuser'
email_to: '[email protected]'
type: "password"
passwd: 'testpwd'
tags: [never, user]
- name: Configure group
fortios_user_group:
vdom: "{{ vdom }}"
state: "present"
user_group:
name: "vpn-user"
member:
- name: 'testuser'
tags: [never, user]