[ansible-project] Formatting registered output

2020-07-14 Thread Albert Short
All, hope someone can assist here as i seem to be going in circles & not getting anywhere fast. I am trying to map ACI VRFs to their associated parent tenant. The modules I am using with some basic Jinja2 filters allow me to map tenant-->vrf but I now need to swap the order, to map vrf-->tenant

[ansible-project] RH294 ansible

2020-07-14 Thread rocky rns
Hi Team, I am planning for RHCE RHEL8 (RH294) ansible certification. Can someone please let me know in exam do we have access to the ansible documentation website( docs.ansible.com). Kind regards Raja.D -- You received this message because you are subscribed to the Google Gr

Re: [ansible-project] RH294 ansible

2020-07-14 Thread Hosam Al Ali
As I remember since last year that Redhat exams not provide access to internet resources during the exam, only access the document that shared locally with questions regards, *Hosam Al Ali* Senior OpenStack Architect - City Network - Sweden KCM100 - COA - OCM100 - OCM50 - SCSA - SCNA - SCSECA - M

Re: [ansible-project] RH294 ansible

2020-07-14 Thread Luca 'remix_tj' Lorenzetto
Hello, i don't know what is the set of tools installed with standard ansible packages, but ansible-doc contains the documentation of all the modules, in case you don't remember the parameters. Luca On Tue, Jul 14, 2020 at 9:59 AM Hosam Al Ali wrote: > > As I remember since last year that Redhat

Re: [ansible-project] Extracting values from YAML into Jinja template for Ansible playbook

2020-07-14 Thread ameya agashe
Thanks, mate, SO is preferred but I don't mind anywhere mate. On Tuesday, 14 July 2020 16:44:10 UTC+10, Dick Visser wrote: > > Should we answer on this list, or on stackoverflow? Or both? > > On Tue, 14 Jul 2020 at 03:47, ameya agashe > wrote: > >> Here is the link for my question >> >> >> https

Re: [ansible-project] Formatting registered output

2020-07-14 Thread Vladimir Botka
On Tue, 14 Jul 2020 00:29:00 -0700 (PDT) Albert Short wrote: > the final result should be: > vrf_DEFAULT: tn_NBK101 > vrf_UCSD: tn_UCSD > v13-aci: tn=prod-trusted This task should create the dictionary - set_fact: my_dict: "{{ my_dict|default({})|combine({my_key: my_val}) }}"

Re: [ansible-project] Formatting registered output

2020-07-14 Thread Albert Short
Vladimir, thanks for that fast response, it worked a wonder getting the info into the right format, thanks, now to move on to using it. On Tuesday, 14 July 2020 10:03:45 UTC+1, Vladimir Botka wrote: > > On Tue, 14 Jul 2020 00:29:00 -0700 (PDT) > Albert Short > wrote: > > > the final result sho

Re: [ansible-project] Need help with registered variable

2020-07-14 Thread Rahul Kumar
THanks Vlad ! I will use same ! Regards Rahul On Mon, 13 Jul 2020 at 19:47, Vladimir Botka wrote: > On Fri, 10 Jul 2020 17:24:05 +0530 > Rahul Kumar wrote: > > > I have a task output like this: > > - name: Print Response of status resource > > debug: > > msg: " {{ result }}" > > > > ok:

[ansible-project] Ansible with Z Open Automation Utilities on z/OS

2020-07-14 Thread Władysław Borysow
Hello, I am testing Ansible 2.9.9 with z/OS as managed node. I also installed ZOA, but it seems ZOA commands from Ansible fail. "Normal" shell commands work well. Some output from my playbooks: *this works fine:* --- - hosts: all collections: - ibm.ibm_zos_core gather_facts: no

[ansible-project] Centralized Unix Server File system Management

2020-07-14 Thread Avinash Jadhav
Hello Ansible User/Team, I am trying to developed Centralized Unix Server File system Management using ansible playbook I need help from all of your team, Below is requirement using ansible Problem Statement - Unavailability of Centralized Unix Server File system Management becomes resourc

[ansible-project] cisco.ios help

2020-07-14 Thread William Dossett
Hi, I am writing a ansible pb to demonstrate the power of ansible to our NetOps team. I know enough about ansible and cisco switches to get around, but I am stuck on something probably really simple. I am trying to create a vlan and populate it with some interfaces, but I - name: create vla

Re: [ansible-project] cisco.ios help

2020-07-14 Thread Ganesh Nalawade
Most likely the error is due to missing privilege escalation. Refer https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html#using-cli-in-ansible for adding ansible_become and ansible_become_password settings. Also, FYI ios_vlan module is deprecated, instead use ios_vlans

[ansible-project] ansible check and diff mode not working

2020-07-14 Thread Shyam Sunder
Hi, I was going thru this post ( https://blog.networktocode.com/post/generating-diff-with-ansible/) where its mentioned that we can use check and diff mode together. I am trying to use that for gold config audit (audit pre decided config against what is present on device) for Cisco and Extre

[ansible-project] Re: Ansible with Z Open Automation Utilities on z/OS

2020-07-14 Thread Dakota Heyman
I have done all of my ansible z/OS stuff by using z/OSMF APIs but your syntax looks right from an ansible perspective to me. For ZOA Utilities and Ansible zOS Module errors, I would recommend posting a bug about it on their official GitHub page: https://github.com/ansible-collections/ibm_zos_co

Re: [ansible-project] cisco.ios help

2020-07-14 Thread William Dossett
Thanks Ganesh, I just found the privilege escalation once I formed my search correctly... I am using the deprecated version for now as it seems there is an issue with creating vlans using ios_vlans that I found on github which is not present in ios_vlan - I plan to move code to ios_vlans when t

[ansible-project] Re: pywinrm, winrm, ansible - no go

2020-07-14 Thread Eric Holzapfel
Hello, Thanks for the ;reply. I am wondering where I would change the umask value? Just at user level? or system wide? I have a similar install with pywinrm, python2, and ansible, and installed pywinrm, and it works fine. It is the red hat server that does not find the winrm, urllib3 modules, etc

[ansible-project] how to determine group's id?

2020-07-14 Thread Laci
Do you guys have a good idea what is the best way to determine a group's id them reuse that in a variable? For ex: % getent group monitor monitor:x:990:polkitd I need 990, then I have to add a line to /etc/fstab including 990 Thanks! -- You received this message because you are subscribed to t

Re: [ansible-project] Ansible module "template" support for Jinja2 new class "ChainableUndefined"

2020-07-14 Thread Baeschtu
Thanks for this reply. To simplify tests for existing variables I now use builtin jinja2 filter "*default()*" such as "*{% for person in persons | default('') %}*" to do not first have to test if the variable "*persons*" is defined. If I remove the part "* | default('')*" from the for-loop and

Re: [ansible-project] Ansible module "template" support for Jinja2 new class "ChainableUndefined"

2020-07-14 Thread Matt Martz
This is the expected behavior, and ChainableUndefined doesn't change that. `AnsibleUndefined` inherits from `StrictUndefined`, and in the end, you cannot simply loop over undefined values. Both ChainableUndefined and AnsibleUndefined allow something like this to work: foo.bar.baz|default('qux')

Re: [ansible-project] how to determine group's id?

2020-07-14 Thread Vladimir Botka
On Tue, 14 Jul 2020 23:02:56 +0200 Jean-Yves LENHOF wrote: > Hi, Not tested, but should be closed to what you're looking into : - > getent: database: group key: monitor split: ':' - debug: var: > getent_group[1] For example - getent: database: group - debug: var: getent_group.

Re: [ansible-project] how to determine group's id?

2020-07-14 Thread Jean-Yves LENHOF
Hi, Not tested, but should be closed to what you're looking into : - getent: database: group key: monitor split: ':' - debug: var: getent_group[1] Regards, JYL Le 14/07/2020 à 21:58, Laci a écrit : Do you guys have a good idea what is the best way to determine a group's id them reuse that

[ansible-project] Re: pywinrm, winrm, ansible - no go

2020-07-14 Thread ej
You only need to change the umask temporarily from the command line before reinstalling pywinrm and any other packages that don’t have the right file and directory permissions. You can just type “*umask 022*” before doing the package reinstallation to set it. That will only change the umask

[ansible-project] New Ansible releases 2.8.13

2020-07-14 Thread Rick Elrod
Hi all- we're happy to announce that the general release of Ansible 2.8.13 are now available! How do you get it? -- $ pip install ansible==2.8.13 --user The tar.gz of the releases can be found here: * 2.8.13 https://releases.ansible.com/ansible/ansible-2.8.13.tar.gz SHA256:

[ansible-project] Re: pywinrm, winrm, ansible - no go

2020-07-14 Thread Eric Holzapfel
Hello EJ, This is helpful info - also thanks for the reply. I does seem that it is a permissions issue. I almost got thing going - as root user i was able to insure that python3 (3.6) was installed - for python I have to use python3 mypythonfile.py. As root, and umask 022, i installed anisible u

[ansible-project] python unable to install open_excel module for ansible

2020-07-14 Thread stack flow
Hello, I need open_excel module for ansible so that it can read multiple sheets in excel. I am getting following errors. how to fix it? I am using macbook os catalina. *ljames@mac ~ % pip3 install open_excel* *Collecting open_excel* * Using cached https://files.pythonhosted.org/packages/91/5

[ansible-project] 'win_partition' is unable to resize the hdd

2020-07-14 Thread Udayendu kar
Disk resize code: ``` - name: Extend the C drive to the max space win_partition: partition_size: -1 partition_number: 0 disk_number: 0 ``` Error message: ``` TASK [Extend the C drive to the max space]