Re: [ansible-project] with_items stat too verbose

2019-01-30 Thread rjwagner . dba
Hey Felix - can you elaborate? I'm already using: loop_control: label: "{{ item.item }}" As shown in my post. It doesn't quench the output of the items. Am I missing something? Rob On Monday, January 28, 2019 at 2:11:57 PM UTC-5, Felix Fontein wrote: > > Hi, > > check out the label

Re: [ansible-project] with_items stat too verbose

2019-01-30 Thread rjwagner . dba
Hey Jonathan - thanks for the suggestion, but -v doesn't help. If I include no_log: True, including -v just outputs the same: TASK [Confirming ownership of filesystems] * ok: [localhost] => (item=(censored due to no_log)) => {"censored": "the output has

[ansible-project] with_items stat too verbose

2019-01-28 Thread rjwagner . dba
Hey all- I'm using stat and with_items to check proper ownership of various files. Is there any way to reduce the volume of output (i.e., eliminate everything in red, below)? rowagn@localhost:~/data-platform/oracle/ansible/db12r2$ cat test.yml --- - hosts: localhost tasks: - name: Stat

[ansible-project] Re: finding first host meeting a condition

2019-01-04 Thread rjwagner . dba
Nevermind; figured this out. Was actually pretty simple. I declared a variable as an empty string, iterated over the hosts w/ hostvars, updated the variable with the item, and used when: (variable | length > 0 ) and (ps_output | length > 0). Including the variable in the when: test was

[ansible-project] finding first host meeting a condition

2019-01-04 Thread rjwagner . dba
Hey all- I need to find the first host in the inventory running a particular process. I can query the hosts to look for the process using a shell pipeline and register the output in a variable (call it ps_output). But I'm stuck on how to iterate over the hosts, examining the value of

[ansible-project] dig lookup exception: 'list' object has no attribute 'startswith'

2018-12-10 Thread rjwagner . dba
Hey all- I'm having more problems w/ the dig lookup. If I statically define a list of hosts to lookup as a variable, it works. But if I return the list of hosts from another script, it fails. Here's a simple example: $ cat test.py #!/usr/bin/env python import json hostList = []

[ansible-project] dig lookup multiple hosts

2018-12-05 Thread rjwagner . dba
Hey all - I'm trying to lookup the IPs for a list of FQDNs. The dig lookup is close to what I need, but it appears to return a list of IPs for a single FQDN; when using with_items, it yields each of the IPs for that FQDN (https://docs.ansible.com/ansible/2.5/plugins/lookup/dig.html). Any idea

Re: [ansible-project] default filter on with_items with from_json

2018-08-10 Thread rjwagner . dba
Ah, yes. Makes sense now. Thanks Kai. Rob -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this

Re: [ansible-project] default filter on with_items with from_json

2018-08-09 Thread rjwagner . dba
Thanks very much, Kai. This does help my understanding. I was trying to use default() after the b.stdout to generate the JSON (i.e., have default generate '{ "a": "[]" }') and wasn't having any luck because of all the nested quotes. I still consider it counterintuitive that Ansible evaluates

[ansible-project] default filter on with_items with from_json

2018-08-08 Thread rjwagner . dba
I'm running into the infamous issue where with_items isn't skipped if when evaluates to false (https://github.com/ansible/ansible/issues/13791). That said, I'm at loss as to how to workaround my particular issue. Consider these two tasks (simplified for discussion): #> cat b.yml --- - hosts: