Re: [ansible-project] Cannot use signature-based authentication because pyopenssl is not available

2019-09-24 Thread Vladimir Botka
On Wed, 25 Sep 2019 05:58:08 +0200 Dick Visser wrote: > Your ansible is using python2. > So either install ansible using python3, or install pyopenssl for python2 > (if that’s possible at all, can’t tell from here). > > On Wed, 25 Sep 2019 at 01:23, Antien Ho wrote: > > environment: windows 10

Re: [ansible-project] Cannot use signature-based authentication because pyopenssl is not available

2019-09-24 Thread Dick Visser
Your ansible is using python2. So either install ansible using python3, or install pyopenssl for python2 (if that’s possible at all, can’t tell from here). Dick On Wed, 25 Sep 2019 at 01:23, Antien Ho wrote: > environment: windows 10 Ubuntu 18.04 LTS. > python version as standard: > >

[ansible-project] Cannot use signature-based authentication because pyopenssl is not available

2019-09-24 Thread Antien Ho
environment: windows 10 Ubuntu 18.04 LTS. python version as standard: ansible-playbook 2.8.5 config file = /etc/ansible/ansible.cfg configured module search path = [u'/home/antienho/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location =

Re: [ansible-project] traversing directory structure

2019-09-24 Thread Vladimir Botka
On Tue, 24 Sep 2019 12:57:35 -0700 (PDT) Gregory Edigarov wrote: > hello, > > let's look at the following structure: > var/ > ssh/ >user1 >user2 >user3 > > hosts/ >host1/ > user1 > user3 > > host2/ >user2 >user3 > > under /var/ssh there are public

[ansible-project] Re: Loading variables with data from REST

2019-09-24 Thread Paul Hoffman
Thanks Nick, That worked great to give me back the value itself. On Tuesday, September 24, 2019 at 2:10:46 PM UTC-5, Nick Schendel wrote: > > I am working on some playbooks right now using the URI module and doing > what you describe. If you register the output of the task, you can call the

[ansible-project] traversing directory structure

2019-09-24 Thread Gregory Edigarov
hello, let's look at the following structure: var/ ssh/ user1 user2 user3 hosts/ host1/ user1 user3 host2/ user2 user3 under /var/ssh there are public keys for users files under host1,host2 catalog are empty files just pointing ansible on which host which

Re: [ansible-project] Getting error for ".stdout_lines" for a registered variable

2019-09-24 Thread Rakesh Parida
Hi Kai, I could do achieve what i intended. I made the following changes using Jinja format and my issue solved. Thanks for the help. Th echanges i made was: In the Instance id section i used the foloing formula and it worked like a charm. - name: Set fact for Instance id from Tenant ID

Re: [ansible-project] Connection via Citrix

2019-09-24 Thread goforawalktwice
I've been setting up Citrix client applications (VDA virtual desktop agent) via ansible and having Citrix admin people publish. VDA runs on a server that is like any other server ... Winrm etc. -- You received this message because you are subscribed to the Google Groups "Ansible Project"

[ansible-project] Re: traversing directory structure

2019-09-24 Thread Gregory Edigarov
sorry, slip of fingers, will do another post On Tuesday, September 24, 2019 at 10:34:43 PM UTC+3, Gregory Edigarov wrote: > > hello > > let's look at example: directory structure > > vars/ > ssh/ > user1 > > > > -- You received this message because you are subscribed to the Google

[ansible-project] traversing directory structure

2019-09-24 Thread Gregory Edigarov
hello let's look at example: directory structure vars/ ssh/ user1 -- 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

[ansible-project] Re: Loading variables with data from REST

2019-09-24 Thread Nick Schendel
I am working on some playbooks right now using the URI module and doing what you describe. If you register the output of the task, you can call the response contents with output.json.keyname. Where output is the name you used in the register. So as an example: - name: get some value via URI

[ansible-project] VMware Dynamic Inventory Plugin Performance Configuration

2019-09-24 Thread Scott MacDonald
Just setup the VMware Dynamic Inventory Plugin, as documented at https://docs.ansible.com/ansible/latest/scenario_guides/vmware_scenarios/vmware_inventory.html It was easy enough to follow and get it to "functionally" work, but its performance returning inventory from my tiny little 143 VM

Re: [ansible-project] Loading variables with data from REST

2019-09-24 Thread Mark Anthony Garcia
I've used this using uri module, fust to get the cookies and use the cookie to run several api queries. I used jinja to template the data for API PUT and POST but it's a bit tricky with the formating. I'm not in front of my pc but perhaps first thing tomorrow I'll share what I have. Mark Garcia

[ansible-project] Loading variables with data from REST

2019-09-24 Thread Paul Hoffman
I'd like to leverage systems with an API to provide variables to playbooks running on the controller. Something similar to a dynamic inventory script loading from an external system. For example with a curl command and can get the exact contents I need. IE: {"myVariable":"myValue"} or yaml

Re: [ansible-project] Getting error for ".stdout_lines" for a registered variable

2019-09-24 Thread Karl Auer
Post the *complete* output of - debug: var: instid Posting snippets is useless. On Wed, Sep 25, 2019 at 3:39 AM Rakesh Parida wrote: > There are 11 items , i will paste the out put of one item, all others are > similar, or this mail will be lengthy. SO pasting the out put of one item. > >

Re: [ansible-project] Getting error for ".stdout_lines" for a registered variable

2019-09-24 Thread Kai Stian Olstad
On 24.09.2019 19:48, Rakesh Parida wrote: > Hi Kai, > > I had already tried it it gives me o/p as same as : > debug: > msg: {{ instid }} > > Both the o/ps are similar. > > Now i want the stdout_lines for each item as my desired o/p > something like: > e8ebc5a4-17f3-4b80-a935-03164211a804

Re: [ansible-project] Getting error for ".stdout_lines" for a registered variable

2019-09-24 Thread Rakesh Parida
Hi Kai, I had already tried it it gives me o/p as same as : debug: msg: {{ instid }} Both the o/ps are similar. Now i want the stdout_lines for each item as my desired o/p something like: e8ebc5a4-17f3-4b80-a935-03164211a804 TOMICS2 7865dvgsf-17f3-4b80-a935-03164211a804 TOMICS1

Re: [ansible-project] Getting error for ".stdout_lines" for a registered variable

2019-09-24 Thread Rakesh Parida
There are 11 items , i will paste the out put of one item, all others are similar, or this mail will be lengthy. SO pasting the out put of one item. "_ansible_delegated_vars": { "ansible_delegated_host": "localhost", "ansible_host": "localhost"

Re: [ansible-project] Getting error for ".stdout_lines" for a registered variable

2019-09-24 Thread Kai Stian Olstad
On 24.09.2019 19:06, Rakesh Parida wrote: > - name: Retrieve instance id from tenant > shell: openstack server list --all-projects --project "{{ > tenantid.stdout }}" | awk 'NR > 3 { print $2, $4 }' | grep -i "{{ item }}" > with_items: "{{ hostvars[groups['nodes'][0]]['fact'] }}" >

Re: [ansible-project] Getting error for ".stdout_lines" for a registered variable

2019-09-24 Thread Karl Auer
What is the *complete* output from a debug of instid? Regards, K. On Wed, Sep 25, 2019 at 3:06 AM Rakesh Parida wrote: > Hi, > > I have playbook to retrieve the Instance id of Openstack nodes.Now > everything works fine but the resgitered value for instid.stdout_lines gets > an undefined

[ansible-project] Getting error for ".stdout_lines" for a registered variable

2019-09-24 Thread Rakesh Parida
Hi, I have playbook to retrieve the Instance id of Openstack nodes.Now everything works fine but the resgitered value for instid.stdout_lines gets an undefined error. *The error was: 'dict object' has no attribute 'stdout_lines'* .. but when i debug the complete registered variable instid i

[ansible-project] Ansible apt module question (Repository issues)

2019-09-24 Thread Tobias Klenota
Hi, i,m getting the "public key is not avaiable" error while using the apt module.(installing zabbix agent) I know i could just add the key, but my question is: Why does this error occure while im using ansible and its apt-module, but if i log into the server directly and use apt install i

Re: [ansible-project] Ansible Playbook and Jenkins

2019-09-24 Thread Vikrant Kaushik
Got it, thanks On Tuesday, 24 September 2019 18:43:30 UTC+5:30, Jonathan Lozada De La Matta wrote: > > this is the community alias. > > On Tue, Sep 24, 2019 at 9:09 AM Vikrant > wrote: > >> Hi Jonathan, >> >> I'll check it out, but if you can share any official Redhat Ansible then >> it would

Re: [ansible-project] Ansible Playbook and Jenkins

2019-09-24 Thread Jonathan Lozada De La Matta
this is the community alias. On Tue, Sep 24, 2019 at 9:09 AM Vikrant wrote: > Hi Jonathan, > > I'll check it out, but if you can share any official Redhat Ansible then > it would be great. > > regards > > Vikrant > > On Tue, Sep 24, 2019 at 6:18 PM Jonathan Lozada De La Matta < >

Re: [ansible-project] Ansible Playbook and Jenkins

2019-09-24 Thread Vikrant
Hi Jonathan, I'll check it out, but if you can share any official Redhat Ansible then it would be great. regards Vikrant On Tue, Sep 24, 2019 at 6:18 PM Jonathan Lozada De La Matta < jloza...@redhat.com> wrote: > This is a long conversation. I suggest you google this topic as there's > blogs

Re: [ansible-project] Ansible Playbook and Jenkins

2019-09-24 Thread Jonathan Lozada De La Matta
This is a long conversation. I suggest you google this topic as there's blogs and instructions out there. On Tue, Sep 24, 2019 at 8:24 AM Vikrant Kaushik wrote: > Hi, > > Can anybody advise how to run Ansible Playbook using Jenkins and how to > integrate. > > regards > > Vikrant > > -- > You

[ansible-project] Ansible Playbook and Jenkins

2019-09-24 Thread Vikrant Kaushik
Hi, Can anybody advise how to run Ansible Playbook using Jenkins and how to integrate. regards Vikrant -- 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

Re: [ansible-project] Connection via Citrix

2019-09-24 Thread James Cassell
On Tue, Sep 24, 2019, at 7:35 AM, Srinivas Naram wrote: > Hello Gurus, > > Few devices in my customer environment can be connected via Citrix. How > to connect to devices which are accessible only via Citrix using > Ansible ? > I'd guess this is not possible by design, though I would be

[ansible-project] Connection via Citrix

2019-09-24 Thread Srinivas Naram
Hello Gurus, Few devices in my customer environment can be connected via Citrix. How to connect to devices which are accessible only via Citrix using Ansible ? Thanks -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from

Re: [ansible-project] Issues generating dynamic host in Ansible loop.

2019-09-24 Thread Mohtashim S
Can you suggest what is the issue with this code ? - name: Add hosts include_tasks: "{{ playbook_dir }}/gethosts.yml" dest_ip: "{{ item.split('\t')[0] }}" groups: dest_nodes file_dets: "{{ item.split('\t')[1] }}" ansible_host: localhost

Re: [ansible-project] Issues generating dynamic host in Ansible loop.

2019-09-24 Thread Mohtashim S
Can you suggest what is the issue with this code ? - name: Add hosts include_tasks: "{{ playbook_dir }}/gethosts.yml" dest_ip: "{{ item.split('\t')[0] }}" groups: dest_nodes file_dets: "{{ item.split('\t')[1] }}" ansible_host: localhost

Re: [ansible-project] Issues generating dynamic host in Ansible loop.

2019-09-24 Thread Mohtashim S
The input data is not a fixed list but can be any number of lines returned by the database and registered by variable "command_result" as below": - name: "Play 1" hosts: localhost tasks: - name: "Search DB" command: > mysql --user=root --password=p@ssword deployment

Re: [ansible-project] Issues generating dynamic host in Ansible loop.

2019-09-24 Thread Vladimir Botka
On Mon, 23 Sep 2019 23:44:58 -0700 (PDT) Mohtashim S wrote: > command_result variable has has data like below. > > host6,host5\targ3 > host4,host3\targ1 > host1,host2,host5\targ2 > . > . > > I need to loop through each line of command_result. Pick the host list for > example

Re: [ansible-project] Issues generating dynamic host in Ansible loop.

2019-09-24 Thread Mohtashim S
@Dick; I need more help please. This is what I did but it is still failing. - name: Add hosts include_tasks: "{{ playbook_dir }}/gethosts.yml" dest_ip: "{{ item.split('\t')[0] }}" groups: dest_nodes file_dets: "{{ item.split('\t')[1] }}" ansible_host:

Re: [ansible-project] Issues generating dynamic host in Ansible loop.

2019-09-24 Thread Mohtashim S
@Dick; I need more help please. This is what I did but it is still failing. - name: Add hosts dest_ip: "{{ item.split('\t')[0] }}" file_dets: "{{ item.split('\t')[1] }}" ansible_host: localhost ansible_connection: local with_items: "{{

[ansible-project] How to login to webpage using ansible ?

2019-09-24 Thread kasturi vivek
How to login to any webpage(having to log in ID and Password) and need to attach the file in the page(website page0 by using ansible. could you please help me with this - name: Check url uri: url: https:www.facebook.com - name: login check uri: url:https:www.facebook.com

Re: [ansible-project] Issues generating dynamic host in Ansible loop.

2019-09-24 Thread Mohtashim S
@Dick; I need more help please. This is what I did but it is still failing. - name: Add hosts include_tasks: "{{ playbook_dir }}/gethosts.yml" file_dets: "{{ item.split('\t')[1] }}" ansible_host: localhost ansible_connection: local with_items: "{{

Re: [ansible-project] How to trigger Ansible Play in a loop

2019-09-24 Thread Mohtashim S
@Stefan, thank you for the reply. I have rephrased my query and posted to a new thread here: https://groups.google.com/forum/#!topic/ansible-project/tzFtb4MRZN0 Please suggest as feasible. On Monday, September 23, 2019 at 10:25:44 PM UTC+5:30, Stefan Hornburg (Racke) wrote: > > On 9/23/19

Re: [ansible-project] Issues generating dynamic host in Ansible loop.

2019-09-24 Thread Dick Visser
Instead of using add_host, use include_tasks to include a second task file. In there, iterate over a “split by comma” list and adds hosts. This gives you the second level of iteration. Dick On Tue, 24 Sep 2019 at 08:45, Mohtashim S wrote: > I have an ansible play that fetches multiline data

[ansible-project] Issues generating dynamic host in Ansible loop.

2019-09-24 Thread Mohtashim S
I have an ansible play that fetches multiline data from the database and registers it a variable "command_result" command_result variable has has data like below. host6,host5\targ3 host4,host3\targ1 host1,host2,host5\targ2 . . I need to loop through each line of command_result. Pick

[ansible-project] Cisco switch identifying unused port more than 90 days

2019-09-24 Thread rajthecomputerguy
Hi Team, I want to identify the switch ports which are not used more than 90 days. Has anyone done this project using ansible ? Thanks Pushparaj -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop