mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
- import_role:
|
|
name: prepare_vmware_tests
|
|
|
|
# Testcase 0003: Add Local user in vCenter server
|
|
- name: add local user
|
|
vmware_local_user_manager:
|
|
hostname: "{{ vcenter_hostname }}"
|
|
username: "{{ vcenter_username }}"
|
|
password: "{{ vcenter_password }}"
|
|
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:
|
|
hostname: "{{ vcenter_hostname }}"
|
|
username: "{{ vcenter_username }}"
|
|
password: "{{ vcenter_password }}"
|
|
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 }}"
|