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
    }

El dom., 11 nov. 2018 a las 5:11, Alberto Jimenez Lozano (<
[email protected]>) escribió:

> 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
>
> El domingo, 11 de noviembre de 2018, 4:53:57 (UTC+1), Lucas Jackson
> escribió:
>>
>> 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 <[email protected]>
>> Date: 2018-11-10 10:21 PM (GMT-05:00)
>> To: Ansible Project <[email protected]>
>> 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 [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/aa8443a0-721e-4e6f-832e-9eccd12d2e12%40googlegroups.com
>> <https://groups.google.com/d/msgid/ansible-project/aa8443a0-721e-4e6f-832e-9eccd12d2e12%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/a80af1d4-437b-443d-8de3-37598337faa8%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/a80af1d4-437b-443d-8de3-37598337faa8%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
-----------------------------------------------------------------------
Alberto Jimenez Lozano
-----------------------------------------------------------------------

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAOPskKFMjorASSbZ8Ea%3DerEznr%3DsVFYozWyyCT_q_vDGSfCw8g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to