2017-08-07 16:49:29 +00:00
|
|
|
# Test code for the vcenter license module.
|
2017-11-06 16:28:15 +00:00
|
|
|
# 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)
|
2017-08-07 16:49:29 +00:00
|
|
|
|
2019-02-26 17:32:06 +00:00
|
|
|
- name: Wait for vcsim controller to come online {{ vcsim }}
|
2017-08-07 16:49:29 +00:00
|
|
|
wait_for:
|
2019-02-26 17:32:06 +00:00
|
|
|
host: "{{ vcsim }}"
|
2017-08-07 16:49:29 +00:00
|
|
|
port: 5000
|
|
|
|
state: started
|
|
|
|
|
|
|
|
- name: Kill vcsim
|
|
|
|
uri:
|
2019-02-26 17:32:06 +00:00
|
|
|
url: http://{{ vcsim }}:5000/killall
|
2017-08-07 16:49:29 +00:00
|
|
|
|
|
|
|
- name: Start vcsim
|
|
|
|
uri:
|
2019-02-26 17:32:06 +00:00
|
|
|
url: http://{{ vcsim }}:5000/spawn?cluster=2
|
2017-08-07 16:49:29 +00:00
|
|
|
register: vcsim_instance
|
|
|
|
|
2019-02-26 17:32:06 +00:00
|
|
|
- name: Wait for vcsim server to come up online {{ vcsim }}
|
2017-08-08 13:15:51 +00:00
|
|
|
wait_for:
|
2019-02-26 17:32:06 +00:00
|
|
|
host: "{{ vcsim }}"
|
2017-08-08 13:15:51 +00:00
|
|
|
port: 443
|
|
|
|
state: started
|
|
|
|
|
2017-08-07 16:49:29 +00:00
|
|
|
- debug:
|
|
|
|
var: vcsim_instance
|
|
|
|
|
|
|
|
# FIXME: ServerFaultCode: LicenseManager:LicenseManager does not implement: AddLicense
|
|
|
|
#- name: Add a vCenter evaluation license
|
|
|
|
# vcenter_license:
|
2019-02-26 17:32:06 +00:00
|
|
|
# hostname: '{{ vcsim }}'
|
2017-08-07 16:49:29 +00:00
|
|
|
# username: '{{ vcsim_instance["json"]["username"] }}'
|
|
|
|
# password: '{{ vcsim_instance["json"]["password"] }}'
|
|
|
|
# validate_certs: no
|
|
|
|
# license: 00000-00000-00000-00000-00000
|
|
|
|
# state: present
|
|
|
|
|
|
|
|
#- name: Remove an (unused) vCenter evaluation license
|
|
|
|
# vcenter_license:
|
2019-02-26 17:32:06 +00:00
|
|
|
# hostname: '{{ vcsim }}'
|
2017-08-07 16:49:29 +00:00
|
|
|
# username: '{{ vcsim_instance["json"]["username"] }}'
|
|
|
|
# password: '{{ vcsim_instance["json"]["password"] }}'
|
|
|
|
# validate_certs: no
|
|
|
|
# license: 00000-00000-00000-00000-00000
|
|
|
|
# state: absent
|
|
|
|
|
|
|
|
#- name: Add an invalid vCenter license
|
|
|
|
# vcenter_license:
|
2019-02-26 17:32:06 +00:00
|
|
|
# hostname: '{{ vcsim }}'
|
2017-08-07 16:49:29 +00:00
|
|
|
# username: '{{ vcsim_instance["json"]["username"] }}'
|
|
|
|
# password: '{{ vcsim_instance["json"]["password"] }}'
|
|
|
|
# validate_certs: no
|
|
|
|
# license: 00000-00000-00000-00000-00001
|
|
|
|
# state: present
|
|
|
|
# ignore_errors: yes
|