Comments (11)
I am maybe encountering this same type of event.
my wf is
steps:
- uses: actions/checkout@master
- name: Lint Ansible Playbook
uses: ansible/[email protected]
with:
args: "-c ansible/.ansible-lint"
result is
from ansible-lint-action.
Unfortunately no.
Because only strings are allowed as input (args) for actions.
Arrays are not allowed.
from ansible-lint-action.
Can you please check if you get the same issue when calling ansible-lint 6.0.2 from the command line? I tried and apparently from command line it does recognize the command separated list correctly, without the extra space.
from ansible-lint-action.
Yeah, from the CLI I don't experience any issues.
from ansible-lint-action.
Same issue here 👍
from ansible-lint-action.
I am experiencing the same issue:
- name: Run ansible-lint
uses: ansible/ansible-lint-action@v6
with:
args: "-c ansible/.config/ansible-lint.yml ansible/"
from ansible-lint-action.
A PR would be really welcomed here!
from ansible-lint-action.
Updated ansible-lint-action version after upstream changes. ChromaticHQ/devops#1620
I would love to create one. I was searching the source to see where args
might be manipulated but I am not seeing much. Does anyone have any insight as to where this might be occurring?
from ansible-lint-action.
I bet that if you use code below it will work:
with:
args:
- -c
- ansible/.config/ansible-lint.yml
- ansible/
Still, even if that works, the bug is still valid as we should split the args using shlex when it is a string instead of a list or arguments.
from ansible-lint-action.
I did a bit of research and it seems that current implementation of GHA does not allow us to pass arbitrary number of arguments to an action.
As I do not want to go to the slope of having to maintain a plethora of options for this action, I think I will replace args
with path
and mention that you can only pass one value.
Users will have to make use of ansible-lint config file for any arguments or fork the action and modify its action.yml
file.
In fact even the path
argument could be avoided because you could still edit the linter config to make it look only at certain paths, and avoid the need to pass it any arguments.
Sounds ok as a workaround? I am open to suggestions.
from ansible-lint-action.
Isn't renaming necessary?
Forcing other users to make changes is not a good idea.
I haven't found where it bugs me yet, but I did find a workaround for the -c option.
Also, on another matter, the --project-dir option doesn't seem to work.
It seems to work around that too.
steps:
- uses: actions/checkout@master
- name: copy .ansible-lint
shell: bash
run: |
cp ansible/.ansible-lint .
- name: Lint Ansible Playbook
uses: ansible/ansible-lint-action@v6
with:
args: ansible
it's my usecase,
I have an ansible directory in my repository.
The reason is that there are other directories, such as the terraform directory.
I am in the ansible directory when I work with ansible.
So .ansible-lint
is also in the ansible directory
The error with -c option can be avoided by copying the .ansible-lint
in my workflow.
By passing the working directory at the end of the args (path you changed) option,
I was able to make it almost the same as running locally.
I would like to see the changes to path revert for those who want to use the other options that are normal in ansible-lint.
Thanks for reading my bad English. 😄
from ansible-lint-action.
Related Issues (20)
- (Ability to) disable verbose output HOT 2
- Couldn't resolve module/action in ansible-lint action HOT 8
- Repository not found: ansible-community/ansible-lint-action HOT 1
- Failed to discover lintable files using git: (Warning and Error) HOT 5
- fatal: detected dubious ownership in repository at '/github/workspace' HOT 10
- Please update the action with ansible-lint 6.9.0 or later HOT 2
- Warning on every run HOT 1
- The action cannot be used as a status check in a branch protection rule HOT 1
- Ansible lint not been able to use community.general.system.timezone HOT 5
- Some ansible lint rule are not checked for the playbook HOT 1
- Update to 6.14.6
- Couldn't resolve module/action error in action but not on system HOT 1
- config ignored ? HOT 2
- Link to github marketplace is broken HOT 2
- `uses: ansible/ansible-lint@v6` yields error "unable to find version `v6`" HOT 1
- Ansible-lint-action is not returning the same result as local ansible-lint HOT 1
- `ansible-lint` outdated HOT 1
- requirements.yml not loaded from given path HOT 3
- ansible-lint fails validating the .github/workflows/ansible-lint.yml HOT 3
- Update to ansible-lint 6.17.2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-lint-action.