Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Commit 19506ef

Browse files
authored
Add processing to check the status of vmware tools to linux instance creation tasks (#5)
* add processing to check the status of vmware tools to linux instance creation tasks * add snapshot_src description to molecule.yml
1 parent 2fc734b commit 19506ef

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

molecule_vmware/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/create_linux_instance.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,22 @@
4242
delay: 10
4343
retries: 300
4444

45+
- name: Check vmware tools status
46+
vmware_guest_info:
47+
hostname: "{{ molecule_yml.driver.vcenter_hostname }}"
48+
username: "{{ molecule_yml.driver.vcenter_username }}"
49+
password: "{{ molecule_yml.driver.vcenter_password }}"
50+
validate_certs: "{{ molecule_yml.driver.validate_certs | default(false) }}"
51+
datacenter: "{{ molecule_yml.driver.datacenter }}"
52+
folder: "{{ molecule_yml.driver.folder }}"
53+
name: "{{ item.name }}"
54+
register: guest_state
55+
until: "guest_state.instance.guest_tools_status == 'guestToolsRunning'"
56+
delay: 10
57+
retries: 300
58+
loop: "{{ molecule_yml.platforms }}"
59+
ignore_errors: true
60+
4561
- name: Create ssh directory and public key in guest OS
4662
vmware_vm_shell:
4763
hostname: "{{ molecule_yml.driver.vcenter_hostname }}"

molecule_vmware/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/molecule.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ driver:
2222
platforms:
2323
- name: instance # is an instance name
2424
template: change me to template name # is to be used as a template when cloning an instance
25+
#snapshot_src: change me to snapshot name # is a snapshot name to be possible specified if you want to use linked clone.
2526
hardware:
2627
num_cpus: 2 # is cpu number to be configured to an instance
2728
memory_mb: 2048 # is memory size(MB) to be configured to an instance

0 commit comments

Comments
 (0)