ansible/test/integration/targets/vmware_local_user_manager/tasks/main.yml

40 lines
1.1 KiB
YAML
Raw Normal View History

- import_role:
name: prepare_vmware_tests
# Testcase 0003: Add Local user in vCenter server
2018-05-08 19:31:17 +02:00
- name: add local user
vmware_local_user_manager:
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:
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 }}"