Brilliant....  Thanks Fletcher. 

So any suggestions on why this output doesn't translate well to bbresults?

command:
ansible-lint dpk_LDAP_service_accounts_default_setup.yml


output:
WARNING  Overriding detected file kind 'yaml' with 'playbook' for given 
positional argument: dpk_LDAP_service_accounts_default_setup.yml
[WARNING]: While constructing a mapping from 
/Users/dbpiv/Documents/PSFT/Ansible/Tasks/Notification-Teams.yml, line 27, 
column 7, found a duplicate dict key (delegate_to). Using
last defined value only.
[WARNING]: While constructing a mapping from <unicode string>, line 27, 
column 7, found a duplicate dict key (delegate_to). Using last defined 
value only.
WARNING  Listing 7 violation(s) that are fatal
unnamed-task: All tasks should be named
dpk_LDAP_service_accounts_default_setup.yml:34 Task/Handler: set_fact 
timestamp={{lookup('pipe', 'date "+%Y-%m-%d %H:%M:%S"')}}

var-spacing: Variables should have spaces before and after: 
{{lookup('pipe', 'date "+%Y-%m-%d %H:%M:%S"')}}
dpk_LDAP_service_accounts_default_setup.yml:34 Task/Handler: set_fact 
timestamp={{lookup('pipe', 'date "+%Y-%m-%d %H:%M:%S"')}}

no-changed-when: Commands should not change things if nothing needs doing
dpk_LDAP_service_accounts_default_setup.yml:37 Task/Handler: Get DN from 
ldap for each id

risky-shell-pipe: Shells that use pipes should set the pipefail option
dpk_LDAP_service_accounts_default_setup.yml:37 Task/Handler: Get DN from 
ldap for each id

var-spacing: Variables should have spaces before and after: {{ 
ldapsearch_output.stdout | 
regex_search("(?<=distinguishedName:.).*?(?=\s)", multiline=True, 
ignorecase=True)}}
dpk_LDAP_service_accounts_default_setup.yml:42 Task/Handler: Obtain facts 
from ldap output

risky-file-permissions: File permissions unset or incorrect
dpk_LDAP_service_accounts_default_setup.yml:61 Task/Handler: create ldif 
(via template method)

command-instead-of-shell: Use shell only when shell functionality is 
required
dpk_LDAP_service_accounts_default_setup.yml:69 Task/Handler: Update LDAP 
with default ssh key service account info

You can skip specific rules or tags by adding them to your configuration 
file:
# .ansible-lint
warn_list:  # or 'skip_list' to silence them completely
  - command-instead-of-shell  # Use shell only when shell functionality is 
required
  - experimental  # all rules tagged as experimental
  - no-changed-when  # Commands should not change things if nothing needs 
doing
  - risky-shell-pipe  # Shells that use pipes should set the pipefail option
  - unnamed-task  # All tasks should be named
  - var-spacing  # Variables should have spaces before and after:  {{ 
var_name }}
Finished with 6 failure(s), 1 warning(s) on 2 files. 

On Monday, March 29, 2021 at 11:53:43 AM UTC-4 fletc...@cumuli.com wrote:

> I think the -n flag is critical on the grep command for this to work.
>
> grep -n win_template *.yml | bbresults -p grep
>
> [fletcher]
>
>
> > On Mar 29, 2021, at 8:34 AM, Daniel Palmer <dbp...@emory.edu> wrote:
> > 
> > I am working on adding an Ansible-lint script to bbedit for my coding. I 
> seem to be having an issue with bbresults not showing the results. 
> Specifically when I run a command and pipe it into bbresults, BBEdit 
> becomes the main focus but no new windows are opened. 
> > 
> > I have backed my test down to a simple "grep win_template *.yml | 
> bbresults -p grep" as described in the man page.
> > 
> > If I disassemble the command:
> > 
> > command:
> > grep win_template *.yml
> > output:
> > 
> > Tools_Patch_Prep_8.57_win.yml: win_template:
> > Tools_Patch_Prep_8.57_win.yml: win_template:
> > Tools_Patch_Prep_8.58_win.yml: win_template:
> > Tools_Patch_Prep_8.58_win.yml: win_template:
> > dpk_1.yml: win_template:
> > dpk_1.yml: win_template:
> > 
> > then appending | bbresults -p grep .... BBEdit gets focus but no new 
> window and no output. 
> > 
> > Am I missing a security setting? Or am I missing something else?
> > 
> > Thanks,
> > 
> > dp
> > 
> > -- 
> > This is the BBEdit Talk public discussion group. If you have a feature 
> request or need technical support, please email "sup...@barebones.com" 
> rather than posting here. Follow @bbedit on Twitter: <
> https://twitter.com/bbedit>
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups "BBEdit Talk" group.
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to bbedit+un...@googlegroups.com.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/efed08a8-80d6-4083-915f-c8666ae2e261n%40googlegroups.com
> .
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/18a3eb9f-8921-48d3-b52b-fcd956eb2a76n%40googlegroups.com.

Reply via email to