Giter Club home page Giter Club logo

luxcompany / ansible-lint-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ansible/ansible-lint-action

0.0 0.0 0.0 95 KB

[NOT OFFICIALLY SUPPORTED BY RED HAT BUT BY VOLUNTEERS] | GitHub Action for running ansible-lint as part of your workflows! [ https://github.com/marketplace/actions/ansible-lint ] | PLEASE REPORT `ansible-lint` BUGS TO https://github.com/ansible-community/ansible-lint

Home Page: https://ansible-lint.rtfd.io

License: MIT License

Dockerfile 22.86% Shell 77.14%

ansible-lint-action's Introduction

Ansible Lint for GitHub Action

This action allows you to run ansible-lint with no additional options.

Usage

To use the action simply create an ansible-lint.yml (or choose custom *.yml name) in the .github/workflows/ directory.

For example:

name: Ansible Lint  # feel free to pick your own name

on: [push, pull_request]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    # Important: This sets up your GITHUB_WORKSPACE environment variable
    - uses: actions/checkout@v2

    - name: Lint Ansible Playbook
      # replace "master" with any valid ref
      uses: ansible/ansible-lint-action@master
      with:
        # [required]
        # Paths to ansible files (i.e., playbooks, tasks, handlers etc..)
        # or valid Ansible directories according to the Ansible role
        # directory structure.
        # If you want to lint multiple ansible files, use the following syntax
        # targets: |
        #   playbook_1.yml
        #   playbook_2.yml
        targets: ""
        # [optional]
        # Arguments to override a package and its version to be set explicitly.
        # Must follow the example syntax.
        override-deps: |
          ansible==2.9
          ansible-lint==4.2.0
        # [optional]
        # Arguments to be passed to the ansible-lint

        # Options:
        #   -q                    quieter, although not silent output
        #   -p                    parseable output in the format of pep8
        #   --parseable-severity  parseable output including severity of rule
        #   -r RULESDIR           specify one or more rules directories using one or
        #                         more -r arguments. Any -r flags override the default
        #                         rules in ansiblelint/rules, unless -R is also used.
        #   -R                    Use default rules in ansiblelint/rules in addition to
        #                         any extra
        #                         rules directories specified with -r. There is no need
        #                         to specify this if no -r flags are used
        #   -t TAGS               only check rules whose id/tags match these values
        #   -x SKIP_LIST          only check rules whose id/tags do not match these
        #                         values
        #   --nocolor             disable colored output
        #   --exclude=EXCLUDE_PATHS
        #                         path to directories or files to skip. This option is
        #                         repeatable.
        #   -c C                  Specify configuration file to use. Defaults to ".ansible-lint"
        args: ""

TIP: N.B. Use ansible/[email protected] or any other valid tag, or branch, or commit SHA instead of v4.1.0 to pin the action to use a specific version.

Alternatively, you can run the ansible lint only on certain branches:

on:
  push:
    branches:
    - stable
    - release/v*

or on various events


License

The Dockerfile and associated scripts and documentation in this project are released under the MIT.

Credits

The initial GitHub action has been created by Stefan Stölzle at stoe/actions.

ansible-lint-action's People

Contributors

b1az avatar baschny avatar do1jlr avatar gundalow avatar lpenz avatar srl295 avatar stoe avatar tristanbes avatar webknjaz avatar xunholy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.