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

Lint pass: 2024-08-01 #4

Merged
merged 29 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a3d642e
Add workflow_disaptch trigger.
Aug 1, 2024
712afd8
Download collections before running ansible-lint.
Aug 1, 2024
d9c72c0
Fix incorrect ansible-galaxy command syntax.
Aug 1, 2024
8637014
Don't install collections, add requirements.yml.
Aug 1, 2024
26ffc69
Add collections section.
Aug 1, 2024
24da9dc
Move requirements file to the meta dir in role.
Aug 1, 2024
ee2d76b
Try having requirements.yml in the root dir.
Aug 1, 2024
dbcc32f
Remove requirements.yml from root dir, this did nothing.
Aug 1, 2024
ff750dd
More troubleshooting on dependency install.
Aug 1, 2024
e0e72c3
Add ansible-lint to disable offline mode.
Aug 1, 2024
4694e54
Remove name: key from collections list.
Aug 1, 2024
aa37f06
Downgrade ansible-lint action to 6.11.
Aug 1, 2024
e439d11
Use a command instead of the action.
Aug 1, 2024
e185f52
Use ansible-test instead of ansible-lint.
Aug 1, 2024
aa9f789
Rename to test, stop using ansible-lint.
Aug 1, 2024
3adf7e7
Replace working_directory with working-directory.
Aug 1, 2024
b37a060
Add -p flag and create whole dir structure at onece.
Aug 1, 2024
ff964fb
Fix typo.
Aug 1, 2024
3f5c740
Remove variable from working_directory.
Aug 1, 2024
f054b34
Add missing leading slash to working dir.
Aug 1, 2024
deaab5d
Move cd to the collection root.
Aug 1, 2024
d843779
Add pip requirements, rename to lint, install lint.
Aug 1, 2024
65406ee
Try running without the collection dir structure.
Aug 1, 2024
5f5ac78
Add ansible to requirements.txt
Aug 1, 2024
0e4e33b
Remove trailing spaces.
Aug 1, 2024
46c2ba7
Add permissions to backup files.
Aug 1, 2024
ef43145
Merge branch 'fix/lint-20240801' into repo/lint-workflow
Aug 1, 2024
bbb5c4c
Quote octals.
Aug 1, 2024
4c56b0e
Fix permissions being in delete task, not restore.
Aug 1, 2024
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
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
offline: false
14 changes: 12 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@ on:
- main
- release/v*

workflow_dispatch:

jobs:
build:
lint:
name: Ansible Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
cache: pip

- name: Install python dependencies
run: pip install -r requirements.txt

- name: Run ansible-lint
uses: ansible/ansible-lint@main
run: ansible-lint
File renamed without changes.
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ansible
ansible-lint
3 changes: 3 additions & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
collections:
- community.general
- community.crypto
2 changes: 1 addition & 1 deletion roles/uki_config/meta/argument_specs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ argument_specs:
type: path
description: The path to the MOK x509 certificate.
default: /etc/kernel/MOK.cer

owner:
type: str
default: root
Expand Down
18 changes: 18 additions & 0 deletions roles/uki_config/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,12 @@
ansible.builtin.copy:
content: "{{ ukify_config_backup.content | b64decode }}"
dest: "{{ ukify_conf_path }}"
owner: root
group: root
mode: "0644"
seuser: system_u
serole: object_r
setype: etc_t
changed_when: false

- name: Delete new ukify configuration file
Expand All @@ -335,6 +341,12 @@
ansible.builtin.copy:
content: "{{ dracut_config_backup.content | b64decode }}"
dest: "{{ dracut_conf_path }}"
owner: root
group: root
mode: "0644"
seuser: system_u
serole: object_r
setype: etc_t
changed_when: false

- name: Delete new dracut configuration file
Expand All @@ -351,6 +363,12 @@
ansible.builtin.copy:
content: "{{ kernel_install_config_backup.content | b64decode }}"
dest: "{{ install_conf_path }}"
owner: root
group: root
mode: "0644"
seuser: system_u
serole: object_r
setype: etc_t
changed_when: false

- name: Remove new kernel-install configuration file
Expand Down
Loading