--
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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/98965131-1426-4e91-8537-01bdee198e4bn%40googlegroups.com.
i want to copy ip address of VM in local file (localhost)- hosts: localhost
gather_facts: false
vars_files:
- vars.yml
tasks:
- name: provisioning vm
vmware_guest:
hostname: '{{ vsphere_hostname }}'
username: '{{ vsphere_username }}'
password: '{{ vsphere_password }}'
validate_certs: no
datacenter: '{{ vsphere_datacenter }}'
cluster: '{{ vsphere_cluster }}'
folder: '{{ vsphere_folder }}'
name: "{{ inventory_hostname }}"
state: poweredon
guest_id: '{{ vm_id }}'
template: '{{ vm_template }}'
networks:
- name: '{{ vm_network_US }}'
ip: '{{ vm_IP }}'
netmask: '{{ vm_netmask}}'
gateway: '{{ vm_gateway}}'
dns_servers: '{{ vm_dns }}'
start_connected: yes
connected: yes
wait_for_ip_address: yes
state: poweredon
delegate_to: localhost
register: vm