summaryrefslogtreecommitdiffstats
path: root/ansible_collections/inspur/sm/playbooks/modules/examples-user.yml
blob: e0d0903062ba5aa9950b1e4cdde9987bec51891d (plain)
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
- name: User test
  hosts: ism
  connection: local
  gather_facts: no
  vars:
    ism:
      host: "{{ ansible_ssh_host }}"
      username: "{{ username }}"
      password: "{{ password }}"

  tasks:

  - name: "Add user"
    inspur.sm.add_user:
      state: "present"
      uname: "wbs"
      upass: "admin"
      role_id: "Administrator"
      priv: "kvm,sol"
      provider: "{{ ism }}"

  - name: "Set user"
    inspur.sm.add_user:
      state: "present"
      uname: "wbs"
      upass: "12345678"
      role_id: "user"
      priv: "kvm,sol"
      provider: "{{ ism }}"