[ansible-project] Re: not able to echo value of hostvars in another host

2019-07-30 Thread Kunalsing Thakur
Guies Anyone help one this. On Tuesday, July 30, 2019 at 7:45:12 PM UTC+5:30, Kunalsing Thakur wrote: > > The following Result:- > > TASK [debug] > *** > task path: /etc/ansible/playbooks/test.yaml:59 > ok: [127.0.0.1] => { >

Re: [ansible-project] Re: Isn't password declared in plain text under vars when using kerberos ?

2019-07-30 Thread Neeraj Shah
Thank you Jordan. On Tue, Jul 30, 2019, 6:58 PM Jordan Borean wrote: > There are multiple ways you can get around this, you could; > >- Store the password in a vault file so the user would need to know >the vault key when running your playbook >- Use a lookup plugin to lookup the

Re: [ansible-project] Cannot reach newly created Windows VM

2019-07-30 Thread Walter Kessler
So, I discovered the powershell command to do this "invoke-webrequest" and it worked on a playbook as expected. However, the 'inventory' issue still remains -- the machine has to BE in the inventory assigned to the job template or the callback won't work. I can obviously just add and inventory

[ansible-project] Re: ansible failing on windows machines that used to work

2019-07-30 Thread Jordan Borean
It could be due to various reasons but you need to figure out where it is hanging, can you see; - If there is a running powershell.exe process on your Windows host, try and check when the task actually runs to see if the process ran and finished - Can you see any network traffic

[ansible-project] Re: Ansible V2.7 - kerberos: authGSSClientStep() failed:

2019-07-30 Thread Jordan Borean
Part of the Kerberos authentication process is to lookup the remote server in the KDC database (AD database). If it cannot find that server then you will get this error. In this case it will lookup the host using the SPN 'HTTP/gcp-bashost.NORTHIND.INTERNAL' . If you have defined ansible_host

[ansible-project] Re: Isn't password declared in plain text under vars when using kerberos ?

2019-07-30 Thread Jordan Borean
There are multiple ways you can get around this, you could; - Store the password in a vault file so the user would need to know the vault key when running your playbook - Use a lookup plugin to lookup the password during runtime - Don't use a password at all, kerberos can use the

Re: [ansible-project] How do i respond to a same response with different input using ansible expect module

2019-07-30 Thread ansi ari
thank you, it works. On Tue, Jul 30, 2019 at 11:10 AM Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On 30.07.2019 20:04, ansi ari wrote: > > I tried with single list and that works fine. But my reponses are like > > this: > > Enter command: "U" > > Enter choice :

[ansible-project] ansible failing on windows machines that used to work

2019-07-30 Thread William Dossett
I have about 90 windows VMs that I use ansible on to configure and pull windows updates. I upgraded from ansible 2.7 to 2.8.1 - I think thats when this started. The windows server are all 2008 R2. Today when I try to run a playbook against them that does a simple win_regmerge, it get thru 3

Re: [ansible-project] How to save an array of facts using a debug: msg and with_sequence?

2019-07-30 Thread Kai Stian Olstad
On 30.07.2019 22:08, Gabriel Rios wrote: > This gives me 2 values: > > TASK [debug] > *** > ok: [10.240.30.249] =>

Re: [ansible-project] How to save an array of facts using a debug: msg and with_sequence?

2019-07-30 Thread Gabriel Rios
This gives me 2 values: TASK [debug] *** ok: [10.240.30.249] => (item={u'caption': u"c:\\ 'pagefile.sys'",

Re: [ansible-project] Odd case where I cannot figure out how to eliminate {{ }} in a when: clause

2019-07-30 Thread Rob Wagner
Thank you both, and apologies for not responding sooner (got yanked onto something else). vars[] worked great. Rob On Thu, Jul 25, 2019 at 7:00 PM Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On 25.07.2019 23:12, Brian Coca wrote: > > yes, but your example only handles

Re: [ansible-project] How to save an array of facts using a debug: msg and with_sequence?

2019-07-30 Thread Kai Stian Olstad
On 30.07.2019 19:45, Gabriel Rios wrote: > Hi, > > The following are facts from win_pagefile query. From these, I want to > retrieve the "maximum_size" fact of every element in the "pagefiles" array, > then subtract the "initial_size" fact and divide that by 1024 in order to > get every pagefile

[ansible-project] Isn't password declared in plain text under vars when using kerberos ?

2019-07-30 Thread Neeraj Shah
Hi All, As per official docs, using ansible to manage windows hosts requires us to specify the password in plain text for *ansible_winrm_transport* variable in the hosts file or the group_vars file. My question or confusion is doesn't security take a beating here ? In most cases we end up

Re: [ansible-project] How do i respond to a same response with different input using ansible expect module

2019-07-30 Thread Kai Stian Olstad
On 30.07.2019 20:04, ansi ari wrote: > I tried with single list and that works fine. But my reponses are like > this: > Enter command: "U" > Enter choice : "S" > Enter command: "M" > Enter choice: "U" > Enter choice: "S" > Enter choice: "b" >

Re: [ansible-project] How do i respond to a same response with different input using ansible expect module

2019-07-30 Thread ansi ari
I tried with single list and that works fine. But my reponses are like this: Enter command: "U" Enter choice : "S" Enter command: "M" Enter choice: "U" Enter choice: "S" Enter choice: "b" Enter Command: "q" if i give like this expect module will

Re: [ansible-project] How do i respond to a same response with different input using ansible expect module

2019-07-30 Thread Kai Stian Olstad
On 30.07.2019 18:24, ansi ari wrote: > Thank you, but i have something like this: if i use the list Enter one is > going to look for M right after U and thats not going to work. > > responses: >> * Enter one*: "U" > Enter next: "S" >>*Enter one*: "M" >>Enter next: "U" >

Re: [ansible-project] How do i respond to a same response with different input using ansible expect module

2019-07-30 Thread ansi ari
Thank you, but i have something like this: if i use the list Enter one is going to look for M right after U and thats not going to work. responses: > * Enter one*: "U" Enter next: "S" > *Enter one*: "M" > Enter next: "U" Enter next: "S" On Monday, July 29, 2019 at 11:53:46 PM

RE: [ansible-project] Yet another dynamic variable problem

2019-07-30 Thread 'Mark Tovey - DSV' via Ansible Project
Okay, that makes sense and looks a lot simpler. I will try that. Thanks, -Mark -- -Original Message- From: ansible-project@googlegroups.com On Behalf

[ansible-project] Ansible V2.7 - kerberos: authGSSClientStep() failed:

2019-07-30 Thread Sushena Parthasarathy
Hi Team, we`re using Ansible v 2.7, below python modules for kerberos. We have switched from basic to kerberos auth all playbooks are failing with below error *Python (Kerberos) modules:* kerberos 1.3.0 requests-kerberos

[ansible-project] Re: not able to echo value of hostvars in another host

2019-07-30 Thread Kunalsing Thakur
The following Result:- TASK [debug] *** task path: /etc/ansible/playbooks/test.yaml:59 ok: [127.0.0.1] => { "hostvars[groups['msliv'][0]]['downgraderpmversion']['stdout']": "5.42.0-201809042105.733e1aa" } TASK [shell]

[ansible-project] not able to echo value of hostvars in another host

2019-07-30 Thread Kunalsing Thakur
--- - name: RollBack Rpm versions for {{ service_name }} hosts: local connection: local gather_facts: false tasks: - name: Getting host list from ipa shell: /etc/ansible/playbooks/hostfind.sh - name: Creating in memory inventory group for {{ nodetype }} in ansible playbook

Re: [ansible-project] Re: /etc/ntp.conf settings...?

2019-07-30 Thread Mike Eggleston
Thank you. I’m new to this system. Mike > On Jul 30, 2019, at 02:30, "p.cook...@bham.ac.uk" > wrote: > > I’ve not added anything, personally, but you could try searching Galaxy too > Mike (see eg below): > > [root@]# ansible-galaxy search ntp > > Found 353 roles matching your search: >

[ansible-project] Library Packages/Perl Modules

2019-07-30 Thread Keith Mills
I am installing required packages (and some Perl modules) with_items using default package manager. I receive the following error: failed: [abldeb7ex6401] (item=libssl-dev) => {"ansible_loop_var": "item", "cache_update_time": 1560284504, "cache_updated": false, "changed": false, "item":

Re: [ansible-project] Ansible for Openstack

2019-07-30 Thread Dick Visser
Use a loop to repeat the task as many times as you need On Tue, 30 Jul 2019 at 10:26, Rahul Kumar wrote: > Hi Team, > Currently I am trying to provision Openstack resources using Ansible with > sample template snippet as below: > os_server: > state: present > cloud: smscrhosp >

Re: [ansible-project] Re: Need Help for REST API integration with Ansible

2019-07-30 Thread Rahul Kumar
Thanks abhijeet . - https://github.com/ansible/ansible/tree/devel/lib/ansible/plugins/httpapi - What this plugin does , any usage , as i dont see any readme file also? or i need to look at its code? Regards Rahul On Tue, 30 Jul 2019 at 15:42, Abhijeet Kasurde wrote: > > > On Tuesday, July

[ansible-project] Re: Need Help for REST API integration with Ansible

2019-07-30 Thread Abhijeet Kasurde
On Tuesday, July 23, 2019 at 6:09:06 PM UTC+5:30, Rahul Kumar wrote: > > There is URI module present in Ansible which lets you invoke REST End > Points and it works preety well. > Currently i have lot of JSON Objects and corresponding REST end points > ofcourse for each. > Is it a good

Re: [ansible-project] Re: Need Help for REST API integration with Ansible

2019-07-30 Thread Mark Anthony Garcia
It is best to use jinja template to create the bosy file and call it for scalability. This is what I do using data from mssql query. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails

Re: [ansible-project] Re: Need Help for REST API integration with Ansible

2019-07-30 Thread Rahul Kumar
Thanks Andrew , but is it good to make each and every parameter of Rest api response as configurable using Ansible , considering we have huge parameters? On Tue, 30 Jul 2019 at 3:19 PM, Andrew Feller wrote: > You really should consider developing a plugin for this rather than > twisting YAML to

Re: [ansible-project] Re: Need Help for REST API integration with Ansible

2019-07-30 Thread Andrew Feller
You really should consider developing a plugin for this rather than twisting YAML to make it happen. Check out https://docs.ansible.com/ansible/latest/dev_guide/developing_plugins.html for writing this in Python in a way that’s callable from Ansible Sent from my iPhone > On Jul 30, 2019, at

[ansible-project] Re: Need Help for REST API integration with Ansible

2019-07-30 Thread Rahul Kumar
Any experts view on this ? On Tue, 23 Jul 2019 at 18:08, Rahul Kumar wrote: > There is URI module present in Ansible which lets you invoke REST End > Points and it works preety well. > Currently i have lot of JSON Objects and corresponding REST end points > ofcourse for each. > Is it a good

Re: [ansible-project] How do i respond to a same response with different input using ansible expect module

2019-07-30 Thread Kai Stian Olstad
On 30.07.2019 01:28, ansi ari wrote: I am able to do with different responses with expect module, but i have same responses multiple times with different prompt. eg: responses: Enter one: "A" Enter next: "B" Enter next: "c" can anyone have a better idea? You use a list responses: