On 08.03.2019 16:50, Fahad Riaz wrote:
> Hi All,
> I wrote the following playbook to gather facts about a particular datastore
> from vsphere.
> the playbook worked, however I had to add -vvv flag to see the facts.
>
> 2 questions
> 1- is there a file that gets the output of the playbook
Sort of, you can set log_path
https://github.com/ansible/ansible/blob/0e9a79a5893357b156de98c0cb07039b11f15b71/examples/ansible.cfg#L111
> 2- the facts are shown in bytes, is there a way to see the facts in GB.
No, not without changing the code.
> - name: gather facts from datacenter about datastore
> vmware_datastore_facts:
> hostname: DC-VCSA2
> username: "{{ vcenter_username }}"
> password: "{{ vcenter_password }}"
> datacenter: Datacenter
> name: datastore1
> validate_certs: false
> delegate_to: localhost
> register: facts
To see the content of fact variable just add this task
- debug: var=facts
--
Kai Stian Olstad