Skip to content

Commit

Permalink
Merge pull request #1 from tbauriedel/add-linting
Browse files Browse the repository at this point in the history
add basic linter
  • Loading branch information
tbauriedel authored Sep 18, 2024
2 parents 06e5956 + 9e712e6 commit 0ba0ea7
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 5 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Linting

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

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v4

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

- name: Install test dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install ansible-core ansible-lint yamllint
- name: yamllint
run: yamllint .

- name: ansible-lint
run: ansible-lint .
6 changes: 6 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
extends: relaxed
rules:
line-length:
max: 150
level: warning
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
![Lint](https://github.com/tbauriedel/vagrant-icinga-dev/actions/workflows/linting.yml/badge.svg)

# vagrant-icinga-dev

Vagrantfile with ansible provisioner.
Expand Down
4 changes: 2 additions & 2 deletions ansible/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- name: Include vars
ansible.builtin.include_vars:
dir: vars
extensions:
extensions:
- "yml"
- "yaml"

Expand All @@ -29,7 +29,7 @@
state: started
enabled: true
when: ansible_os_family == "RedHat"

roles:
- tbauriedel.gographite.gocarbon
- tbauriedel.gographite.carbonapi
Expand Down
2 changes: 1 addition & 1 deletion ansible/vars/icinga2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ icinga2_objects:
file: "zones.d/main/apiuser.conf"
password: poweruser
permissions:
- '*'
- '*'
2 changes: 1 addition & 1 deletion ansible/vars/icingadb_redis.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
icingadb_redis_password: redis-pass
icingadb_redis_password: redis-pass
2 changes: 1 addition & 1 deletion ansible/vars/icingaweb2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ icingaweb2_modules:
password: redis-pass

icingaweb2_admin_username: icinga
icingaweb2_admin_password: icinga
icingaweb2_admin_password: icinga

0 comments on commit 0ba0ea7

Please sign in to comment.