Created
November 22, 2018 05:44
-
-
Save thetuxracer/09f6d1b26a657b6abc94e44ef0a69508 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gist for ansible/ansible#48976 | |
- name: Reboot the vm | |
vmware_guest: | |
name: jenkins-{{ lookup('env', 'BUILD_NUMBER') }} | |
hostname: "{{ lookup('env', 'VSPHERE_SERVER') }}" | |
username: "{{ lookup('env', 'KP_AD_USERNAME') }}" | |
password: "{{ lookup('env', 'VSPHERE_PWD') }}" | |
validate_certs: false | |
state: reboot-guest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
─$ ansible-playbook --connection=local reboot_vm.yml 130 ↵ | |
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost | |
does not match 'all' | |
PLAY [localhost] ***************************************************************************************** | |
TASK [Gathering Facts] *********************************************************************************** | |
ok: [localhost] | |
TASK [Reboot the vm] ************************************************************************************* | |
fatal: [localhost]: FAILED! => {"changed": false, "msg": "value of state must be one of: absent, poweredoff, poweredon, present, rebootguest, restarted, shutdownguest, suspended, got: reboot-guest"} | |
to retry, use: --limit @/media/sf_workspace/icce_automation/test_before_role.retry | |
PLAY RECAP *********************************************************************************************** | |
localhost : ok=1 changed=0 unreachable=0 failed=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment