[ansible-project] Updating list of dictionary values from another list

2020-03-10 Thread soumya dutta
Hi all, I have a list of dictionaries where I need to update a value sequentially from another list. 1st dictionary: Xyz: 1: Name: abc State: 2: Name: cdf State: Now I have a list as below: - ghi - uvw How can I place the first value in list that is ghi to the dictionary..also

[ansible-project] Inventory gathering including docker version

2020-03-10 Thread Kuber User
HI, I am doing a similar script to gather inventory of remote systems. I have the input list in my inventory file as the list of remote IPs. I need to extract the fields like CPU, RAM, Kernel version, and the docker version running on those boxes. I am currently using the following cmd to extract

[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 insight,

[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

Re: [ansible-project] json_query/jmespath filtering question

2020-03-10 Thread Nick Schendel
Oops I said the wrong register variable name in my question. snapshotlist is the registered output of a previous task, snapshotdetails is the register of the task right before this particular task. the chunk of json I pasted in is pulled from the previous task's output. I was previously able t

Re: [ansible-project] Re: Testing Authentication with Ansible

2020-03-10 Thread 'J Hawkesworth' via Ansible Project
I think you should be able to do this with uri module, but you might need to check the http response code as well. An unsuccessful http request with basic authentication will return a response from the server, but it will typically not have a 200 (OK) response code, but instead have something

Re: [ansible-project] json_query/jmespath filtering question

2020-03-10 Thread Dick Visser
You need to filter a variable through json_query. Also, I don't see any key called 'snapshotdetails'. And that json string should be filtered through from_json, ideally. It looks like your "json" var isn't really what you are using. If I shuffle things around slightly, then below playbook works:

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

2020-03-10 Thread 'J Hawkesworth' via Ansible Project
Just to be clear, are you joining the host to the domain as part of the vmware_guest call? I have playbooks that do something similar to what you describe but with some differences. I like to drive everything from inventory so I add the host details to (static) inventory and then run the playbo

[ansible-project] json_query/jmespath filtering question

2020-03-10 Thread Nick Schendel
Trying to wrap my head about how to query json results from a URI call & could use some guidance. I am guessing there are plenty in this group which this will be an easy question for. I am registering the json response from a URI call to our backup system to 'snapshotlist' Here is an example

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

2020-03-10 Thread David Foley
Did you Configure the WinRM ? for CredSSP ? runonce: - powershell.exe -ExecutionPolicy Unrestricted wget https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile C:\Windows\Temp\ConfigureRemotingForAnsible.ps1 -

Re: [ansible-project] Ansible password_hash issue

2020-03-10 Thread Stefan Hornburg (Racke)
On 3/10/20 1:20 PM, Bala Mutyam wrote: > Hi Everyone, > > I'm trying to create a task for below command but it's not working, can you > help me how to make it work please? > > Command: > > |update users set crypted_password = > '$2a$12$uCkkXmhW5ThVK8mpBvnXOOJRLd64LJeHTeCkSuB3lfaR2N0AYBaSi', sa

[ansible-project] docker_secret module does not behave the same as docker recommended approach

2020-03-10 Thread Matthew Wimpelberg
I recently moved my Docker Swarm setup to Ansible and found an issue with the docker_secret module. In each container my code runs cat /run/secrets/* > all_secrets to concatenate all of the secrets into a file where each line is a secret. Previous to Ansible, we echoed the secret and piped it

Re: [ansible-project] Ansible password_hash issue

2020-03-10 Thread Dan Linder
What is the error and what is sending the error? (i.e. is the error from "psql" or from Ansible itself?) Can you run the playbook with "-vvv" and paste in the errors the "Reset Admin pw" step produces. On Tuesday, March 10, 2020 at 11:12:17 AM UTC-5, Bala Mutyam wrote: > > Hi, > > Thanks for t

[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, a

Re: [ansible-project] Re: Module nxos_user not recognizing fails saying role is invalid

2020-03-10 Thread Eliezer Rodriguez
Got it ! Thanks Alex for taking the time to respond ! Elie On Wed, Feb 12, 2020, 5:13 PM 'Alex King' via Ansible Project < ansible-project@googlegroups.com> wrote: > I had the same problem. It seem like it is a shortcoming of the nxos_user > module. It seems like roles are checked against a ha

Re: [ansible-project] Ansible password_hash issue

2020-03-10 Thread Bala Mutyam
Hi, Thanks for the reply. By hard coding the hash working fine. I'm trying to workout something like this but this is giving me an error. - name: Reset Admin pw become: yes become_user: postgres command: psql -c "update users set crypted_password = '{{ admin_password | password_hash('b

[ansible-project] Re: Ansible password_hash issue

2020-03-10 Thread Bala Mutyam
Hi, Thanks for the reply. By hard coding the hash working fine. I'm trying to workout this but this is giving me an error. - name: Reset Admin pw become: yes become_user: postgres command: psql -c "update users set crypted_password = '{{ admin_password | password_hash('bcrypt', salt=No

[ansible-project] ansible to create multiple security groups with os_security_group module

2020-03-10 Thread Robert
Hey everyone, Has anyone been successful in using the openstack module os_security_group to create a list of security groups? Here is what I have: * hosts: localhost gather_facts: no vars_prompt:- name: username prompt: "What is your username?" private: n

Re: [ansible-project] Ansible password_hash issue

2020-03-10 Thread Dick Visser
You manual command has more arguments than the one in your task. Try making that consistent. If that doesn't work, try hardcoding the hash in your task to see if that works at all. On Tue, 10 Mar 2020 at 13:21, Bala Mutyam wrote: > > Hi Everyone, > > I'm trying to create a task for below comm

[ansible-project] Ansible password_hash issue

2020-03-10 Thread Bala Mutyam
Hi Everyone, I'm trying to create a task for below command but it's not working, can you help me how to make it work please? Command: update users set crypted_password = '$2a$12$uCkkXmhW5ThVK8mpBvnXOOJRLd64LJeHTeCkSuB3lfaR2N0AYBaSi', salt=null, hash_method='BCRYPT' where login = 'admin' - na

[ansible-project] Re: SSL: DH_KEY_TOO_SMALL in ACI module

2020-03-10 Thread Ben Sikkens
Hi All, I found out how to test some things turns out there is indeed a certificate with a vulnerable DH Key. So this issue is solved. - Ben Op maandag 9 maart 2020 17:33:00 UTC+1 schreef Ben Sikkens: > > Hi, > > I ran into an issue after updating to Ansible 2.8.5 (in AWX 9.1.1) > This used to