Re: [ansible-project] FAILED! => {"changed": false, "msg": "TemplateNotFound: anVweXRlcmh1YkRvY2tlcmh1YmNvbmZpZ2pzb24uajI="}

2020-04-07 Thread 胡雷雷
Thanks, I used the function, it could import the template content. Some background: I want to create the secret resource in k8s cluster, which included the docker config json file. the json will could be modified with some pre-defined vars(I write this part to a template file.) 在

[ansible-project] Problems with \u001b[31m ANSI colour codes

2020-04-07 Thread Gobi
Ansible Version: ansible 2.9.4 config file = /etc/ansible/ansible.cfg configured module search path = [u'/home/gobi/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /home/gobi/.local/lib/python2.7/site-packages/ansible executable location =

Re: [ansible-project] Ansible module win_uri

2020-04-07 Thread Jeremy Hobbs
is there another module that would work for a basic json request that includes options for authentication? thanks Jeremy On Tuesday, April 7, 2020 at 6:11:02 PM UTC-5, Matt Martz wrote: > > The win_uri module is written in PowerShell and designed to be run on a > Windows target. > > On Tue,

Re: [ansible-project] Re: win_acl and remote fileshares

2020-04-07 Thread Jordan Borean
There's not much more I can really say, Windows ACLs are based on SIDs so it needs to be able to translate a human readable name to the actual SID. If the module is complaining that it's unable to to translate an identity that's just what Windows is returning as it's unable to translate the

Re: [ansible-project] jmespath prior to running json_query filter, yet already installed

2020-04-07 Thread Bob M
Thank you Matt. I must have missed that in the documentation. I appreciate the help!! On Tuesday, April 7, 2020 at 6:03:15 PM UTC-4, Matt Martz wrote: > > You cannot install a dependency needed for a filter plugin, within the > same playbook that requires it as a dependency. Filter plugins are

Re: [ansible-project] Ansible module win_uri

2020-04-07 Thread Matt Martz
The win_uri module is written in PowerShell and designed to be run on a Windows target. On Tue, Apr 7, 2020 at 5:09 PM Jeremy Hobbs wrote: > I currently have a playbook that use the uri module to connect to an API > and get a json request. This was working properly. I am now attempting to >

[ansible-project] Ansible module win_uri

2020-04-07 Thread Jeremy Hobbs
I currently have a playbook that use the uri module to connect to an API and get a json request. This was working properly. I am now attempting to implement NTLM or Kerberos authentication on the web server. I attempted to change it to the win_uri module and add the username and password

Re: [ansible-project] jmespath prior to running json_query filter, yet already installed

2020-04-07 Thread Matt Martz
You cannot install a dependency needed for a filter plugin, within the same playbook that requires it as a dependency. Filter plugins are loaded at ansible startup, and the imports are processed and cached by python at this time. As such, if it is missing at the beginning of the playbook

[ansible-project] jmespath prior to running json_query filter, yet already installed

2020-04-07 Thread Bob M
I'm running this section of code on a proxmox ansible controller. And I still get an error saying jmespath not found. fatal: [master]: FAILED! => {"msg": "You need to install \"jmespath\" prior to running json_query filter"} In the same playbook, as a pre-task, I've tried to apt install

Re: [ansible-project] print return values using debug

2020-04-07 Thread newbie newbie
thank you Matt! yaml and space indentation!!! good lesson learnt it works now On Tue, Apr 7, 2020 at 1:55 PM Matt Martz wrote: > The problem is that you have `register` indented one level too far. It > needs to be indented to the same level as `name` and `get_url`. It is not > an argument for

Re: [ansible-project] print return values using debug

2020-04-07 Thread Matt Martz
The problem is that you have `register` indented one level too far. It needs to be indented to the same level as `name` and `get_url`. It is not an argument for the module. On Tue, Apr 7, 2020 at 3:53 PM newbie newbie wrote: > Hi, > > I am trying to print the return values from the get_url

[ansible-project] print return values using debug

2020-04-07 Thread newbie newbie
Hi, I am trying to print the return values from the get_url module using the yaml code below: - name: connect to server and download file get_url: url: http://10.0.0.2/file1.html register: all_data - name: print time it took to transfer file debug:

[ansible-project] Re: Is there a way we can delay the connection instead of unreachable

2020-04-07 Thread Phil Griffiths
This just sounds like a really bad idea! Having plays hanging around waiting for 20 days doesn't sound sensible. Why not just fail controllably after a number of retries perhaps? I use something like this to do this: ...tasks... register: output until: output is not failed retries: 3 On Monday,

[ansible-project] Re: Usage of ansible collection with ansible roles

2020-04-07 Thread Phil Griffiths
Hi Luca It's still early days for collections, so some things need ironing out, like https://github.com/ansible/ansible/issues/68198 [we'll have to see what happens here] You either need to use FQCNs (Fully Qualified Collection Names) or better still metadata - see

[ansible-project] CALL TO ACTION: Vote on collection changelog strategy

2020-04-07 Thread Sandra McCann
Hi folks - With Ansible modules and other plugins moving to collections, we need to decide how to handle changelogs and porting guides. In prior releases, changelogs and porting guides were handled directly in PRs, because all content lived in, and was released in the ansible/ansible GitHub

[ansible-project] looping through the 5 values

2020-04-07 Thread mahesh g o
I have below playbook which creates policy: i have parameter called policy which has 5 values(" mirror", "vault", "mirrorandvault", "default", "XDP") i have put with_sequence loop. i want this policy to be created with each loop. i tried ternary operator for 2 policies "type: "{{

[ansible-project] Re: Is there a way we can delay the connection instead of unreachable

2020-04-07 Thread hammou zligui
Yes; use pause module, as an example : playbook that create 10 VMs and inatll http on these 10 VMs, so before installing httpd i should wait for VMs to be up i use pause exemple using pause module -name: pause for 2 mins pause: minutes: 2 good lok Le lundi 6 avril 2020 06:09:22

Re: [ansible-project] Re: win_acl and remote fileshares

2020-04-07 Thread Jesse Lyon
Current permissions on file path I've got 1500+ volumes off of this current filer that are all using NTFS permissions from this same domain as well without issue. I can assign them through set-acl through powershell just using a different path as the ACL fomatter through get-acl and assigning it

[ansible-project] Ansible Winrm connectivity issue - hosts behind Cyberark

2020-04-07 Thread Kumaresh kulal
I need to run ansible playbooks on windows hosts protected by CyberArk. My main purpose of setting up Ansible is to mange the Windows VM's and so far I was able to manage them without the Cyberark. With this setup I was able run Ansible playbook on all windows hosts. Ubuntu Ansible

Re: [ansible-project] Pulling information from a registered variable

2020-04-07 Thread jd mane
- debug: msg: "{{ digbomb.results.msg.target }}" This will list all targets. If you want to use one at a time then you can loop it On Tue, Apr 7, 2020 at 9:41 PM Jamal Gardiner wrote: > Hey guys. > > I'm trying to pull information from this variable that was registered. My > question

[ansible-project] Pulling information from a registered variable

2020-04-07 Thread Jamal Gardiner
Hey guys. I'm trying to pull information from this variable that was registered. My question is how would I go about adding conditionals here so that if one item like, 10.200.98.11 has 2 or more msg it'd return a string. [image: digbomb.jpg] -- You received this message because you are

Re: [ansible-project] newbie to ansible

2020-04-07 Thread Vladimir Botka
On Tue, 7 Apr 2020 18:08:48 +0530 mahesh g o wrote: > can this be created alternatively like > vol1: rw > vol2: dp > vol3:rw > vol4:dp > . > . > vol29:rw > vol30:dp Yes. It's possible. Fit the condition to your needs. For example type: "{{ (volume_item|int is odd)|ternary('rw', 'dp') }}"

[ansible-project] Ansible testing using molecule in CICD

2020-04-07 Thread JDM
Hi All, We are planning to use a molecule for testing the ansible roles and We are going to use Ansible roles for application deployments on tomcat/apache servers. I am doing manual testing using a molecule command create.,lint , destroy verify ... But has any one used molecule

Re: [ansible-project] Ansible on CentOS 7 problem with "selinux" on a Cisco Wireless LAN Controller

2020-04-07 Thread Dick Visser
You can't expect us to visit random URLs in order to help. Please post the playbook and error inline in your message. On Tue, 7 Apr 2020 at 14:26, Sebigeli wrote: > Hello everyone ! > > - I have a Cisco Wireless LAN Controller 5520 > - I use Ansible 2.9.6 about CentOS 7.7 > - I use Aireos

[ansible-project] Ansible on CentOS 7 problem with "selinux" on a Cisco Wireless LAN Controller

2020-04-07 Thread Sebigeli
Hello everyone ! - I have a Cisco Wireless LAN Controller 5520 - I use Ansible 2.9.6 about CentOS 7.7 - I use Aireos module of Ansible I need to display the list of APs on the WLC and export it file for used in a powershell script for add the AP on PRTG Supervision. I manage to display the

Re: [ansible-project] Re: win_acl and remote fileshares

2020-04-07 Thread Jess L
The filer/svm is a member of the domain. Domain groups had replicated (these groups are my test guys and have existed for weeks actually) The filer is not a member of the groups, that'd be a bit backwards versus what we're trying to accomplish. On Mon, Apr 6, 2020, 11:49 PM Jordan Borean wrote:

Re: [ansible-project] FAILED! => {"changed": false, "msg": "TemplateNotFound: anVweXRlcmh1YkRvY2tlcmh1YmNvbmZpZ2pzb24uajI="}

2020-04-07 Thread Dick Visser
Without more context it's mostly guessing, but you might be looking for this: https://docs.ansible.com/ansible/latest/plugins/lookup/template.html On Tue, 7 Apr 2020 at 13:21, 胡雷雷 <501956...@qq.com> wrote: > > "anVweXRlcmh1YkRvY2tlcmh1YmNvbmZpZ2pzb24uajI=" is the >

Re: [ansible-project] FAILED! => {"changed": false, "msg": "TemplateNotFound: anVweXRlcmh1YkRvY2tlcmh1YmNvbmZpZ2pzb24uajI="}

2020-04-07 Thread 胡雷雷
"anVweXRlcmh1YkRvY2tlcmh1YmNvbmZpZ2pzb24uajI=" is the "jupyterhubDockerhubconfigjson.j2" 在 2020年4月7日星期二 UTC+8下午7:20:19,胡雷雷写道: > > In fact, I want to add the encode here, if I remove it, it will be OK > > 在 2020年4月7日星期二 UTC+8下午7:14:36,Dick Visser写道: >> >> You are including

Re: [ansible-project] FAILED! => {"changed": false, "msg": "TemplateNotFound: anVweXRlcmh1YkRvY2tlcmh1YmNvbmZpZ2pzb24uajI="}

2020-04-07 Thread 胡雷雷
In fact, I want to add the encode here, if I remove it, it will be OK 在 2020年4月7日星期二 UTC+8下午7:14:36,Dick Visser写道: > > You are including "jupyterhubDockerhubconfigjson.j2" |b64encode, which is > "anVweXRlcmh1YkRvY2tlcmh1YmNvbmZpZ2pzb24uajI=". > Remove the b64encode filter? > > On Tue, 7 Apr

Re: [ansible-project] FAILED! => {"changed": false, "msg": "TemplateNotFound: anVweXRlcmh1YkRvY2tlcmh1YmNvbmZpZ2pzb24uajI="}

2020-04-07 Thread Dick Visser
You are including "jupyterhubDockerhubconfigjson.j2" |b64encode, which is "anVweXRlcmh1YkRvY2tlcmh1YmNvbmZpZ2pzb24uajI=". Remove the b64encode filter? On Tue, 7 Apr 2020 at 13:04, 胡雷雷 <501956...@qq.com> wrote: > I want to create a k8s resource with operator-sdk in ansible model. in my >

[ansible-project] FAILED! => {"changed": false, "msg": "TemplateNotFound: anVweXRlcmh1YkRvY2tlcmh1YmNvbmZpZ2pzb24uajI="}

2020-04-07 Thread 胡雷雷
I want to create a k8s resource with operator-sdk in ansible model. in my application, I want to {%include%} a template jupyterhubDockerhubconfigjson.j2 with same location of my based one. liking this : data: .dockerconfigjson: "{% include "jupyterhubDockerhubconfigjson.j2" |b64encode %}"

[ansible-project] Usage of ansible collection with ansible roles

2020-04-07 Thread Luca
Hello everybody, How I can use an ansible collection inside an ansible role (that I cannot modify)? I need to use the ansible collection ovirt.ovirt_collection (new features in the modules that are not in ansible 2.9.6) with ansible roles to manage an oVirt cluster but the roles use the