From 2fc734bbf054842c40b3618c0629db08acb49f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=A9=E3=82=A4=E3=83=88=E3=82=A6=E3=82=A7=E3=83=AB?= =?UTF-8?q?=E3=81=AE=E4=BA=BA?= Date: Sat, 23 Jan 2021 22:44:57 +0900 Subject: [PATCH] add check vmwaretools status (#4) * add check vmwaretools status * folder param add --- .../create_windows_instance.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/molecule_vmware/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/create_windows_instance.yml b/molecule_vmware/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/create_windows_instance.yml index 488ab3c..7ddcf94 100644 --- a/molecule_vmware/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/create_windows_instance.yml +++ b/molecule_vmware/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/create_windows_instance.yml @@ -38,6 +38,22 @@ delay: 10 retries: 300 +- name: Check vmware tools status + vmware_guest_info: + hostname: "{{ molecule_yml.driver.vcenter_hostname }}" + username: "{{ molecule_yml.driver.vcenter_username }}" + password: "{{ molecule_yml.driver.vcenter_password }}" + validate_certs: "{{ molecule_yml.driver.validate_certs | default(false) }}" + datacenter: "{{ molecule_yml.driver.datacenter }}" + folder: "{{ molecule_yml.driver.folder }}" + name: "{{ item.name }}" + register: guest_state + until: "guest_state.instance.guest_tools_status == 'guestToolsRunning'" + delay: 10 + retries: 300 + loop: "{{ molecule_yml.platforms }}" + ignore_errors: true + - name: Enable WinRM vmware_vm_shell: hostname: "{{ molecule_yml.driver.vcenter_hostname }}"