Hello ,
I write an ansible playbook to clone vm linux gues , t but how can change
the guest name after the clone ?
the command i use to run is :
ansible-playbook -i hosts.vms clone_playbook.yml
hosts.vms
mfp-svt-trial77 datastore='Qa-DataStore' network='NET-10.100.227.0/25'
clone_playbook.yml
here his my plabook
---
- hosts: vmcreate
gather_facts: false
connection: local
user: remote
sudo: true
vars:
vcenter_hostname: 'wl-manager01.mydomain.com'
vcenter_user: '[email protected]'
vcenter_pass: 'passw0rd'
datacenter: 'MFP-ISRAEL'
esxi_host: 'wl-esxi510-qa.mydomain.com'
folder: 'SVT-Automation'
notes: 'Created by Ansible'
tasks:
- vsphere_guest:
vcenter_hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_user }}"
password: "{{ vcenter_pass }}"
guest: "{{ inventory_hostname }}"
from_template: yes
template_src: mfp-vm-basic
cluster: Worklight
validate_certs: no
vm_extra_config:
notes: "{{ notes }}"
folder: "{{ folder }}"
esxi:
datacenter: "{{ datacenter }}"
hostname: "{{ esxi_host }}"
--
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/87c15344-efac-40fd-b060-23213156fa19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.