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.