|
| 1 | +name: Ansible Lint # feel free to pick your own name |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + ansible-lint: |
| 7 | + |
| 8 | + runs-on: ubuntu-latest |
| 9 | + |
| 10 | + steps: |
| 11 | + # Important: This sets up your GITHUB_WORKSPACE environment variable |
| 12 | + - uses: actions/checkout@v2 |
| 13 | + |
| 14 | + - name: Lint Ansible Playbook |
| 15 | + # replace "master" with any valid ref |
| 16 | + uses: ansible/ansible-lint-action@master |
| 17 | + with: |
| 18 | + # [required] |
| 19 | + # Paths to ansible files (i.e., playbooks, tasks, handlers etc..) |
| 20 | + # or valid Ansible directories according to the Ansible role |
| 21 | + # directory structure. |
| 22 | + # If you want to lint multiple ansible files, use the following syntax |
| 23 | + # targets: | |
| 24 | + # playbook_1.yml |
| 25 | + # playbook_2.yml |
| 26 | + targets: "roles/" |
| 27 | + # [optional] |
| 28 | + # Arguments to override a package and its version to be set explicitly. |
| 29 | + # Must follow the example syntax. |
| 30 | + # override-deps: | |
| 31 | + # ansible==2.9 |
| 32 | + # ansible-lint==4.2.0 |
| 33 | + # [optional] |
| 34 | + # Arguments to be passed to the ansible-lint |
| 35 | + |
| 36 | + # Options: |
| 37 | + # -q quieter, although not silent output |
| 38 | + # -p parseable output in the format of pep8 |
| 39 | + # --parseable-severity parseable output including severity of rule |
| 40 | + # -r RULESDIR specify one or more rules directories using one or |
| 41 | + # more -r arguments. Any -r flags override the default |
| 42 | + # rules in ansiblelint/rules, unless -R is also used. |
| 43 | + # -R Use default rules in ansiblelint/rules in addition to |
| 44 | + # any extra |
| 45 | + # rules directories specified with -r. There is no need |
| 46 | + # to specify this if no -r flags are used |
| 47 | + # -t TAGS only check rules whose id/tags match these values |
| 48 | + # -x SKIP_LIST only check rules whose id/tags do not match these |
| 49 | + # values |
| 50 | + # --nocolor disable colored output |
| 51 | + # --exclude=EXCLUDE_PATHS |
| 52 | + # path to directories or files to skip. This option is |
| 53 | + # repeatable. |
| 54 | + # -c C Specify configuration file to use. Defaults to ".ansible-lint" |
| 55 | + args: "" |
| 56 | + |
0 commit comments