Skip to content

Commit

Permalink
Add GH actions, update pip requiremnts, lint fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
sadsfae committed Mar 23, 2022
1 parent 8946ab9 commit 05ea627
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
warn_list:
- command-instead-of-module
- no-changed-when
- var-spacing
- ignore-errors
- risky-file-permissions
- empty-string-compare
- risky-shell-pipe
- yaml
- meta-no-info
- var-naming
- literal-compare
- package-latest

skip_list:
- fqcn-builtins
33 changes: 33 additions & 0 deletions .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: ansible-lint

on:
push:
branches:
- development
pull_request:
branches:
- development
- master

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ansible ansible-lint
- name: Analysing all playbooks
run: |
ansible-lint install/*.yml -x 303,701,601,206,602,403,301,502,306 -v
- name: Analysing all playbook roles
run: |
ansible-lint install/roles/*/*/*.yml -x 303,701,601,206,602,403,301,502,306 -v
3 changes: 2 additions & 1 deletion install/roles/curator/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@

# Runs cron job to cleanup indices every weekday.
# you should adjust this to your needs
- cron:
- name: Curator Cleanup Cronjob
cron:
name: Curator run
weekday: '*'
minute: 0
Expand Down
2 changes: 1 addition & 1 deletion install/roles/packetbeat/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
dependencies:
- { role: elk_client }
- { role: elk_client }
2 changes: 2 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
galaxy_info:
author: Will Foster (@sadsfae)
role_name: ansible_elk
namespace: sadsfae
description: Playbook for setting up an ELK/EFK stack and clients.
travis_status_url: https://travis-ci.org/sadsfae/ansible-elk.svg?branch=master
issue_tracker_url: https://github.com/sadsfae/ansible-elk/issues
Expand Down
1 change: 1 addition & 0 deletions tests/test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
##
## pip install --requirement=test-requirements.txt
##
ansible
ansible-lint

0 comments on commit 05ea627

Please sign in to comment.