mirror of
https://github.com/roles-ansible/ansible_role_ntp.git
synced 2024-08-16 12:59:49 +02:00
add testing and improve linting
This commit is contained in:
parent
3974bd6500
commit
4b21d0945e
34 changed files with 409 additions and 7 deletions
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [do1jlr]
|
||||
liberapay: L3D
|
||||
custom: https://paypal.me/c3woc
|
||||
|
|
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: "./"
|
18
.github/workflows/ansible-centos-centos7.yml
vendored
Normal file
18
.github/workflows/ansible-centos-centos7.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
name: Ansible check centos:centos7
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with ubuntu:centos7
|
||||
uses: roles-ansible/check-ansible-centos-centos7-action@master
|
||||
with:
|
||||
targets: "./"
|
18
.github/workflows/ansible-centos-centos8.yml
vendored
Normal file
18
.github/workflows/ansible-centos-centos8.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
name: Ansible check centos:centos8
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with ubuntu:centos8
|
||||
uses: roles-ansible/check-ansible-centos-centos8-action@master
|
||||
with:
|
||||
targets: "./"
|
18
.github/workflows/ansible-centos-latest.yml
vendored
Normal file
18
.github/workflows/ansible-centos-latest.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
name: Ansible check centos: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 ubuntu:latest
|
||||
uses: roles-ansible/check-ansible-centos-latest-action@master
|
||||
with:
|
||||
targets: "./"
|
18
.github/workflows/ansible-debian-buster.yml
vendored
Normal file
18
.github/workflows/ansible-debian-buster.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
name: Ansible check debian:buster
|
||||
|
||||
# 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:buster
|
||||
uses: roles-ansible/check-ansible-debian-buster-action@master
|
||||
with:
|
||||
targets: "./"
|
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: "./"
|
18
.github/workflows/ansible-debian-sid.yml
vendored
Normal file
18
.github/workflows/ansible-debian-sid.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
name: Ansible check debian:sid
|
||||
|
||||
# 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:sid
|
||||
uses: roles-ansible/check-ansible-debian-sid-action@master
|
||||
with:
|
||||
targets: "./"
|
24
.github/workflows/ansible-debian-stable.yml
vendored
Normal file
24
.github/workflows/ansible-debian-stable.yml
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
name: Ansible check debian:stable
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
push:
|
||||
branches: '*'
|
||||
pull_request:
|
||||
branches: '*'
|
||||
schedule:
|
||||
- cron: '23 6 * */1 *'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with debian:stable
|
||||
uses: roles-ansible/check-ansible-debian-stable-action@master
|
||||
with:
|
||||
targets: "./"
|
18
.github/workflows/ansible-debian-stretch.yml
vendored
Normal file
18
.github/workflows/ansible-debian-stretch.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
name: Ansible check debian:stretch
|
||||
|
||||
# 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:stretch
|
||||
uses: roles-ansible/check-ansible-debian-stretch-action@master
|
||||
with:
|
||||
targets: "./"
|
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: "./"
|
28
.github/workflows/ansible-linting-check.yml
vendored
Normal file
28
.github/workflows/ansible-linting-check.yml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
name: Ansible Lint check
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
push:
|
||||
branches: '*'
|
||||
pull_request:
|
||||
branches: '*'
|
||||
schedule:
|
||||
- cron: '42 6 * */1 *'
|
||||
|
||||
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]
|
18
.github/workflows/ansible-ubuntu-bionic.yml
vendored
Normal file
18
.github/workflows/ansible-ubuntu-bionic.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
name: Ansible check ubuntu:bionic
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with ubuntu:bionic
|
||||
uses: roles-ansible/check-ansible-ubuntu-bionic-action@master
|
||||
with:
|
||||
targets: "./"
|
18
.github/workflows/ansible-ubuntu-latest.yml
vendored
Normal file
18
.github/workflows/ansible-ubuntu-latest.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
name: Ansible check ubuntu: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 ubuntu:latest
|
||||
uses: roles-ansible/check-ansible-ubuntu-latest-action@master
|
||||
with:
|
||||
targets: "./"
|
18
.github/workflows/ansible-ubuntu-trusty.yml
vendored
Normal file
18
.github/workflows/ansible-ubuntu-trusty.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
name: Ansible check ubuntu:trusty
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with ubuntu:trusty
|
||||
uses: roles-ansible/check-ansible-ubuntu-trusty-action@master
|
||||
with:
|
||||
targets: "./"
|
20
.github/workflows/galaxy.yml
vendored
Normal file
20
.github/workflows/galaxy.yml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
name: Galaxy release
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
push:
|
||||
branches: ['main']
|
||||
release:
|
||||
types: ['created']
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: galaxy
|
||||
uses: robertdebock/galaxy-action@1.1.0
|
||||
with:
|
||||
galaxy_api_key: ${{ secrets.galaxy_api_key }}
|
24
.github/workflows/yamllint.yaml
vendored
Normal file
24
.github/workflows/yamllint.yaml
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
name: 'Yamllint GitHub Actions'
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
push:
|
||||
branches: '*'
|
||||
pull_request:
|
||||
branches: '*'
|
||||
schedule:
|
||||
- cron: '23 6 * */1 *'
|
||||
|
||||
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'
|
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
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
galaxy_info:
|
||||
role_name: ntp
|
||||
author: do1jlr
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
# Tasks file for install ntp daemon on FreeBSD system
|
||||
|
||||
- name: Install ntp daemon on FreeBSD
|
||||
become: yes
|
||||
package:
|
||||
become: true
|
||||
ansible.builtin.package:
|
||||
name: "{{ ntp_package }}"
|
||||
state: present
|
||||
|
||||
- name: Service ntp on FreeBSD
|
||||
become: yes
|
||||
service:
|
||||
become: true
|
||||
ansible.builtin.service:
|
||||
name: "{{ ntp_service }}"
|
||||
enabled: yes
|
||||
enabled: true
|
||||
state: started
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
ntp_package: ntp
|
||||
ntp_service: ntpd
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
ntp_package:
|
||||
ntp_service: ntp
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
ntp_package: ntp
|
||||
ntp_service: ntp
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
ntp_package: ntp
|
||||
ntp_service: ntpd
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
ntp_package: net-misc/ntp
|
||||
ntp_service: ntp-client
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
ntp_package: ntp
|
||||
ntp_service: ntpd
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
ntp_package: ntp
|
||||
ntp_service: ntpd
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
ntp_package: ntp
|
||||
ntp_service: ntpd
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
ntp_package: ntp
|
||||
ntp_service: ntp
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
playbook_version_number: 2050 # should be int
|
||||
playbook_version_number: 2051 # should be int
|
||||
playbook_version_path: 'role-ntp_chaos-bodensee_github.com.version'
|
||||
|
||||
ntp__vars:
|
||||
|
|
Loading…
Reference in a new issue