[ansible-project] Re: Ansible creates a directory with full permissions even though umask is set to "022" on the managed node

2019-07-24 Thread Minal Deshmukh
Using Ansible for node \perry which is managed node: root@ubuntu:~# ansible perry -a umask perry.in.rdlabs.hpecorp.net | SUCCESS | rc=0 >> 00 Manually on \perry: Wheras on the \perry it is as below /home/super: umask 0022 My concern here is before going to even a playbook, Ansible sets umask

Re: [ansible-project] Ansible's handling of string representation of complex objects

2019-07-24 Thread Matt Martz
Due to some historical integrations between ansible and jinja2, we try to convert things that look like python data structures, to actual python data structures. This is because historically, jinja2 could only return string representations of python data structures, not actual python data

[ansible-project] Ansible's handling of string representation of complex objects

2019-07-24 Thread Guy Knights
I've run into a weird behaviour regarding how Ansible handles converting strings to complex objects. I have the following string representation of a list of dicts that I'm returning from a Cloudformation stack output: [{"id": "subnet-f3i4ven6lxvxr3eu","az": "us-east-1a"},{"id": "subnet-

[ansible-project] CPAN Modules

2019-07-24 Thread Keith Mills
I have my playbook for CPAN. Right now it only works for Debian. I need it to work for SLES/RHEL/UBUNTU also but I don't know how to add them into the playbook. Can someone please help! What I have: cpan-modules.yaml --- - hosts: gen10alltools remote_user: root # Note: I am testing this

Re: [ansible-project] Ansible creates a directory with full permissions even though umask is set to "022" on the managed node

2019-07-24 Thread Dick Visser
How do you create the directory? I.E. what does your playbook look like? On Wed, 24 Jul 2019 at 16:58, Minal Deshmukh wrote: > Hello Ansible experts, > > I am struck with this issue. > Could you please help me on this. > > If I create a directory using Ansible on the managed node it creates it

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

2019-07-24 Thread Rob Wagner
All - I'm trying to dynamically set facts in a loop. (Long story short, for a list of keys, if the key isn't defined, I want to replace the key with the value from a register variable.) I have a playbook that works, but it requires the use of {{ }} in a when: clause, and Ansible is

[ansible-project] Ansible creates a directory with full permissions even though umask is set to "022" on the managed node

2019-07-24 Thread Minal Deshmukh
Hello Ansible experts, I am struck with this issue. Could you please help me on this. If I create a directory using Ansible on the managed node it creates it with full permissions. umask on the managed node in not honored. Thank you so much! Regards, Minal -- You received this message

Re: [ansible-project] CPAN Modules

2019-07-24 Thread Keith Mills
Hi Stefan, Installing cpanminus Debian package worked! Thank you! On Wednesday, July 24, 2019 at 9:13:22 AM UTC-5, Stefan Hornburg (Racke) wrote: > > On 7/24/19 4:05 PM, Keith Mills wrote: > > Hi Stefan, > > > > It's installed on my Debian 10 host. It's located in /usr/bin/cpan > > Hello

Re: [ansible-project] CPAN Modules

2019-07-24 Thread Stefan Hornburg (Racke)
On 7/24/19 4:05 PM, Keith Mills wrote: > Hi Stefan, > > It's installed on my Debian 10 host. It's located in /usr/bin/cpan Hello Keith, that is a *different* program. cpanm is the modern version of cpan. You need to install cpanminus Debian package. Regards Racke > > On Wednesday,

Re: [ansible-project] CPAN Modules

2019-07-24 Thread Keith Mills
Hi Stefan, It's installed on my Debian 10 host. It's located in /usr/bin/cpan On Wednesday, July 24, 2019 at 8:30:34 AM UTC-5, Stefan Hornburg (Racke) wrote: > > On 7/24/19 3:01 PM, Keith Mills wrote: > > > > Ansible playbook error: > > < >

Re: [ansible-project] Task vars + Jinja template

2019-07-24 Thread Adam
I guess that's it. I have to cast the variable to the desired type in the Jinja template. I changed it to this & it works: {% if foundQueuesCount|int > 0 %} Thanks, Dick! On Wednesday, July 24, 2019 at 9:48:24 AM UTC-4, Adam wrote: > > I just added debug to the variable: > > > > > and got

Re: [ansible-project] Visit metrics to scenario guide

2019-07-24 Thread alicia
Hi Guarav, Thanks for the note. This is a very interesting idea. We’ll need to discuss it internally first. Feel free to follow up directly with me. Thanks, Alicia Alicia Cozine Lead Technical Writer, Red Hat Ansible Automation > On Jul 23, 2019, at 7:47 PM, Gaurav Jain wrote: > > Hello, >

Re: [ansible-project] Task vars + Jinja template

2019-07-24 Thread Adam
I just added debug to the variable: and got this: Are all variables passed to by Ansible to Jinja as text? If so, I guess I need to cast them to their proper type within the Jinja template? On Wednesday, July 24, 2019 at 9:40:54 AM UTC-4, Adam wrote: > > Hi Dick - > > Isn't that

Re: [ansible-project] Task vars + Jinja template

2019-07-24 Thread Adam
Hi Dick - Isn't that done with |int? like this: foundQueuesCount: "{{lookup('file', '{{appdataRoot}}/tempqueues_{{item.router_name}}.txt')|length|int }}" Is there another way? On Wednesday, July 24, 2019 at 9:25:39 AM UTC-4, Dick Visser wrote: > > Try casting it explicitly to int? > >

Re: [ansible-project] CPAN Modules

2019-07-24 Thread Stefan Hornburg (Racke)
On 7/24/19 3:01 PM, Keith Mills wrote: > > Ansible playbook error:  > > Failed > to find required executable cpanm in paths: >

Re: [ansible-project] Task vars + Jinja template

2019-07-24 Thread Dick Visser
Try casting it explicitly to int? On Wed, 24 Jul 2019 at 15:14, Adam wrote: > Hi - > > I'm trying to evaluate the length of "foundQueuesCount" below in a Jinja > template and use a conditional. Everything works perfectly except for when > the length is zero. > > The task: > > - name: build

[ansible-project] Problem removing a static route of a vhf in NXOS

2019-07-24 Thread 'Fernando García Fernandez' via Ansible Project
Hi We're using Ansible 2.8 and we're trying to remove a static route defined in a vrf, but even following documentation directives (setting state to absent), it doesn't work. >From "show run" I see: vrf context MIDDLE description MIDDLE VRF ... ip route 10.236.250.39/32 10.230.135.81 name

Re: [ansible-project] Executing nested tags

2019-07-24 Thread Adam
Thanks, Matt. On Monday, July 22, 2019 at 12:59:33 PM UTC-4, Matt Martz wrote: > > Not currently. There is a feature request somewhere to allow tag > intersections and advanced operators, but it has not been implemented. > > Tags are effectively an `OR` operation right now. > > On Mon, Jul 22,

[ansible-project] Re: How to get past network device introductory menu

2019-07-24 Thread Ganesh Nalawade
It is currently not supported. However, I have raised a feature PR to add this support Refer: https://github.com/ansible/ansible/pull/59525 Please test this PR branch in your environment and comment on the PR if it works for you or not. On Tuesday, 23 July 2019 21:20:53 UTC+5:30, Pete

[ansible-project] Task vars + Jinja template

2019-07-24 Thread Adam
Hi - I'm trying to evaluate the length of "foundQueuesCount" below in a Jinja template and use a conditional. Everything works perfectly except for when the length is zero. The task: - name: build routerconfig template: src: templates/{{item.version}}/routerconfig.j2 dest:

[ansible-project] CPAN Modules

2019-07-24 Thread Keith Mills
Ansible playbook error: Failed to find required executable cpanm in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin Ansible Version: ansible 2.8.0

Re: [ansible-project] How to scale Ansible?

2019-07-24 Thread Jonathan Lozada De La Matta
scaling its a very vague question and there's so many variables. I would start with AWX. Jonathan Lozada De La Matta on mobile From: ansible-project@googlegroups.com on behalf of EasyCook by Shailesh Lonare Sent: Wednesday, July 24, 2019 3:04 AM To: Ansible

Re: [ansible-project] How to use Ansible in distributed environment where I do not have direct access to end server on which Ansible has to run modules except Jump host?

2019-07-24 Thread Andrew Latham
https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-configure-a-jump-host-to-access-servers-that-i-have-no-direct-access-to On Wed, Jul 24, 2019 at 2:02 AM EasyCook by Shailesh Lonare < shaileshlonar...@gmail.com> wrote: > I am trying to understand how Ansible would

Re: [ansible-project] Directory to store ansible's playbooks

2019-07-24 Thread Andrew Feller
Your collection of playbooks, roles, etc can live anywhere on the filesystem you want. Yes, ansible has conventions on specific places on the filesystem it will check, however I think most house their collection where it makes sense for the operators and/or processes they have. Rather than an

Re: [ansible-project] Tasks play-level vs. role-level

2019-07-24 Thread kdt
Hi, Thank you for input from you. Yes, I missed to make update of my question precising these points. Sorry for that. Yes, if it concerns role files I mean "- name: " or with ":" -lines in tasks/main.yml If it concerns playbook files I mean "- name: " or with "import_role:" items conducting

[ansible-project] Not able to access Azure blob with service principal from ansible module azure_rm_storageblob

2019-07-24 Thread Prakash Sharma
Hello Experts , I am trying to download/upload blobs with ansible azure_rm_storageblob module in AWX ( I have tried in Ansible core too, got the same error) , and get below error Error getting keys for account X - Azure Error: AuthorizationFailed\nMessage: The client

[ansible-project] How to scale Ansible?

2019-07-24 Thread EasyCook by Shailesh Lonare
I have customer from small, medium and large environment, therefore I want to understand how to scale Ansible to deploy with right amount of resources. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

[ansible-project] How to use Ansible in distributed environment where I do not have direct access to end server on which Ansible has to run modules except Jump host?

2019-07-24 Thread EasyCook by Shailesh Lonare
I am trying to understand how Ansible would work in distributed environment where I do not have direct access to end server on which Ansible has to run modules except Jump host? I want to understand how this whole process works? Thanks, Shailesh -- You received this message because you are