Re: [ansible-project] deploy VM from template and customize guest

2020-06-11 Thread Tony Wong
can i get some help w this? My account to join the domain keeps getting locked out. This password has spaces in it like this "This is my pa$$w0rd!" but account keeps getting locked out On Tue, Jun 9, 2020 at 8:31 AM Tony Wong wrote: > ok I was able to use the customization_spec to join the mac

Re: [ansible-project] deploy VM from template and customize guest

2020-06-09 Thread Tony Wong
ok I was able to use the customization_spec to join the machine to the domain But how do I assign the statistic IP to the server? my host file looks like this before using the customization_spec [prod-k8s-workers] prod-k8s-worker01 deploy_vsphere_datastore='RW-VA-NIM-VOL9' guest_custom_ip='10.

Re: [ansible-project] deploy VM from template and customize guest

2020-06-09 Thread Tony Wong
hi for customization: domainadmin: '{{ lookup("env", "ANSIBLE_NET_USERNAME") }}' domainadminpassword: '{{ lookup("env", "ANSIBLE_NET_PASSWORD") }}' joindomain: domain.fqdn what does this mean? lookup("env", "ANSIBLE_NET_USERNAME" are you manually putting the username

Re: [ansible-project] deploy VM from template and customize guest

2020-06-08 Thread Dave York
I'm not using a customization template, but it may be possible - I think that's what David Foley was referencing. Check out customization_spec within the vmware_guest module https://docs.ansible.com/ansible/latest/modules/vmware_guest_module.html You can use the method im using OR you can call

Re: [ansible-project] deploy VM from template and customize guest

2020-06-08 Thread Tony Wong
Thank you. So for the customization part, i didnt see a mention of the name of the customization template in vcenter. so ansible does not use that ? On Mon, Jun 8, 2020 at 9:46 AM Dave York wrote: > These are the two plays I use to do what you were asking about: > > - name: Ensure Computer Obje

Re: [ansible-project] deploy VM from template and customize guest

2020-06-08 Thread Dave York
These are the two plays I use to do what you were asking about: - name: Ensure Computer Object exists in AD win_domain_computer: name: '{{ inventory_hostname_short }}' dns_hostname: '{{ inventory_hostname }}' domain_server: domaincontroller.fqdn sam_account_name: '{{ in

Re: [ansible-project] deploy VM from template and customize guest

2020-06-08 Thread Dave York
These are the two plays I use to do what you're talking about: - name: Ensure Computer Object exists in AD win_domain_computer: name: '{{ inventory_hostname_short }}' dns_hostname: '{{ inventory_hostname }}' domain_server: DC you want to run the prestage computer object on

Re: [ansible-project] deploy VM from template and customize guest

2020-06-08 Thread David Foley
So you want to do something like Terraform init / plan & Apply and once finished you want to do a Terraform Destroy? No Ansible doesn't do State Files -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

Re: [ansible-project] deploy VM from template and customize guest

2020-06-08 Thread David Foley
> > I'll assume you are refering to Custom Specs within vCenter : > > You can use the following: https://docs.ansible.com/ansible/latest/modules/vmware_guest_module.html *customization_spec*

Re: [ansible-project] deploy VM from template and customize guest

2020-06-08 Thread Tony Wong
for ansible, is there a reverse order to detroy the vms after the vm playbook has been run like terraform? Or do I need to create another playbook to destroy the vms? On Mon, Jun 8, 2020 at 6:59 AM Tony Wong wrote: > I got a customization template in vcenter. how do I specify using that > templa

Re: [ansible-project] deploy VM from template and customize guest

2020-06-08 Thread Tony Wong
I got a customization template in vcenter. how do I specify using that template. Also the template looks like will override my static IP settings on my Vms. On Sun, Jun 7, 2020 at 3:31 PM Dave York wrote: > Ive done this by using the customization argument of the vmware_guest > module to join th

Re: [ansible-project] deploy VM from template and customize guest

2020-06-07 Thread Dave York
Ive done this by using the customization argument of the vmware_guest module to join the domain. but prior to vmware_guest i use a win_domain_computer delegated to a windows utility box to prestage the computer object in the right ou Sent from Outlook Mobile -- You rece