Debian Codegraph @

ansible_collections/dellemc/openmanage/roles/idrac_user/molecule/modify_min_params-10638/converge.yml

raw symbols SCIP
1 ---
2 - name: Validate creating a user with minimum required parameters with env
3 hosts: all
4 gather_facts: false
5 vars:
6 idrac_user_name: "moleculeTest"
7 idem_msg: "Requested changes are already present in the user slot."
8 tasks:
9 - name: Modify iDRAC user with minimum requred parameters
10 ansible.builtin.import_role:
11 name: dellemc.openmanage.idrac_user
12 vars:
13 hostname: "{{ lookup('env', 'IDRAC_IP') }}"
14 username: "{{ lookup('env', 'IDRAC_USER') }}"
15 password: "{{ lookup('env', 'IDRAC_PASSWORD') }}"
16 validate_certs: false
17 state: present
18 user_name: "{{ idrac_user_name }}"
19 custom_privilege: 511
20
21 - name: Asserting user creation in check mode
22 ansible.builtin.assert:
23 that: idrac_user_out.msg == "Changes found to commit!"
24 when: ansible_check_mode
25 tags: molecule-idempotence-notest
26
27 - name: Fetching user info in normal mode
28 ansible.builtin.include_tasks:
29 file: ../resources/idrac_user/get_user_info.yml
30 when: not ansible_check_mode and idrac_user_out.changed
31 tags: molecule-idempotence-notest
32
33 - name: Asserting user creation in normal mode
34 ansible.builtin.assert:
35 that:
36 - idrac_user_out.msg == "Successfully updated user account."
37 - "{{ (user_details.user_info | length) != 0 }}"
38 - user_details.user_info[0].UserName == idrac_user_account.UserName
39 - user_details.user_info[0].RoleId == "Administrator"
40 when: not ansible_check_mode and idrac_user_out.changed
41 tags: molecule-idempotence-notest
42
43 - name: Asserting user creation in idempotency mode
44 ansible.builtin.assert:
45 that:
46 - idrac_user_out.msg == idem_msg
47 when: not ansible_check_mode and not idrac_user_out.changed