Re: [ansible-project] jxmlease is required to display response in json

2021-02-18 Thread chtsalid
Thanks for your input! I tried it using once python3 and then python2, but in both cases I am still getting the same error. Any other idea where this problem lies :) ? Thanks! On Thursday, February 18, 2021 at 11:53:12 AM UTC+1 brae...@gmail.com wrote: > On 2/18/21 11:49 AM, chtsalid wrote: >

[ansible-project] How to Run program as an administrator

2021-02-18 Thread sd
I am trying to run a software via win_package module. But that software requires running as administrator which causes my script stuck at one position. How to run it as administrator. I am running trough a user which a member of admin group. here is my code - name: installing Devexpress

Re: [ansible-project] Backup info saved in TXT file is not in readable format, please help

2021-02-18 Thread Stefan Hornburg (Racke)
On 2/18/21 8:25 AM, Vikram S wrote: > Below is my playbook to backup info from router and save it to a file. But > when i open the TXT file in ansible > controller, backup info is very difficult to read. Please look at the > screenshot in below > link:  >

Re: [ansible-project] How to Run program as an administrator

2021-02-18 Thread Dick Visser
https://docs.ansible.com/ansible/latest/user_guide/become.html#become-directives On Thu, 18 Feb 2021 at 09:33, sd wrote: > > I am trying to run a software via win_package module. But that software > requires running as administrator which causes my script stuck at one > position. How to run it

Re: [ansible-project] Constants in ansible playbooks

2021-02-18 Thread Lars Liedtke
You could create a yaml file e.g. contants.yml and the include that via commandline parameter with -e '@constants.yml' Am 17.02.21 um 15:33 schrieb Brian Coca: > correct -- --- punkt.de GmbH Lars Liedtke .infrastructure Kaiserallee 13a 76133 Karlsruhe Tel. +49 721 9109 500

Re: [ansible-project] jxmlease is required to display response in json

2021-02-18 Thread Stefan Hornburg (Racke)
On 2/18/21 11:49 AM, chtsalid wrote: > Hi all, > > I am running a task using the netconf_get module and encountering a problem > to display an output in json format? > I am getting the following error. > > jxmlease is required to display response in json > > However jxmlease and all other

Re: [ansible-project] How to Run program as an administrator

2021-02-18 Thread sd
Hi thanks for your reply.But I think win_package module does not support become parameter. On Thu, Feb 18, 2021, 2:55 PM Dick Visser wrote: > > https://docs.ansible.com/ansible/latest/user_guide/become.html#become-directives > > On Thu, 18 Feb 2021 at 09:33, sd wrote: > > > > I am trying to

Re: [ansible-project] How to Run program as an administrator

2021-02-18 Thread jbor...@gmail.com
Any Windows module supports become, it's implementation is completely independent from modules themselves. In the majority of situations a module is run as Administrator but there are a few cases where that may not apply. To test it out run - win_whoami: You can also run it with become to

[ansible-project] How to list google cloud regional zones with number of instances created in Ansible

2021-02-18 Thread 'Shristi Singh' via Ansible Project
Hi Team, I am trying to figure out how can I get the below information using Ansible. us-east1 ZonesInstancesDisks Zone B 0 2 Zone C 0 1 Zone D 0 0 us-east4 ZonesInstancesDisks Zone A 0 0 Zone B 1 1 Zone C 0 1 Thanks and Regards, Shristi Singh -- You received this message

[ansible-project] jxmlease is required to display response in json

2021-02-18 Thread chtsalid
Hi all, I am running a task using the netconf_get module and encountering a problem to display an output in json format? I am getting the following error. jxmlease is required to display response in json However jxmlease and all other requirements are installed on my machine as you see below.

[ansible-project] Ansible-3.0.0 released

2021-02-18 Thread Toshio Kuratomi
Hi all, We're happy to announce that the ansible-3.0.0 package is now available! This update is based on the ansible-base-2.10.x package just like ansible-2.10 was so the changes shouldn't be too major. However, it does contain new major versions of many collections which means that there will be

Re: [ansible-project] copy content module is not readable, how to remove all special character and make it proper text readable

2021-02-18 Thread Sameer Nagwekar
Sorry for being little ambiguous. Here is the output of my file when I read it. It is all clubbed together with newline \n and no proper formatting. === more icx.txt {"ansible_facts": {"ansible_net_gather_subset": ["config",

[ansible-project] OpenJDK Install - Specific version

2021-02-18 Thread sub...@gmail.com
Is there a way to install a specic version of JDK8 on CentOS using ansible? we are looking to pin versions of JDK to java-1.8.0-openjdk-devel.x86_64 1:1.8.0.282.b08-1.el7_9 Thank you. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

Re: [ansible-project] OpenJDK Install - Specific version

2021-02-18 Thread Dick Visser
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/dnf_module.html#parameter-name On Thu, 18 Feb 2021 at 17:16, sub...@gmail.com wrote: > > Is there a way to install a specic version of JDK8 on CentOS using ansible? > we are looking to pin versions of JDK to > >

Re: [ansible-project] jxmlease is required to display response in json

2021-02-18 Thread Stefan Hornburg (Racke)
On 2/18/21 2:22 PM, chtsalid wrote: > Thanks for your input! I tried it using once python3 and then python2, but in > both cases I am still getting the same error. > > Any other idea where this problem lies :) ? pip3 list | grep 'jxmlease\|ncclient\|xmltodict' jxmlease (1.0.3) ncclient (0.6.9)

Re: [ansible-project] jxmlease is required to display response in json

2021-02-18 Thread chtsalid
Yes, I am executing my playbooks as a user. ll /usr/bin/ | grep python lrwxrwxrwx. 1 root root9 31. Aug 23:02 python2 -> python2.7 -rwxr-xr-x. 1 root root 8224 31. Aug 23:02 python2.7 lrwxrwxrwx. 1 root root 25 14. Okt 10:40 python3 -> /etc/alternatives/python3

[ansible-project] New release: ansible-base 2.10.6

2021-02-18 Thread Rick Elrod
Hi all- we're happy to announce that the general release of ansible-base 2.10.6 is now available! A full listing of changes found in this release can be found in the changelog linked below. Of note, this release addresses the following *security vulnerabilities*: * CVE-2021-20228 where default

[ansible-project] New Ansible releases 2.8.19 and 2.9.18

2021-02-18 Thread Rick Elrod
Hi all- we're happy to announce that the general release of Ansible 2.8.19 and 2.9.18 are now available! A full listing of changes found in this release can be found in the changelog linked below. Of note, this release addresses the following *security vulnerabilities*: * CVE-2021-20228 where

Re: [ansible-project] Mount file share based on variable in loop

2021-02-18 Thread Tim Shubitz
> On Feb 18, 2021, at 4:40 PM, Wei-Yen Tan wrote: > > I actually do this very thing. I have a role that just loops through a var > inside the role. That role just uses the Mount task. With a lip. The role > runs off the var exists. I can dig up the structure of it may help. On my > phone

Re: [ansible-project] Mount file share based on variable in loop

2021-02-18 Thread Wei-Yen Tan
Hi Tim, data structure in inventory (i use AWX) so just look at os_directory_file_items and mount_list ___ - name: kubernetes workers inventory: inventory1 description: state: present children: - childnodes variables: os_directory_file_items: - name: mnt

Re: [ansible-project] inventory inside play

2021-02-18 Thread Jean-Yves LENHOF
Hi, Another way of doing... You can also change the inventory live with some modules https://docs.ansible.com/ansible/latest/collections/ansible/builtin/add_host_module.html

Re: [ansible-project] Mount file share based on variable in loop

2021-02-18 Thread Wei-Yen Tan
With a loop var* Get Outlook for iOS From: ansible-project@googlegroups.com on behalf of Tim Shubitz Sent: Friday, February 19, 2021 11:36:33 AM To: Ansible Project Subject: [ansible-project] Mount file share based on variable in loop

Re: [ansible-project] Mount file share based on variable in loop

2021-02-18 Thread Wei-Yen Tan
I actually do this very thing. I have a role that just loops through a var inside the role. That role just uses the Mount task. With a lip. The role runs off the var exists. I can dig up the structure of it may help. On my phone now. Get Outlook for iOS

[ansible-project] Mount file share based on variable in loop

2021-02-18 Thread Tim Shubitz
Greetings, folks! I'm trying to have one single source-of-truth for file share info and mount individual shares on different servers depending on need. Give a list of "these servers get these shares, those get those" and from that list loop over what to configure and mount. I've been trying

Re: [ansible-project] inventory inside play

2021-02-18 Thread Dick Visser
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/meta_module.html#parameter-free_form On Thu, 18 Feb 2021 at 19:45, j..r.. wrote: > I'm trying to deploy vms from template on esx with vmware_guest module > and this work great, but I would like to do inside this playbook some

Re: [ansible-project] copy content module is not readable, how to remove all special character and make it proper text readable

2021-02-18 Thread Dick Visser
This is because your data is json formatted, but your debug uses yaml to display. It could be as simple as adding the to_nice_yaml filter, i.e.: - name: copy the output copy: content: "{{ result | to_nice_yaml }}" dest: "/home/sameer/Documents/icx.txt" delegate_to:

Re: [ansible-project] copy content module is not readable, how to remove all special character and make it proper text readable

2021-02-18 Thread Sameer Nagwekar
Thank you so much that worked like a charm. This was my first successful playbook :-) On Thursday, February 18, 2021 at 9:47:30 AM UTC-8 dick@geant.org wrote: > This is because your data is json formatted, but your debug uses yaml > to display. > It could be as simple as adding the

[ansible-project] inventory inside play

2021-02-18 Thread j..r..
I'm trying to deploy vms from template on esx with vmware_guest module and this work great, but I would like to do inside this playbook some modification on vm after deployment. My inventory file is being populated with the same playbook with hosts that are being deployed, but after that I'm