mirror of
https://github.com/roles-ansible/ansible_role_versioncheck.git
synced 2024-08-16 15:59:49 +02:00
Merge pull request #4 from roles-ansible/lint
update yaml linting, actions and meta info
This commit is contained in:
commit
1a1ee05ad9
24 changed files with 267 additions and 107 deletions
4
.github/FUNDING.yml
vendored
4
.github/FUNDING.yml
vendored
|
@ -1,4 +1,6 @@
|
||||||
# These are supported funding model platforms
|
---
|
||||||
|
# Feel free to add yourself if you maintain this repo
|
||||||
|
# or participate in a way that you have the feeling that you belong there ;-)
|
||||||
|
|
||||||
github: [do1jlr]
|
github: [do1jlr]
|
||||||
liberapay: L3D
|
liberapay: L3D
|
||||||
|
|
18
.github/workflows/ansible-alpine-latest.yml
vendored
Normal file
18
.github/workflows/ansible-alpine-latest.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
name: Ansible check alpine:latest
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: ansible check with alpine:latest
|
||||||
|
uses: roles-ansible/check-ansible-alpine-latest-action@master
|
||||||
|
with:
|
||||||
|
targets: "./"
|
18
.github/workflows/ansible-archlinux-latest.yml
vendored
Normal file
18
.github/workflows/ansible-archlinux-latest.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
name: Ansible check archlinux:latest
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: ansible check with archlinux:latest
|
||||||
|
uses: roles-ansible/check-ansible-archlinux-latest-action@master
|
||||||
|
with:
|
||||||
|
targets: "./"
|
2
.github/workflows/ansible-centos-centos7.yml
vendored
2
.github/workflows/ansible-centos-centos7.yml
vendored
|
@ -1,5 +1,7 @@
|
||||||
|
---
|
||||||
name: Ansible check centos:centos7
|
name: Ansible check centos:centos7
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
2
.github/workflows/ansible-centos-centos8.yml
vendored
2
.github/workflows/ansible-centos-centos8.yml
vendored
|
@ -1,5 +1,7 @@
|
||||||
|
---
|
||||||
name: Ansible check centos:centos8
|
name: Ansible check centos:centos8
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
2
.github/workflows/ansible-centos-latest.yml
vendored
2
.github/workflows/ansible-centos-latest.yml
vendored
|
@ -1,5 +1,7 @@
|
||||||
|
---
|
||||||
name: Ansible check centos:latest
|
name: Ansible check centos:latest
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
2
.github/workflows/ansible-debian-buster.yml
vendored
2
.github/workflows/ansible-debian-buster.yml
vendored
|
@ -1,5 +1,7 @@
|
||||||
|
---
|
||||||
name: Ansible check debian:buster
|
name: Ansible check debian:buster
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
18
.github/workflows/ansible-debian-latest.yml
vendored
Normal file
18
.github/workflows/ansible-debian-latest.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
name: Ansible check debian:latest
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: ansible check with debian:latest
|
||||||
|
uses: roles-ansible/check-ansible-debian-latest-action@master
|
||||||
|
with:
|
||||||
|
targets: "./"
|
2
.github/workflows/ansible-debian-sid.yml
vendored
2
.github/workflows/ansible-debian-sid.yml
vendored
|
@ -1,5 +1,7 @@
|
||||||
|
---
|
||||||
name: Ansible check debian:sid
|
name: Ansible check debian:sid
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
2
.github/workflows/ansible-debian-stable.yml
vendored
2
.github/workflows/ansible-debian-stable.yml
vendored
|
@ -1,5 +1,7 @@
|
||||||
|
---
|
||||||
name: Ansible check debian:stable
|
name: Ansible check debian:stable
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
2
.github/workflows/ansible-debian-stretch.yml
vendored
2
.github/workflows/ansible-debian-stretch.yml
vendored
|
@ -1,5 +1,7 @@
|
||||||
|
---
|
||||||
name: Ansible check debian:stretch
|
name: Ansible check debian:stretch
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
18
.github/workflows/ansible-fedora-31.yml
vendored
Normal file
18
.github/workflows/ansible-fedora-31.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
name: Ansible check fedora:31
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: ansible check with fedora:31
|
||||||
|
uses: roles-ansible/check-ansible-fedora-31-action@master
|
||||||
|
with:
|
||||||
|
targets: "./"
|
18
.github/workflows/ansible-fedora-32.yml
vendored
Normal file
18
.github/workflows/ansible-fedora-32.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
name: Ansible check fedora:32
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: ansible check with fedora:32
|
||||||
|
uses: roles-ansible/check-ansible-fedora-32-action@master
|
||||||
|
with:
|
||||||
|
targets: "./"
|
18
.github/workflows/ansible-fedora-33.yml
vendored
Normal file
18
.github/workflows/ansible-fedora-33.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
name: Ansible check fedora:33
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: ansible check with fedora:33
|
||||||
|
uses: roles-ansible/check-ansible-fedora-33-action@master
|
||||||
|
with:
|
||||||
|
targets: "./"
|
18
.github/workflows/ansible-fedora-latest.yml
vendored
Normal file
18
.github/workflows/ansible-fedora-latest.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
name: Ansible check fedora:latest
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: ansible check with fedora:latest
|
||||||
|
uses: roles-ansible/check-ansible-fedora-latest-action@master
|
||||||
|
with:
|
||||||
|
targets: "./"
|
22
.github/workflows/ansible-linting-check.yml
vendored
Normal file
22
.github/workflows/ansible-linting-check.yml
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
---
|
||||||
|
name: Ansible Lint check
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Lint Ansible Playbook
|
||||||
|
uses: ansible/ansible-lint-action@master
|
||||||
|
with:
|
||||||
|
targets: "."
|
||||||
|
# [required]
|
||||||
|
# Paths to ansible files (i.e., playbooks, tasks, handlers etc..)
|
||||||
|
args: ""
|
||||||
|
# [optional]
|
20
.github/workflows/ansible-linting-chek.yml
vendored
20
.github/workflows/ansible-linting-chek.yml
vendored
|
@ -1,20 +0,0 @@
|
||||||
name: Ansible Lint check
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Lint Ansible Playbook
|
|
||||||
uses: ansible/ansible-lint-action@master
|
|
||||||
with:
|
|
||||||
targets: "."
|
|
||||||
# [required]
|
|
||||||
# Paths to ansible files (i.e., playbooks, tasks, handlers etc..)
|
|
||||||
args: ""
|
|
||||||
# [optional]
|
|
2
.github/workflows/ansible-ubuntu-bionic.yml
vendored
2
.github/workflows/ansible-ubuntu-bionic.yml
vendored
|
@ -1,5 +1,7 @@
|
||||||
|
---
|
||||||
name: Ansible check ubuntu:bionic
|
name: Ansible check ubuntu:bionic
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
2
.github/workflows/ansible-ubuntu-latest.yml
vendored
2
.github/workflows/ansible-ubuntu-latest.yml
vendored
|
@ -1,5 +1,7 @@
|
||||||
|
---
|
||||||
name: Ansible check ubuntu:latest
|
name: Ansible check ubuntu:latest
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
2
.github/workflows/ansible-ubuntu-trusty.yml
vendored
2
.github/workflows/ansible-ubuntu-trusty.yml
vendored
|
@ -1,5 +1,7 @@
|
||||||
|
---
|
||||||
name: Ansible check ubuntu:trusty
|
name: Ansible check ubuntu:trusty
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
22
.github/workflows/yamllint.yaml
vendored
Normal file
22
.github/workflows/yamllint.yaml
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
---
|
||||||
|
name: 'Yamllint GitHub Actions'
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
yamllint:
|
||||||
|
name: 'Yamllint'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout'
|
||||||
|
uses: actions/checkout@master
|
||||||
|
- name: 'Yamllint'
|
||||||
|
uses: karancode/yamllint-github-action@master
|
||||||
|
with:
|
||||||
|
yamllint_file_or_dir: '.'
|
||||||
|
yamllint_config_filepath: './.yamllint'
|
||||||
|
yamllint_strict: false
|
||||||
|
yamllint_comment: true
|
||||||
|
# env:
|
||||||
|
# GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }
|
8
.yamllint
Normal file
8
.yamllint
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
extends: default
|
||||||
|
|
||||||
|
rules:
|
||||||
|
# 150 chars should be enough, but don't fail if a line is longer
|
||||||
|
line-length:
|
||||||
|
max: 150
|
||||||
|
level: warning
|
|
@ -26,7 +26,7 @@ Example playbook:
|
||||||
---
|
---
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
- { role: do1jlr.ansible_version, tags: [default,version,default], gather_facts: no}
|
- { role: do1jlr.ansible_version, tags: [default,version,always], gather_facts: false }
|
||||||
```
|
```
|
||||||
|
|
||||||
**Without ansible galaxy:**
|
**Without ansible galaxy:**
|
||||||
|
@ -43,9 +43,11 @@ Your Playbook could look like this:
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
tags:
|
tags:
|
||||||
- default
|
- default
|
||||||
|
- version
|
||||||
|
- always
|
||||||
roles:
|
roles:
|
||||||
- ansible_version
|
- ansible_version
|
||||||
gather_facts: no
|
gather_facts: false
|
||||||
```
|
```
|
||||||
|
|
||||||
Modifications
|
Modifications
|
||||||
|
|
|
@ -10,43 +10,21 @@ galaxy_info:
|
||||||
- name: Archlinux
|
- name: Archlinux
|
||||||
versions: all
|
versions: all
|
||||||
- name: Debian
|
- name: Debian
|
||||||
versions:
|
versions: all
|
||||||
- sid
|
|
||||||
- buster
|
|
||||||
- jessie
|
|
||||||
- stretch
|
|
||||||
- name: Ubuntu
|
- name: Ubuntu
|
||||||
versions:
|
versions: all
|
||||||
- bionic
|
- name: Alpine
|
||||||
- disco
|
version: all
|
||||||
- eoan
|
|
||||||
- focal
|
|
||||||
- trusty
|
|
||||||
- xenial
|
|
||||||
# - name: Alpine
|
|
||||||
# version:
|
|
||||||
# - 3.10
|
|
||||||
# - 3.9
|
|
||||||
# - 3.8
|
|
||||||
# - name: Clearlinux
|
|
||||||
# version:
|
|
||||||
# - all
|
|
||||||
- name: EL
|
- name: EL
|
||||||
versions:
|
versions: all
|
||||||
- 8
|
- name: Fedora
|
||||||
- 7
|
versions: all
|
||||||
- 6
|
- name: Suse
|
||||||
# - name: Fedora
|
versions: all
|
||||||
# versions:
|
|
||||||
# - 31
|
|
||||||
# - 30
|
|
||||||
# - 29
|
|
||||||
# - 28
|
|
||||||
## - name: Suse
|
|
||||||
# versions:
|
|
||||||
## - 15
|
|
||||||
galaxy_tags:
|
galaxy_tags:
|
||||||
- version
|
- version
|
||||||
- playbook
|
- playbook
|
||||||
- versioncheck
|
- versioncheck
|
||||||
|
- always
|
||||||
|
- ansibleversion
|
||||||
dependencies: []
|
dependencies: []
|
||||||
|
|
Loading…
Reference in a new issue