Re: [ansible-project] Help me please. How can I get the output of the command?

596 views
Skip to first unread message
Message has been deleted

Karl Auer

unread,
May 14, 2018, 7:41:01 AM5/14/18
to ansible...@googlegroups.com
It would help if you would describe what it is supposed to do...

On Mon, May 14, 2018 at 9:38 PM, Josu Vilda <jrv...@gmail.com> wrote:
Hi guys,
I am launching this playbook but it does not give an error and it does not do what it is supposed to do.
How can I debug the error?

    - name: Customize Domain
      vmware_vm_shell:
        hostname: '{{ VCENTER }}'
        username: '{{ DOMAIN_VCENTER }}\user'
        password: '*********'
        datacenter: '{{ DATACENTER }}'
        folder: '/{{ DATACENTER }}/vm'
        validate_certs: no
        vm_id: '{{ NOMBRE }}'
        vm_id_type: vm_name
        vm_username: 'adm'
        vm_password: 'temporal'
        vm_shell_cwd: 'c:\temp\'
        vm_shell: 'c:\windows\system32\wbem\wmic.exe'
        vm_shell_args: 'ComputerSystem where name={{ NOMBRE }} call joindomainorworkgroup fjoinoptions=3 name={{ DOMINIO }}.$
      register: value
      async: 600
      poll: 5
      tags:
        - auto

    - name : debug
      debug:
        var: value
        verbosity: 3
      tags:
        - auto

Return:


TASK [Customize Domain username={{ DOMAIN_VCENTER }}\adm, datacenter={{ DATACENTER }}, vm_password=temporal, vm_shell_cwd=c:\temp\, vm_shell_args=ComputerSystem where name={{ NOMBRE }} call joindomainorworkgroup fjoinoptions=3 name={{ DOMINIO }}.domain.local username={{ DOMINIO }}.domain\adm Password=*******, hostname={{ VCENTER }}, vm_username=adm, vm_shell=c:\windows\system32\wbem\wmic.exe, validate_certs=False, vm_id_type=vm_name, folder=/{{ DATACENTER }}/vm, password=*******, vm_id={{ NOMBRE }}] ***
task path: /etc/ansible/playbooks/vCenter/Despliegue.yml:148
changed: [localhost] => {"ansible_job_id": "503299328214.47633", "changed": true, "finished": 1, "msg": 2500, "uuid": "423c4b0f-3dd5-b3b3-6adc-23314cc4054c"}

TASK [debug var=value, verbosity=3] *****************************************************************************************
task path: /etc/ansible/playbooks/vCenter/Despliegue.yml:169
skipping: [localhost] => {"skipped_reason": "Verbosity threshold not met."}
META: ran handlers
META: ran handlers

--
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-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7ac713f7-e86d-4977-9c90-d406b4a05aa2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Karl Auer

Email  : ka...@2pisoftware.com
Website: 
http://2pisoftware.com

GPG/PGP : 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816
Previous: F0AB 6C70 A49D 1927 6E05 81E7 AD95 268F 2AB6 40EA

Message has been deleted
Message has been deleted
Message has been deleted

Josh Smift

unread,
May 14, 2018, 9:40:26 PM5/14/18
to Ansible Project
Why are you setting "verbosity: 3"? According to http://docs.ansible.com/ansible/latest/modules/debug_module.html, that means "if you set to 3 it will only run debug when -vvv or above". That's causing Ansible to skip the task, thus the message you're seeing ("Verbosity threshold not met").

Remove that, and you should get some better results.
Message has been deleted

Josh Smift

unread,
May 16, 2018, 9:56:23 AM5/16/18
to Ansible Project
Yeah, looks like not. :^( Searching at https://github.com/ansible/ansible/issues for "vmware_vm_shell", https://github.com/ansible/ansible/issues/38320 looks like it might be related?

On Wednesday, May 16, 2018 at 8:51:59 AM UTC-4, Josu Vilda wrote:
I've tried that, but it gives me back the same information.
<<void>>
The problem is that vmware_vm_shell module does not return the output of the command.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages