Skip to content

Commit

Permalink
Merge pull request #1 from voidquark/all-lint
Browse files Browse the repository at this point in the history
lint ansible and yaml
  • Loading branch information
voidquark committed Aug 14, 2024
2 parents 0cca279 + a12abb0 commit 31968da
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
skip_list:
- 'yaml'
- 'partial-become'
- 'no-changed-when'
28 changes: 28 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Lint
# yamllint disable-line rule:truthy
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
run: pip3 install yamllint

- name: Run Yaml Lint
run: |
yamllint .
- name: Run Ansible Lint
uses: ansible/ansible-lint@main
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode
7 changes: 7 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
extends: default

rules:
line-length:
max: 230
level: warning
3 changes: 2 additions & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
# handlers file for privatebin

- name: restart privatebin
- name: Restart privatebin
listen: "restart privatebin"
ansible.builtin.systemd:
name: "container-{{ privatebin_container_name }}.service"
state: "restarted"
Expand Down
3 changes: 2 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
galaxy_info:
author: voidquark
description: Manage PrivateBin Application
company: VoidQuark

license: MIT

min_ansible_version: 2.1
min_ansible_version: "2.1"

platforms:
- name: EL
Expand Down
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

- name: Create the privatebin group
ansible.builtin.group:
name: "{{ privatebin_group }}"
name: "{{ privatebin_group }}"
system: false
state: present

Expand Down

0 comments on commit 31968da

Please sign in to comment.