-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
160 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
--- | ||
name: CI | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: ~ | ||
|
||
jobs: | ||
molecule: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
distro: | ||
# - image: jrei/systemd-ubuntu:16.04 | ||
# instance: systemd-ubuntu-16.04 | ||
# - image: jrei/systemd-ubuntu:18.04 | ||
# instance: systemd-ubuntu-18.04 | ||
- image: ubuntu2004 | ||
instance: docker-ubuntu2004-ansible | ||
# - image: jrei/systemd-centos:7 | ||
# instance: systemd-centos-7 | ||
# - image: jrei/systemd-centos:8 | ||
# instance: systemd-centos-8 | ||
# - image: jrei/systemd-debian:9 | ||
# instance: systemd-debian-9 | ||
# - image: jrei/systemd-debian:10 | ||
# instance: systemd-debian-10 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install molecule | ||
run: pip3 install ansible molecule molecule-docker | ||
|
||
|
||
- name: Run molecule | ||
run: molecule test | ||
env: | ||
MOLECULE_DISTRO: ${{ matrix.distro.image }} | ||
MOLECULE_INSTANCE_NAME: ${{ matrix.distro.instance }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
|
||
# .ansible-lint | ||
exclude_paths: | ||
- .cache/ | ||
- .molecule/ | ||
|
||
# Enable checking of loop variable prefixes in roles | ||
loop_var_prefix: "_elasticsearch__" | ||
|
||
use_default_rules: true | ||
|
||
skip_list: | ||
- no-handler | ||
- yaml # I will manually run yamllint | ||
|
||
# Any rule that has the 'opt-in' tag will not be loaded unless its 'id' is | ||
# mentioned in the enable_list: | ||
enable_list: | ||
- no-same-owner | ||
|
||
# Offline mode disables installation of requirements.yml | ||
offline: false | ||
|
||
# List of additional kind:pattern to be added at the top of the default | ||
# match list, first match determines the file kind. | ||
kinds: | ||
# - playbook: "**/examples/*.{yml,yaml}" | ||
# - galaxy: "**/folder/galaxy.yml" | ||
# - tasks: "**/tasks/*.yml" | ||
# - vars: "**/vars/*.yml" | ||
# - meta: "**/meta/main.yml" | ||
- yaml: "**/*.yaml-too" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,32 @@ | ||
--- | ||
role_name_check: 1 | ||
|
||
dependency: | ||
name: galaxy | ||
options: | ||
ignore-errors: true | ||
driver: | ||
name: docker | ||
lint: | | ||
set -e | ||
yamllint --config-file molecule/default/yamllint.yml . | ||
ansible-lint -c molecule/default/ansible-lint.yml . | ||
flake8 | ||
platforms: | ||
- name: instance | ||
- name: "${MOLECULE_INSTANCE_NAME:-docker-ubuntu2004-ansible}" | ||
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest" | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
cgroupns_mode: host | ||
published_ports: | ||
- '9200:9200/tcp' | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
privileged: true | ||
pre_build_image: true | ||
provisioner: | ||
name: ansible | ||
options: | ||
vvv: true | ||
env: | ||
IN_MOLECULE: 'true' | ||
scenario: | ||
name: default | ||
verifier: | ||
name: ansible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
|
||
rules: | ||
braces: | ||
min-spaces-inside: 1 | ||
max-spaces-inside: 1 | ||
min-spaces-inside-empty: 0 | ||
max-spaces-inside-empty: 0 | ||
brackets: | ||
min-spaces-inside: 0 | ||
max-spaces-inside: 0 | ||
min-spaces-inside-empty: 0 | ||
max-spaces-inside-empty: 0 | ||
colons: | ||
max-spaces-before: 0 | ||
max-spaces-after: 1 | ||
commas: | ||
max-spaces-before: 0 | ||
min-spaces-after: 1 | ||
max-spaces-after: 1 | ||
comments: | ||
require-starting-space: true | ||
min-spaces-from-content: 2 | ||
comments-indentation: enable | ||
document-end: disable | ||
document-start: | ||
present: true | ||
empty-lines: | ||
max: 2 | ||
max-start: 0 | ||
max-end: 1 | ||
empty-values: | ||
forbid-in-block-mappings: true | ||
forbid-in-flow-mappings: true | ||
hyphens: | ||
max-spaces-after: 1 | ||
indentation: | ||
spaces: 2 | ||
indent-sequences: true | ||
check-multi-line-strings: false | ||
key-duplicates: enable | ||
key-ordering: disable | ||
line-length: | ||
max: 8000 | ||
allow-non-breakable-words: true | ||
allow-non-breakable-inline-mappings: false | ||
new-line-at-end-of-file: enable | ||
new-lines: | ||
type: unix | ||
octal-values: | ||
forbid-implicit-octal: true | ||
forbid-explicit-octal: false | ||
trailing-spaces: enable | ||
truthy: | ||
level: warning |