Code Monkey home page Code Monkey logo

Comments (14)

webknjaz avatar webknjaz commented on June 11, 2024 2

/me needs to finally cut another tag

from ansible-lint-action.

nleiva avatar nleiva commented on June 11, 2024 2

Oh, ansible-lint has a bug, got it. Thank you for taking a look at my logs.

I went with @master as @4.1.0 requires an env variable (ACTION_PLAYBOOK_NAME). I prefer the newer version. I'll keep an eye on the updates.

from ansible-lint-action.

webknjaz avatar webknjaz commented on June 11, 2024

Show your workflow/links/anything else useful. Currently, I don't know what you're referring to.

from ansible-lint-action.

webknjaz avatar webknjaz commented on June 11, 2024

Also, pre-commit hook is defined in ansible-lint repo, not in the action repo.

from ansible-lint-action.

colin-mccarthy avatar colin-mccarthy commented on June 11, 2024

I ran the pre-commit hook myself as a test.

Here is a link to one of the builds:
https://github.com/colin-mccarthy/ansible_lint_demo/runs/489028995?check_suite_focus=true

During the "Lint Ansible Playbook" step of the build it fails with out giving any reason why.

from ansible-lint-action.

webknjaz avatar webknjaz commented on June 11, 2024

Right, so you copy-pasted an example from readme: https://github.com/colin-mccarthy/ansible_lint_demo/actions/runs/50443849/workflow. But you should also read the comments there explaining what to set in the "with:" section.

We just run ansible-lint with whatever you specify.

Action item for this project: try to validate inputs and yell at empty ones.

from ansible-lint-action.

colin-mccarthy avatar colin-mccarthy commented on June 11, 2024

Are you suggesting I need to alter the targets parameter?

from ansible-lint-action.

webknjaz avatar webknjaz commented on June 11, 2024

Yes #12 (comment)

from ansible-lint-action.

colin-mccarthy avatar colin-mccarthy commented on June 11, 2024

Updating the targets section did not resolve the issue:

https://github.com/colin-mccarthy/ansible_lint_demo/runs/490265426?check_suite_focus=true

from ansible-lint-action.

webknjaz avatar webknjaz commented on June 11, 2024

Try updating target ref to v4.1.0.post0 or master and see what happens.

from ansible-lint-action.

webknjaz avatar webknjaz commented on June 11, 2024

Or pin to sha 151b9a2 (the safest option security-wise)

from ansible-lint-action.

colin-mccarthy avatar colin-mccarthy commented on June 11, 2024

Okay working now with:

uses: ansible/ansible-lint-action@151b9a2

targets: "./"

Thanks for clarifying the parameters!

from ansible-lint-action.

nleiva avatar nleiva commented on June 11, 2024

Is this definitive? In my scenario (using @master), "./" doesn't match any file and the test shows as successful, which is misleading. On the other hand "*.yml" seems to work fine, it translates that to the actual filenames (matches all the files in the root and subfolders (not the folder tests though).

Not working with "./"

+ ansible-lint -v --force-color ./
+ shopt -u globstar

Working with "*.yml"

+ ansible-lint -v --force-color add-to-inventory.yml create-incident.yml inventory-snow.yml ios-genie-show-ver.yml ios-show-ver.yml modify-incident.yml request-status.yml
/github/workspace /github/workspace
Examining add-to-inventory.yml of type playbook
...
+ shopt -u globstar

from ansible-lint-action.

webknjaz avatar webknjaz commented on June 11, 2024

@nleiva master doesn't pin the ansible-lint version in Dockerfile (which is build at the beginning of each GHA workflow and is not reused from cache). The args are passed to ansible-lint that has its own autodiscovery. There's been some bugs with it so I don't know if the version you hit (4.2.0) works as you want. It'll probably get fixed with the release of v4.3.0 later this summer.

from ansible-lint-action.

Related Issues (20)

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.