Re: [ansible-project] How to convert json to csv

2019-11-20 Thread rajthecomputerguy
Hi Racke Below is the json output interfaces_status_facts: Te1/0/37: data: duplex: auto interface: Te1/0/37 name: ' ' speed: auto status: notconnect type: ' 100/1000/2.5G/5G/10GBaseTX' vlan: '1'

Re: [ansible-project] Re: AWS Ansible Python Boto - Profile Not Found Error

2019-11-20 Thread kingston vedanayagam
EC2 module is also working to spin instances from ansible. Following are the ansible/boto versions being used now. #python-boto3-1.4.6-5.el7.noarch #python2-boto-2.45.0-3.el7.noarch #ansible-2.9.0-1.el7.noarch Python 2.7.5 On Tue, Nov 19, 2019 at 6:28 PM kingston vedanayagam < kingston2pok...@gma

Re: [ansible-project] Re: Lookup vault in memory

2019-11-20 Thread Vladimir Botka
On Wed, 20 Nov 2019 07:45:29 -0800 (PST) Quentin Aveno wrote: > Does it mean that if i use a variable from inventory twice It will be > evaluate twice or the variable will be store in memory ? Same question for > lookup directly in task. It will be evaluated twice. In general the expansions "{{

Re: [ansible-project] How to convert json to csv

2019-11-20 Thread Stefan Hornburg (Racke)
On 11/20/19 4:43 PM, rajthecomputerguy wrote: > Hi Racke, > > I parsed the cisco command "show interface status" and  converted to json , > now I want to convert it to csv.  > >     - name: Write interfaces_status_facts to > '/var/lib/awx/projects/test-sk/show_interfaces_status_facts-[inventory_

[ansible-project] Getting cisco command output based on matched condition

2019-11-20 Thread rajthecomputerguy
Hi Team I want get output of *"show mac add int {{ item.key }}" *as report for each interface, Can anyone guide me how to export the command output only matched condition as text file? *Playbook:* * roles:* *- ansible-network.network-engine* * tasks:* *- name: Collect switchport

Re: [ansible-project] Re: Lookup vault in memory

2019-11-20 Thread Quentin Aveno
Thanks vlado for your responses. Yes, sorry for not being clear, password1 was defined in an inventory. It's almost clear now. Does it mean that if i use a variable from inventory twice It will be evaluate twice or the variable will be store in memory ? Same question for lookup directly in task

Re: [ansible-project] How to convert json to csv

2019-11-20 Thread rajthecomputerguy
Hi Racke, I parsed the cisco command "show interface status" and converted to json , now I want to convert it to csv. - name: Write interfaces_status_facts to '/var/lib/awx/projects/test-sk/show_interfaces_status_facts-[inventory_hostname].json' copy: content: "{{ interfaces

Re: [ansible-project] Ansible find module not accepting fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (find) module: become Supported parameters include: age, ag

2019-11-20 Thread alicia
Become is a task keyword. In your playbook you are using it as if it were a parameter of the “find” module. Move it up under the “name” line and indent it to the same level as the module name: > - name: Ansible delete files older than 1 minutes example become: true bec

Re: [ansible-project] Re: Lookup vault in memory

2019-11-20 Thread Vladimir Botka
On Wed, 20 Nov 2019 05:54:21 -0800 (PST) Quentin Aveno wrote: > Yes It is. > I mean if I don't use it as a variable but directly in a task as a > parameter. > As example: > Is there a difference between > - shell: check.sh {{ lookup('hashi_vault', 'secret=secret1') }} > And > - shell: check

Re: [ansible-project] Re: Lookup vault in memory

2019-11-20 Thread Quentin Aveno
Yes It is. I mean if I don't use it as a variable but directly in a task as a parameter. As example: Is there a difference between - shell: check.sh {{ lookup('hashi_vault', 'secret=secret1') }} And - shell: check.sh {{ password 1}} Where password1 is defined in an inventory It seems logic

Re: [ansible-project] Re: Lookup vault in memory

2019-11-20 Thread Vladimir Botka
On Wed, 20 Nov 2019 05:09:01 -0800 (PST) Quentin Aveno wrote: > > When I use a lookup with vault, is the pass is store in memory when I use > > it directly in a task or pass it through a variable in an inventory ? Is > > there a significant difference ? There is no difference because of "Lazy

Re: [ansible-project] Ansible find module not accepting fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (find) module: become Supported parameters include: age, ag

2019-11-20 Thread Stefan Hornburg (Racke)
On 11/20/19 2:25 PM, Nasir Nasir wrote: > I want to access a directory  as sudo user of Linux when i gave  > > Below is the code for the same which i tried; > >      - name: Ansible delete files older than 1  minutes  example >        find: >          paths: '{{diskclrpath}}' >          age: '{{f

[ansible-project] Ansible find module not accepting fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (find) module: become Supported parameters include: age, age_st

2019-11-20 Thread Nasir Nasir
I want to access a directory as sudo user of Linux when i gave Below is the code for the same which i tried; - name: Ansible delete files older than 1 minutes example find: paths: '{{diskclrpath}}' age: '{{fileage}}' patterns: '{{file_ext}}' # si

[ansible-project] Re: Lookup vault in memory

2019-11-20 Thread Quentin Aveno
For more information : I'm concerned about security issue in my company where the continous delivery is share between many teams. I would like to not store secret in memory or at least the shortest possible time. I supposed that if I use my lookup directly in task and not in a variable I was saf

[ansible-project] Lookup vault in memory

2019-11-20 Thread Quentin Aveno
Hi, I have a question about lookup and memory: When I use a lookup with vault, is the pass is store in memory when I use it directly in a task or pass it through a variable in an inventory ? Is there a significant difference ? Have a nice day. -- You received this message because you are sub

[ansible-project] How do i get set_fact variable in another play ?

2019-11-20 Thread Mohtashim S
I have a playbook where i first [Play 1] add dynamic host to group "desthosts" In Play 2 I append a string variable "storerecords" with filenames. Sample playbook below: In Play 3 I try to remove duplicate entries in "storerecords" variable where i get the error. --- - name: Play 1 hosts:

Re: [ansible-project] How to convert json to csv

2019-11-20 Thread Stefan Hornburg (Racke)
On 11/20/19 11:30 AM, rajthecomputerguy wrote: > Hi Team, > > Anybody knows how to convert json to csv in ansible? > > Thanks, > Pushparaj > What's your use case? I suppose you know you can't convert JSON with a nested structure to CSV? Regards Racke > -- > You received this message

[ansible-project] How to convert json to csv

2019-11-20 Thread rajthecomputerguy
Hi Team, Anybody knows how to convert json to csv in 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 receiving emails from it, send an email to ansible-project+unsubscr...@

[ansible-project] Re: Exit with_items loop after first success?

2019-11-20 Thread Davide Scrimieri
This feature would be really helpful. Are there any news on this? -- 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+unsubscr...@googlegroups.co