Skip to content
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

fix(ci): Fix Linting #61

Merged
merged 17 commits into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
---
name: Lint
'on':
name: Linting
on:
pull_request:
push:
branches:
- master

jobs:

test:
name: Lint
ansible-lint:
name: YAML Lint + Ansible Lint
runs-on: ubuntu-latest

steps:
- name: Check out the codebase.
uses: actions/checkout@v2
- name: Check out the codebase
uses: actions/checkout@v3

- name: Set up Python 3.7.
uses: actions/setup-python@v2
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install test dependencies.
- name: Install test dependencies
run: pip3 install yamllint ansible-lint ansible

- name: Run yamllint.
- name: Run yamllint
run: yamllint .

- name: Run ansible-lint.
- name: Run ansible-lint
run: ansible-lint
1 change: 1 addition & 0 deletions roles/k3s/master/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
name: k3s-init
state: stopped
failed_when: false
when: not ansible_check_mode

- name: Copy K3s service file
register: k3s_service
Expand Down
1 change: 1 addition & 0 deletions roles/raspberrypi/tasks/prereq/CentOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$'
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
notify: reboot
when: not ansible_check_mode
3 changes: 2 additions & 1 deletion roles/raspberrypi/tasks/prereq/Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$'
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
notify: reboot
when: not ansible_check_mode

- name: Install linux-modules-extra-raspi
apt: name=linux-modules-extra-raspi state=present
when: raspberry_pi
when: (raspberry_pi) and (not ansible_check_mode)