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 ansible-lint #355

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 3 additions & 2 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
profile: min
exclude_paths:
- roles/caddy
- roles/cloudalchemy.blackbox-exporter
Expand All @@ -10,5 +11,5 @@ exclude_paths:
- roles/jnv.unattended-upgrades
- roles/nickjj.docker
skip_list:
- 701 # No 'galaxy_info' found, not needed.
- 106 # Role name {} does not match ``^[a-z][a-z0-9_]+$`` pattern'
- "701" # No 'galaxy_info' found, not needed.
- "106" # Role name {} does not match ``^[a-z][a-z0-9_]+$`` pattern'
27 changes: 27 additions & 0 deletions .github/workflows/ansible-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Ansible CI
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
paths:
- ansible/**
- .github/workflows/ansible-ci.yml
workflow_dispatch:

env:
ANSIBLE_FORCE_COLOR: true
ANSIBLE_GALAXY_SERVER_GALAXY_URL: "https://galaxy.ansible.com"
ANSIBLE_GALAXY_SERVER_GALAXY_TIMEOUT: 120
ANSIBLE_GALAXY_SERVER_LIST: "galaxy"

jobs:
ansible-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint collection
uses: ansible/ansible-lint@main
2 changes: 1 addition & 1 deletion roles/mediawiki/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
mode: 0755

- name: extract mediawiki
unarchive: # noqa 208
unarchive: # noqa risky-file-permissions
src: "/tmp/mediawiki-{{ mediawiki_version }}.tar.gz"
dest: "/srv/mediawiki/{{ mediawiki.domain }}"
owner: "{{ mediawiki.system_user }}"
Expand Down
4 changes: 2 additions & 2 deletions roles/tor/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: install tor debian repository
items:
with_items:
- 'deb http://deb.torproject.org/torproject.org jessie main'
- 'deb-src http://deb.torproject.org/torproject.org jessie main'
apt_repository:
Expand All @@ -18,7 +18,7 @@
- gnupg

- name: install tor
items:
with_items:
- tor
- deb.torproject.org-keyring
apt:
Expand Down
2 changes: 1 addition & 1 deletion roles/utils/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
lineinfile:
dest: /etc/sudoers
regexp: "^%sudo"
line: "%sudo ALL=(ALL:ALL) NOPASSWD: ALL" # noqa 203
line: "%sudo ALL=(ALL:ALL) NOPASSWD: ALL" # noqa no-tabs
state: present
mode: 0440
Loading