[ansible-project] ssh connection for the hosts in dynamic inventory

2021-04-29 Thread Sakshi Rathore
hello all, i have dynamically generated inventory like below, i want to establish ssh conenction to all the ips for istiotst and coremediaprod servers. I have ssh keys configured in the .ssh folder: when i run: ansible all -i inventory-ccp.ini -m ping i get connection 'success' only for is

[ansible-project] python script to run in playbook

2021-04-06 Thread Sakshi Rathore
hello all, Greetings. i was trying to run a python script in ansible playbook as below. name: execute install script script: parse.py this works, but i want to use the generated output of script into inventory file. could anyone please suggest how can i do this using ansible? -- You rece

Re: [ansible-project] dynamic inventory creation for complex json file

2021-03-25 Thread Sakshi Rathore
Is there any other approach to achieve this? On Wed, 24 Mar, 2021, 2:20 PM Sakshi Rathore, wrote: > i have written a python script to list all the ips for master nodes and > worker nodes with respect to cluster name. > but i am not sure how to do it for nested ip addresses. > &

Re: [ansible-project] dynamic inventory creation for complex json file

2021-03-24 Thread Sakshi Rathore
input1 : "{{ lookup('template', '../cluster.txt') }}" target1: "{{ input1 | json_query(jmesquery1) }} jmesquery1: "[*].node_groups[].nodes[].private_ip" On Wed, Mar 24, 2021 at 2:07 PM Abhijeet Kasurde wrote: > What have you tried so fa

[ansible-project] dynamic inventory creation for complex json file

2021-03-24 Thread Sakshi Rathore
hi all, i am having a complex json file with nested json structure. how can i create dynamic inventory using json file into ansible. i have tried many tutorials but due to compley json structure i am not getting it completely. please advise. -- You received this message because you are subs

Re: [ansible-project] merge json_query output

2021-03-24 Thread Sakshi Rathore
thanks for the advice :) On Tue, Mar 23, 2021 at 3:05 PM Dick Visser wrote: > > https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#selecting-from-sets-or-lists-set-theory > > On Tue, 23 Mar 2021 at 13:15, Sakshi Rathore > wrote: > > > > current

Re: [ansible-project] merge json_query output

2021-03-23 Thread Sakshi Rathore
;10.32.142.161', '10.32.142.162', '10.32.142.151', '10.32.142.160', '10.32.144.166', '10.32.144.164', '10.32.144.167', '10.32.144.173', '10.32.144.172', '10.32.50.177', '10.32.50.176', '1

[ansible-project] merge json_query output

2021-03-23 Thread Sakshi Rathore
hello all, i am getting 2 array of ips from 2 different json queries in ansible-playbook. how can i merge these 2 json queries? in below example i want to merge jmesquery and jmesquery1 - name: master ip list from json content #debug: msg="{{ input | json_query(jmesquery) }}" copy: conten

Re: [ansible-project] escape square bracket in ansible

2021-03-01 Thread Sakshi Rathore
d dynamically from a url and need to deploy certificates in all the ip addresses using ansible. On Mon, Mar 1, 2021 at 10:29 AM Vladimir Botka wrote: > On Mon, 1 Mar 2021 10:03:02 +0100 > Sakshi Rathore wrote: > > > instead of specific ip when i want all ip addresses without brack

Re: [ansible-project] escape square bracket in ansible

2021-03-01 Thread Sakshi Rathore
PST) > Sakshi Rathore wrote: > > > i need to insert some ip addresses from a file into dynamic inventory > file. > > while doing this i am getting square bracket also . > > how can i remove or escape square bracket into inventory file? > > sample input file is: &g

[ansible-project] escape square bracket in ansible

2021-02-28 Thread Sakshi Rathore
Hello everyone, Can anyone please advise how to escape square brackets from output in ansible? i need to insert some ip addresses from a file into dynamic inventory file. while doing this i am getting square bracket also . how can i remove or escape square bracket into inventory file? sample

Re: [ansible-project] jmespath error

2021-02-23 Thread Sakshi Rathore
d, Feb 24, 2021 at 12:25 PM Sakshi Rathore < > sakshirathore...@gmail.com> wrote: > >> Hi, >> >> could someone please advise. >> after running ansible playbook through jenkins i am getting below error: >> >> TASK [prep_ccp_inventor

[ansible-project] jmespath error

2021-02-23 Thread Sakshi Rathore
Hi, could someone please advise. after running ansible playbook through jenkins i am getting below error: TASK [prep_ccp_inventory : master ip list from json content] *** fatal: [playground.tank.local]: FAILED! => {"msg": "You need to install \"jmespath\" prior to running json_q

Re: [ansible-project] Escaping { character in a task that has an ansible variable

2021-02-22 Thread Sakshi Rathore
Hello Kai Stian Olstad further to this context, could you please advise how to escape square bracket from the output in ansible? On Saturday, March 10, 2018 at 8:04:50 PM UTC+1 Kai Stian Olstad wrote: > On Saturday, 10 March 2018 16.46.14 CET William Muriithi wrote: > > I have a task that ne