2019-04-24 21:11:47 +02:00
|
|
|
- import_role:
|
|
|
|
name: prepare_vmware_tests
|
2017-12-15 11:56:19 +01:00
|
|
|
|
|
|
|
# Testcase 0003: Add Local user in vCenter server
|
2018-05-08 19:31:17 +02:00
|
|
|
- name: add local user
|
|
|
|
vmware_local_user_manager:
|
2019-04-24 21:11:47 +02:00
|
|
|
hostname: "{{ vcenter_hostname }}"
|
|
|
|
username: "{{ vcenter_username }}"
|
|
|
|
password: "{{ vcenter_password }}"
|
2018-05-08 19:31:17 +02:00
|
|
|
validate_certs: no
|
|
|
|
local_user_name: testuser_0003
|
|
|
|
local_user_password: "SamplePassword!"
|
|
|
|
state: present
|
|
|
|
register: user_add_0003
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- name: ensure user is created
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- user_add_0003.changed == false
|
|
|
|
- "{{ 'Failed to get local account manager settings' in user_add_0003.msg }}"
|
|
|
|
|
|
|
|
# Testcase 0003: Delete Local user in vCenter server
|
|
|
|
- name: Delete local user
|
|
|
|
vmware_local_user_manager:
|
2019-04-24 21:11:47 +02:00
|
|
|
hostname: "{{ vcenter_hostname }}"
|
|
|
|
username: "{{ vcenter_username }}"
|
|
|
|
password: "{{ vcenter_password }}"
|
2018-05-08 19:31:17 +02:00
|
|
|
validate_certs: no
|
|
|
|
local_user_name: testuser_0003
|
|
|
|
state: absent
|
|
|
|
register: user_delete_0004
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- name: ensure user is deleted
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- user_delete_0004.changed == false
|
|
|
|
- "{{ 'Failed to get local account manager settings' in user_delete_0004.msg }}"
|