Re: [ansible-project] Idempotency in amazon..aws.ec2

2021-05-06 Thread Dave York
sible/latest/collections/amazon/aws/ec2_module.html#parameter-id > > > On Thu, 6 May 2021 at 00:22, Dave York wrote: > >> Hi ansible squad! >> >> I've been using amazon.aws.ec2 (or community.aws.ec2_instance - ive been >> switching back and forth) to ensu

[ansible-project] Idempotency in amazon..aws.ec2

2021-05-05 Thread Dave York
Hi ansible squad! I've been using amazon.aws.ec2 (or community.aws.ec2_instance - ive been switching back and forth) to ensure there is an ec2 instance created for each {{ inventory_hostname }} by using tags. It doesn't seem to work. Every time I run the playbook with the below play, it

[ansible-project] python 'requests' module installed but ansible doesnt think it is

2021-02-26 Thread Dave York
Hi all - Im trying to get community.vmware.plugins.inventory.vmware_vm_inventory working, but when I try to parse a yml inventory referencing the plugin I get the following error: *[WARNING]: * Failed to parse /home/user/hosts.vmware.yml with*

[ansible-project] Re: trying to enable winrm over https on new VM

2020-06-17 Thread Dave York
If you're building from a template, you could bake the winrm changes into the template - you could also use the vmware customization to run the COnfigureRemotingForAnsible.ps1 script I link below See this page for some in depth on setting things up:

[ansible-project] Re: Windows Domain/Ansible Kerberos Auth Issues Still

2020-06-15 Thread Dave York
The machines being managed here are windows machines - but the ansible tower server itself is linux (obviously) - I wonder if the kerberos configuration on the tower machine may be running into a flavor of what you're suggesting - but im not sure exactly how I would point the tower server

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

2020-06-08 Thread Dave York
customization_spec On Monday, June 8, 2020 at 10:06:57 AM UTC-7, Tony Wong wrote: > > 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

[ansible-project] Windows Domain/Ansible Kerberos Auth Issues Still

2020-06-08 Thread Dave York
(I've posted a bit about this before, but I want to revisit it because its frustrating as I try to optimize my playbooks) I have a playbook where I build servers from vmware templates using vmware_guest and I join the domain using that module. Once the servers are built I have an extremely

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

2020-06-08 Thread Dave York
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

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

2020-06-08 Thread Dave York
n, Jun 8, 2020 at 6:59 AM Tony Wong > > wrote: > >> 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 Y

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

Re: [ansible-project] jinja template not evaluating conditional as expected

2020-04-03 Thread Dave York
That worked! Thanks Stefan! I swear the other way worked for me once, but I like your solution is more graceful. -- 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

[ansible-project] jinja template not evaluating conditional as expected

2020-04-02 Thread Dave York
I have a playbook that calls win_template: - name: Template domain.xml win_template: src: 'domain.xml.jinja' dest: 'e:\domain.xml' Within the template I have this section below. I have confirmed (with a debug statement in the play above) that enable_target is set to 'true'.

[ansible-project] Re: win_xml module 'cannot call a method on a null-valued expression'

2020-03-31 Thread Dave York
I figured this out. Turned out that my xml was using a different namespace? I had to follow guidance I found on stackoverflow: https://stackoverflow.com/questions/5239685/xml-namespace-breaking-my-xpath So my play now looks like this (and works): tasks: - name: Test modifying XML

[ansible-project] Re: win_xml module 'cannot call a method on a null-valued expression'

2020-03-31 Thread Dave York
I forgot to add, the domain tag is: not just if that's relevant. On Tuesday, March 31, 2020 at 3:15:35 PM UTC-7, Dave York wrote: > > I have an JBoss domain.xml file im trying to manipulate with w

[ansible-project] win_xml module 'cannot call a method on a null-valued expression'

2020-03-31 Thread Dave York
I have an JBoss domain.xml file im trying to manipulate with win_xml: ... When I try to modify the heap size attribute above using win_xml with

[ansible-project] Re: Weird Kerberos Issues with WinRM and a new host spun up from vmware_guest

2020-03-10 Thread Dave York
Yep - I am joining the domain as part of the customization in vmware_guest. I do that locally from the tower box. After vmware_guest I have a wait_for port 5985 with a 360 timeout. I guess I was trying to avoid the 600 second sleep but I guess if it works, it works. Thanks for the

[ansible-project] Re: Weird Kerberos Issues with WinRM and a new host spun up from vmware_guest

2020-03-10 Thread Dave York
Thanks David - I've been trying to use Kerberos, and it should be enabled. I'm only connecting as a domain admin so Kerberos should work (or so I gather): Auth Basic = false Kerberos = true Negotiate = true Certificate = false

[ansible-project] Weird Kerberos Issues with WinRM and a new host spun up from vmware_guest

2020-03-10 Thread Dave York
Hi Ansible Community. I've been struggling with an issue I've actually posted about here before. It's more of an annoyance than anything but I'd really love to get past it, as I'm trying to demo Infrastructure-as-code to my org. I have a playbook that spins up a new vm using vmware_guest,

[ansible-project] Re: Swapping credentials

2020-03-02 Thread Dave York
I think you got it figured out Jordan. I tried with a object that didn't previously exist and it worked. I've been manually deleting the old computer objects beforehand, but I dont think I've been giving it enough time to replicate (our AD structure is messy/slow right now) I'll probably work

[ansible-project] Re: Swapping credentials

2020-03-01 Thread Dave York
/hostname.internal.domain; WSMAN/hostname. Additional Data The error received was 1355: %%1355. User Action The SPNs can be created by an administrator using setspn.exe utility. On Sunday, March 1, 2020 at 2:58:06 PM UTC-8, Dave York wrote: > > Second Run (from failure) gets further (?!?!) >

[ansible-project] Re: Swapping credentials

2020-03-01 Thread Dave York
Second Run (from failure) gets further (?!?!) [image: ansible-krb3.png] On Sunday, March 1, 2020 at 2:57:18 PM UTC-8, Dave York wrote: > > First run looks the same: > > [image: ansible-krb2.png] > > > > > > > > > On Sunday, March 1, 2020 at 2:38:29

[ansible-project] Re: Swapping credentials

2020-03-01 Thread Dave York
First run looks the same: [image: ansible-krb2.png] On Sunday, March 1, 2020 at 2:38:29 PM UTC-8, Dave York wrote: > > Thanks again for the help on this. > > I double verified the machine credential is a domain admin, and verified > that time is in-sync between the ans

[ansible-project] Re: Swapping credentials

2020-03-01 Thread Dave York
Thanks again for the help on this. I double verified the machine credential is a domain admin, and verified that time is in-sync between the ansible tower host and the domain. I'll try setting ansible_winrm_transport: kerberos and ansible_winrm_message_encryption: always and see what happens

[ansible-project] Re: Swapping credentials

2020-03-01 Thread Dave York
You can actually see kerberos failing within the same play... It will run various commands then just randomly run into one that it gets the kerberos error on. [image: ansible-krb.png] This is what that play looks like in yaml: tasks: - name: Ensure SMBv1 is disabled

[ansible-project] Re: Swapping credentials

2020-03-01 Thread Dave York
hair out here, not sure whats going on On Friday, February 28, 2020 at 10:13:52 AM UTC-8, Dave York wrote: > > Hi Ansible Community! > > I have a playbook running against windows servers. I have one play where > I'm connecting as the local administrator, then a second

[ansible-project] Re: Swapping credentials

2020-02-29 Thread Dave York
LogonUser 1326: %%1326 On Saturday, February 29, 2020 at 9:13:20 PM UTC-8, Dave York wrote: > > Further troubleshooting makes this seem like it has something to do with > time (GPO applying maybe?) > > I can run another job with the same connection to staging_domain and > ev

[ansible-project] Re: Swapping credentials

2020-02-29 Thread Dave York
, February 29, 2020 at 7:33:38 PM UTC-8, Dave York wrote: > > Thanks Jordan, I think you kicked me in the right direction, but still > missing something. I'm following your guidance somewhat, but I'm adding > the inventory within the playbook instead of in the inventory: > > -

[ansible-project] Re: Swapping credentials

2020-02-29 Thread Dave York
Thanks Jordan, I think you kicked me in the right direction, but still missing something. I'm following your guidance somewhat, but I'm adding the inventory within the playbook instead of in the inventory: - name: add new host staging_domain to inventory add_host: name:

[ansible-project] variable undefined?

2020-02-29 Thread Dave York
I'm confused why I'm getting a 'variable undefined' error with this playbook, anyone have any idea? - hosts: localhost connection: local gather_facts: yes tasks: - name: Generate a temporary random password for template/os customization set_fact: randopass: "{{

[ansible-project] Swapping credentials

2020-02-28 Thread Dave York
Hi Ansible Community! I have a playbook running against windows servers. I have one play where I'm connecting as the local administrator, then a second play where I'm connecting as a domain user. I'm confused on how to do this. I'm running from Ansible Tower so I have the domain user as the

Re: [ansible-project] Connecting to a WinRM host with different credentials?

2020-02-23 Thread Dave York
That was what I was looking for. Thanks Jordan/Tom On Sunday, February 23, 2020 at 10:52:47 AM UTC-8, Jordan Borean wrote: > > Further to the above, those are variables and not attributes you can set > on a play. You need to set them under your the vars key or just add them > using add_host in

[ansible-project] Connecting to a WinRM host with different credentials?

2020-02-22 Thread Dave York
I have a playbook in which I want to create a random password and use it later to connect to a windows box over WinRM I've generated a random password like this: - name: Generate a temporary random password for new host set_fact: randopass: "{{ lookup('password', '/dev/null