You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some linting errors and code style issues with the way the playbook is currently written (though, in general, it is a very good example (IMO) of a concise and well-written Ansible playbook!).
To Reproduce
Run ansible-lint and/or yamllint on the contrib/ansible playbook.
Expected behavior
No linting issues found.
Actual behavior
$ ansible-lint
[201] Trailing whitespace
roles/k3s/master/tasks/main.yml:39
set_fact:
[201] Trailing whitespace
roles/k3s/master/tasks/main.yml:42
- name: Restore node-token file access
[301] Commands should not change things if nothing needs doing
roles/k3s/master/tasks/main.yml:60
Task/Handler: Replace https://localhost:6443 by https://master-pi:6443
[201] Trailing whitespace
roles/raspbian/tasks/main.yml:19
- name: Rebooting on Raspbian
[305] Use shell only when shell functionality is required
roles/raspbian/tasks/main.yml:19
Task/Handler: Rebooting on Raspbian
$ yamllint .
./site.yml
7:8 error too many spaces inside braces (braces)
7:21 error too many spaces inside braces (braces)
8:8 error too many spaces inside braces (braces)
8:23 error too many spaces inside braces (braces)
9:8 error too many spaces inside braces (braces)
9:23 error too many spaces inside braces (braces)
13:1 warning comment not indented like content (comments-indentation)
16:8 error too many spaces inside braces (braces)
16:25 error too many spaces inside braces (braces)
19:1 warning comment not indented like content (comments-indentation)
22:8 error too many spaces inside braces (braces)
22:23 error too many spaces inside braces (braces)
./reset.yml
7:8 error too many spaces inside braces (braces)
7:20 error too many spaces inside braces (braces)
./roles/raspbian/tasks/main.yml
19:30 error trailing spaces (trailing-spaces)
./roles/download/tasks/main.yml
10:7 error wrong indentation: expected 4 but found 6 (indentation)
15:1 warning comment not indented like content (comments-indentation)
20:7 error wrong indentation: expected 4 but found 6 (indentation)
31:7 error wrong indentation: expected 4 but found 6 (indentation)
./roles/k3s/master/tasks/main.yml
39:12 error trailing spaces (trailing-spaces)
40:4 error wrong indentation: expected 4 but found 3 (indentation)
42:39 error trailing spaces (trailing-spaces)
./inventory/group_vars/all.yml
1:1 warning missing document start "---" (document-start)
Additional context / logs
To prevent any future regressions, it would be nice to set up ansible-lint and/or yamllint (at least—could also set up Molecule for a functional test of the playbook) in CI.
I'll be opening a PR that adds a .yamllint configuration that's fairly standard for Ansible playbooks, and fixes for all the discovered issues.
The text was updated successfully, but these errors were encountered:
Version:
N/A
K3s arguments:
N/A
Describe the bug
There are some linting errors and code style issues with the way the playbook is currently written (though, in general, it is a very good example (IMO) of a concise and well-written Ansible playbook!).
To Reproduce
Run
ansible-lint
and/oryamllint
on thecontrib/ansible
playbook.Expected behavior
No linting issues found.
Actual behavior
Additional context / logs
To prevent any future regressions, it would be nice to set up
ansible-lint
and/oryamllint
(at least—could also set up Molecule for a functional test of the playbook) in CI.I'll be opening a PR that adds a
.yamllint
configuration that's fairly standard for Ansible playbooks, and fixes for all the discovered issues.The text was updated successfully, but these errors were encountered: