Re: [ansible-project] Stripping YAML dashes from output

2020-11-13 Thread Dan Linder
> Ultimately I'd like to figure out how to add a semicolon after each entry, This should do that; join with a semicolon not a newline: | join('; ') > then separate them into batches of 500 emails each Since you have the list already, you could use a `for` loop with an `if` test to insert a

Re: [ansible-project] Stripping YAML dashes from output

2020-11-13 Thread harry devine
Perfect! Exactly what I needed. Ultimately I'd like to figure out how to add a semicolon after each entry, then separate them into batches of 500 emails each, but I can worry about that later. This works for now. Thanks Harry On Fri, Nov 13, 2020, 12:44 PM Stefan Hornburg (Racke) wrote: > On

Re: [ansible-project] Stripping YAML dashes from output

2020-11-13 Thread Stefan Hornburg (Racke)
On 11/13/20 6:28 PM, harry devine wrote: > So how do I get rid of the u?  What I ultimately wanted was JUST the email > addresses.  > > Harry Join the list members into a string: | join('\n') Regards Racke > > On Fri, Nov 13, 2020, 12:15 PM Dick Visser

Re: [ansible-project] Stripping YAML dashes from output

2020-11-13 Thread harry devine
So how do I get rid of the u? What I ultimately wanted was JUST the email addresses. Harry On Fri, Nov 13, 2020, 12:15 PM Dick Visser wrote: > This is a simple list, which is what you wanted. > > On Fri, 13 Nov 2020 at 17:28, lift...@gmail.com > wrote: > > > > So now I'm getting this: > > >

Re: [ansible-project] Stripping YAML dashes from output

2020-11-13 Thread Dick Visser
This is a simple list, which is what you wanted. On Fri, 13 Nov 2020 at 17:28, lift...@gmail.com wrote: > > So now I'm getting this: > > User Emails: > > Date generated: 11/13/2020 11:23:32 > [u'us...@example.com', u'us...@example.com'] > > Harry > > On Friday, November 13, 2020 at 11:13:27 AM

Re: [ansible-project] Stripping YAML dashes from output

2020-11-13 Thread lift...@gmail.com
So now I'm getting this: User Emails: Date generated: 11/13/2020 11:23:32 [u'us...@example.com', u'us...@example.com'] Harry On Friday, November 13, 2020 at 11:13:27 AM UTC-5 dick@geant.org wrote: > On Fri, 13 Nov 2020 at 16:48, lift...@gmail.com wrote: > > >> >> >> > - name: Set User

Re: [ansible-project] Stripping YAML dashes from output

2020-11-13 Thread Dick Visser
On Fri, 13 Nov 2020 at 16:48, lift...@gmail.com wrote: >> >> >> > - name: Set User Email fact >> >> >> > set_fact: >> >> >> > user_list: "{{ user_find.json.result | json_query('result[].mail') | >> >> >> > list | to_nice_yaml }}" Try adding a pipe expression to the query, and leave out the

Re: [ansible-project] Stripping YAML dashes from output

2020-11-13 Thread lift...@gmail.com
Hope this works and helps: TASK [Print user_find] * ok: [localhost] => { "msg": { "cache_control": "no-cache, private", "changed": false,

[ansible-project] Helm module issue.

2020-11-13 Thread Sebastian
Hi, I'm trying to install Helm chart from the local file on the local Minikube instance but I'm constantly getting the same error: fatal: [localhost]: FAILED! => { "changed": false, "command": "/usr/local/bin/helm --namespace=kube-system list --output=yaml --filter registrylocal",

[ansible-project] Re: Pinging Windows Host Now Returns Unexpected Error

2020-11-13 Thread dwiz
Thank or the input, I thought ping module was universal. Appreciate the response On Wednesday, October 28, 2020 at 11:45:18 PM UTC-4 jbor...@gmail.com wrote: > You need to use win_ping and not ping. It's trying to run Python code in a > PowerShell engine which fails. > > On Thursday, October

Re: [ansible-project] Stripping YAML dashes from output

2020-11-13 Thread Dick Visser
At least something that is valid json with at least two iterations should be welcome. On Fri, 13 Nov 2020 at 14:53, lift...@gmail.com wrote: > > There are over 1800 users. That's alot of data for me to redact. How much > longer of a sample would you like to see? > > Harry > > On Friday,

[ansible-project] SSH authentication with multiple prompts

2020-11-13 Thread Florian LACOMMARE
Hello, I would like to know if it possible to use some network modules (aireos for example) and connect to my device which is asking me multiples prompts (username and password). The device behavior : When you try to ssh to the device, it's always working (no authentication required), and

Re: [ansible-project] Stripping YAML dashes from output

2020-11-13 Thread lift...@gmail.com
There are over 1800 users. That's alot of data for me to redact. How much longer of a sample would you like to see? Harry On Friday, November 13, 2020 at 8:49:37 AM UTC-5 dick@geant.org wrote: > that appears to be mutilated, can you post a longer piece so the > iteration structure is

Re: [ansible-project] Stripping YAML dashes from output

2020-11-13 Thread Dick Visser
that appears to be mutilated, can you post a longer piece so the iteration structure is intact ? On Fri, 13 Nov 2020 at 13:53, lift...@gmail.com wrote: > > Here's a subset of user_find.json.result: > > TASK [Print user_find] >

Re: [ansible-project] Stripping YAML dashes from output

2020-11-13 Thread lift...@gmail.com
Here's a subset of user_find.json.result: TASK [Print user_find] * ok: [localhost] => { "msg": { "count": 1826, "result": [ {

Re: [ansible-project] ansible-runner use of /etc/ansible

2020-11-13 Thread Vladimir Botka
On Thu, 12 Nov 2020 13:37:37 + "Weatherby,Gerard" wrote: > If I’m understanding the ansible-runner documentation correctly, it does not > use /etc/ansible but requires a directory structure set up in a particular > way. Not exactly. ansible-runner is a wrapper of *ansible* and

Re: [ansible-project] [WARNING]: Unhandled error in Python interpreter....

2020-11-13 Thread Vladimir Botka
On Thu, 12 Nov 2020 15:13:37 -0800 (PST) bill paxton wrote: > I have a task that works fine for Ansible 2.9.7, but fails when I upgrade > to 2.10.3. > ... > Data could not be sent to remote host "localhost". Make sure this host can > be reached over ssh: ssh: connect to host localhost port 22:

Re: [ansible-project] ansible-runner use of /etc/ansible

2020-11-13 Thread Lars Liedtke
Same here Am 12.11.20 um 14:56 schrieb Stefan Hornburg (Racke): > On 11/12/20 2:37 PM, Weatherby,Gerard wrote: >> If I’m understanding the ansible-runner documentation correctly, it does not >> use /etc/ansible but requires a directory >> structure set up in a particular way. >> >> If that is

Re: [ansible-project] How to automate ansible automation runs from Python?

2020-11-13 Thread Lars Liedtke
Hey, I have worked with cookiecutter, and it is nice. Bear in mind though, that the initial Project configuration needs some work and thought. But when you have everything setup, then it can really cut your project creation times. I cannot not really advise you on how to do it, beacuse even