Re: [ansible-project] Module vmware_guest option powerdon/powerdoff not work OK

11 views
Skip to first unread message
Message has been deleted

lucas.adam.jackson

unread,
Nov 10, 2018, 10:53:57 PM11/10/18
to ansible...@googlegroups.com
Makes sense the behavior, your playbook is attempting to power on the vm (state: poweredon) if the vm is already powered on then changed should be false.



Sent from my Samsung Galaxy smartphone.

-------- Original message --------
From: Alberto Jimenez Lozano <alberto.ji...@gmail.com>
Date: 2018-11-10 10:21 PM (GMT-05:00)
To: Ansible Project <ansible...@googlegroups.com>
Subject: [ansible-project] Module vmware_guest  option powerdon/powerdoff not work OK

I do a playbook to start a virtual machine.


    - name: Start vmware MV
      vmware_guest:
       hostname: xxxx
       username: xxxx
       password: xxx
       validate_certs: no
       name: {{server}}
       state: poweredon
      delegate_to: localhost
      register: vmware_start





ok: [xxxx] => {
    "vmware_start": {
        "changed": false, 
        "failed": false
    }
}

PLAY RECAP ******************************************************************************************
ssh.sva.itbatera.ejgv.eus  : ok=3    changed=0    unreachable=0    failed=0 


I execute the playbook and it doesn´t appear errors:
Even though the VM is powered on, it says '"Changed": false" and never actually powers off the VM. 



--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/aa8443a0-721e-4e6f-832e-9eccd12d2e12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alberto Jimenez Lozano

unread,
Nov 10, 2018, 11:11:03 PM11/10/18
to Ansible Project
Sorry I put another version of the playbook.
It doesnt work vmware vguest module to start or stop a virtual machine.

 - name: Start vmware MV
      vmware_guest:
       hostname: xxxx
       username: xxxx
       password: xxx
       validate_certs: no
       name: {{server}}
       state: poweredoff
      delegate_to: localhost
      register: vmware_start

Alberto Jimenez Lozano

unread,
Nov 10, 2018, 11:20:33 PM11/10/18
to ansible...@googlegroups.com
The problem is the user that I use.
I change the user with more privileges and go OK.

ok: [ssh.sva.itbatera.ejgv.eus] => {
    "vmware_start": {
        "changed": true, 
        "failed": false
    }


For more options, visit https://groups.google.com/d/optout.


--
-----------------------------------------------------------------------
Alberto Jimenez Lozano
-----------------------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages