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

Add linting workflow #4

Merged
merged 1 commit into from
Dec 28, 2023
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
35 changes: 35 additions & 0 deletions .github/workflows/yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Lint

on:
push:
branches:
- "*"
pull_request:
branches:
- "*"

jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v4

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

- name: Install test dependencies.
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements-test.txt

- name: yamllint
run: |
yamllint .

- name: ansible-lint
run: |
ansible-lint .
5 changes: 5 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
extends: relaxed

rules:
line-length: disable
2 changes: 2 additions & 0 deletions ansible-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
skip_list:
- var-naming[no-role-prefix] # remove when https://github.com/ansible/ansible-lint/discussions/3451 is done
2 changes: 2 additions & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ansible
ansible-lint
8 changes: 4 additions & 4 deletions roles/repos/tasks/Debian.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
- name: apt - Add repositiory key
- name: Apt - Add repositiory key
ansible.builtin.apt_key:
state: present
url: "{{ influxdb_repos_key_url }}"

- name: apt - Add repository to list
ansible.builtin.apt_repository:
repo: "{{ influxdb_repos_stable }}"
- name: Apt - Add repository to list
ansible.builtin.apt_repository:
repo: "{{ influxdb_repos_stable }}"
state: present
4 changes: 2 additions & 2 deletions roles/repos/tasks/RedHat.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
- name: yum - Add repositiory key
- name: Yum - Add repositiory key
ansible.builtin.rpm_key:
state: present
key: "{{ influxdb_repos_key_url }}"

- name: yum - Add repository to list
- name: Yum - Add repository to list
ansible.builtin.yum_repository:
state: present
name: influxdb
Expand Down
2 changes: 1 addition & 1 deletion roles/repos/vars/Debian.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
influxdb_repos_stable: "deb https://repos.influxdata.com/{{ ansible_distribution|lower }} {{ ansible_distribution_release|lower }} stable"
influxdb_repos_stable: "deb https://repos.influxdata.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }} stable"
2 changes: 1 addition & 1 deletion roles/repos/vars/default.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
# default variables for influxdb.repos
# default variables for influxdb.repos
2 changes: 1 addition & 1 deletion vagrant-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
become: true

roles:
- repos
- repos