SUMMARY
We are trying to create VM from template.
I am facing issue at assigning ip line.
ISSUE TYPE
- Documentation Report
COMPONENT NAME
vsphere_guest:
ANSIBLE VERSION
ansible 2.5.2
CONFIGURATIONOS / ENVIRONMENT
Ubuntu
STEPS TO REPRODUCE
---
- hosts: 127.0.0.1
connection: local
user: root
sudo: false
gather_facts: false
serial: 1
tasks:
- name: Importing Variables
include_vars: main.yml
- debug: var=hostname_var
- debug: var=username_var
- debug: var=password_var
- vsphere_guest:
vcenter_hostname: "{{hostname_var}}"
username: "{{username_var}}"
password: "{{password_var}}"
guest: vmfromtemplate
from_template: yes
template_src: Ubuntu VM
cluster: t1k1-cluster
networks:
- name: "vcesys_esx_mgmt"
ip: "10.1.1.10"
netmask: "255.255.255.0"
gateway: "10.0.0.1"
wait_for_ip_address: yes~
EXPECTED RESULTS
VMshould be created from template and assigned the ip for the interface
which i am giving at the ntework line.
ACTUAL RESULTS
ERROR! Syntax Error while loading YAML.
did not find expected key
The error appears to have been in
'/opt/work/ansible/playbooks/gowtham/vmfromtem
plate.yml': line 27, column 10, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: "vcesys_esx_mgmt"
ip: "10.1.1.10"
^ here
--
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/09298fdf-b5d7-4c59-8a42-da17e31bce4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.