ansible/test/integration/targets/vcenter_license/tasks/main.yml
Gonéri Le Bouder 541d73d82a vmware: refactoring of the vcenter_* test roles
Refactoring of `vcenter_folder` and `vcenter_license` to make use of the
new `prepare_vmware_tests` role.

This patch depends on: https://github.com/ansible/ansible/pull/55719

Original PR: https://github.com/ansible/ansible/pull/54882
2019-05-03 11:03:19 -04:00

27 lines
934 B
YAML

# Test code for the vcenter license module.
# Copyright: (c) 2017, Dag Wieers <dag@wieers.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
- when: vcsim is not defined
block:
- name: Add a vCenter evaluation license
vcenter_license: &vcenter_lic_data
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: no
license: 00000-00000-00000-00000-00000
state: present
- name: Remove an (unused) vCenter evaluation license
vcenter_license:
<<: *vcenter_lic_data
state: absent
- name: Add an invalid vCenter license
vcenter_license:
<<: *vcenter_lic_data
license: 00000-00000-00000-00000-00001
state: present
register: vcenter_license_output
failed_when: '"is not existing or can not be added" not in vcenter_license_output.msg'