-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathadd_delete_two_vsadmin.yml
More file actions
48 lines (47 loc) · 1.32 KB
/
add_delete_two_vsadmin.yml
File metadata and controls
48 lines (47 loc) · 1.32 KB
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
---
#!/usr/bin/env ansible-playbook
#########################################
#
# Title: test456.yml
# Description: Create two users
# Delete two users
#########################################
- hosts: localhost
gather_facts: false
name: user module
collections:
- netapp.ontap
tasks:
- name: Create two users
na_ontap_user:
state: present
name: "{{item.name}}"
applications: http,ssh
authentication_method: password
set_password: "{{item.password}}"
hostname: "cluster1.demo.netapp.com"
role_name: vsadmin
vserver: "nas_svm"
username: "admin"
password: "Netapp1!"
https: true
validate_certs: false
loop:
- { name: 'user1', password: 'password1'}
- { name: 'user2', password: 'password2'}
- name: Delete two users
na_ontap_user:
state: absent
name: "{{item.name}}"
applications: http,ssh
authentication_method: password
set_password: "{{item.password}}"
hostname: "cluster1.demo.netapp.com"
vserver: "nas_svm"
username: "admin"
password: "Netapp1!"
https: true
validate_certs: false
loop:
- { name: 'user1', password: 'password1'}
- { name: 'user2', password: 'password2'}