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

ci: fix ansible-lint #225

Merged
merged 1 commit into from
Jun 5, 2024
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
fail-fast: ${{ !contains(github.event_name, 'pull_request') }}
matrix:
config:
- image: "rockylinux8"
- image: "rockylinux9"
cgroup_mode: "host"
volumes: "rw"
- image: "ubuntu2204"
- image: "ubuntu2404"
cgroup_mode: "host"
volumes: "rw"
steps:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
strategy:
matrix:
config:
- image: "ubuntu2204"
- image: "ubuntu2404"
cgroup_mode: "host"
volumes: "rw"
steps:
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ jobs:
- name: checkout
uses: actions/checkout@v3
with:
path: "${{ github.repository }}"
- name: Molecule for Ansible - lint
uses: MonolithProjects/[email protected]
with:
molecule_command: lint
path: 'lablabs.rke2'

- name: Set up Python 3
uses: actions/setup-python@v4
Expand All @@ -29,5 +25,5 @@ jobs:
run: pip3 install ansible-lint

- name: Run ansible-lint
run: ansible-lint --profile production .
run: ansible-lint --profile production ./tasks
working-directory: ./lablabs.rke2
6 changes: 5 additions & 1 deletion .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
extends: default

rules:
comments:
min-spaces-from-content: 1
octal-values:
forbid-implicit-octal: false
forbid-explicit-octal: true
braces:
max-spaces-inside: 1
level: error
Expand All @@ -15,7 +20,6 @@ rules:
commas:
max-spaces-after: -1
level: error
comments: disable
comments-indentation: disable
document-start: disable
empty-lines:
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ The Role can install the RKE2 in 3 modes:

## Tested on

* Rocky Linux 8
* Ubuntu 20.04 LTS
* Ubuntu 22.04 LTS
* Rocky Linux 9
* Ubuntu 24.04 LTS

## Role Variables

Expand Down
16 changes: 11 additions & 5 deletions molecule/cluster/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
hosts: node*
become: true
tasks:
- name: Install packages
- name: Install wget for Ubuntu
ansible.builtin.package:
update_cache: true
name: "{{ item }}"
loop:
- wget
- curl
name:
- wget
when: ansible_distribution == "Ubuntu"

- name: Install iproute for RockyLinux
ansible.builtin.package:
update_cache: true
name:
- iproute
when: ansible_distribution == "Rocky"
6 changes: 3 additions & 3 deletions molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
hosts: node*
become: true
tasks:
- name: Install packages
- name: Install wget for Ubuntu
ansible.builtin.package:
update_cache: true
name:
- wget
- curl
when: ansible_distribution == "Ubuntu"

- name: Install special packages for RockyLinux
- name: Install iproute for RockyLinux
ansible.builtin.package:
update_cache: true
name:
Expand Down
16 changes: 11 additions & 5 deletions molecule/ha_cluster/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
hosts: node*
become: true
tasks:
- name: Install packages
- name: Install wget for Ubuntu
ansible.builtin.package:
update_cache: true
name: "{{ item }}"
loop:
- wget
- curl
name:
- wget
when: ansible_distribution == "Ubuntu"

- name: Install iproute for RockyLinux
ansible.builtin.package:
update_cache: true
name:
- iproute
when: ansible_distribution == "Rocky"
16 changes: 11 additions & 5 deletions molecule/ha_cluster_kubevip/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
hosts: node*
become: true
tasks:
- name: Install packages
- name: Install wget for Ubuntu
ansible.builtin.package:
update_cache: true
name: "{{ item }}"
loop:
- wget
- curl
name:
- wget
when: ansible_distribution == "Ubuntu"

- name: Install iproute for RockyLinux
ansible.builtin.package:
update_cache: true
name:
- iproute
when: ansible_distribution == "Rocky"
Loading