-
Notifications
You must be signed in to change notification settings - Fork 25
Adds ansible-lint GHA step in lint workflow #1281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
More linting is always welcomed IMO!
- "Pushed the following images:" | ||
- " {{ collector_image }}-{{ arch }}-slim" | ||
- " {{ collector_image }}-{{ arch }}-base" | ||
- " {{ ansible_env.RHACS_ENG_IMAGE }}-{{ arch }}-slim" | ||
- " {{ ansible_env.RHACS_ENG_IMAGE }}-{{ arch }}-base" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dang, I prefer arrays to be in the same line for the object, but OK.
when: not python_exists | ||
- when: not python_exists | ||
creates: /usr/bin/python3 | ||
block: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
delay: 10 | ||
sleep: 10 | ||
timeout: 60 | ||
- name: Wait for reboot to complete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be extra clear, we don't need to reboot if the interpreter was already installed, which we were doing before, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we were always rebooting before, but that only needs to happen when we've attempted to install a package (it's not applied until the machine reboots) so now it's more precise in its behaviour
@@ -3,11 +3,18 @@ | |||
set_fact: | |||
distro: "centos" | |||
|
|||
- name: Install yum utils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder what lint error triggered this code block to suddenly appear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's a rule that analyses scripts (shell
and command
blocks) for commands that have a pre-existing ansible task. Since we were manually using yum in the shell below, it was flagging on that. It's also why the use of make
has now changed in some other the other playbooks
|
5e398ef
to
615945e
Compare
bf1aec4
to
3d8efde
Compare
Description
Adds ansible-lint to CI to improve our ansible quality, especially now that our playbooks and roles are expanding for multi-arch.
This PR will also fix any lint errors that are introduced by this addition.
Checklist