Created
October 24, 2017 09:15
-
-
Save kklimonda/cc23188c5cdb69ff86f5083c16e49e51 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: localhost | |
connection: local | |
tasks: | |
- name: Create a list of YAML files to validate | |
find: | |
paths: . | |
patterns: "*.yaml" | |
recurse: true | |
register: yaml | |
changed_when: false | |
- include_tasks: validate_yaml.yaml | |
with_items: "{{ yaml.files | map(attribute='path') | list }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: "Validate {{ item }}" | |
validate_yaml: | |
path: "{{ item }}" | |
ignore_errors: True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment