Skip to content

Commit

Permalink
Updated Ansible files
Browse files Browse the repository at this point in the history
  • Loading branch information
buluma committed Nov 5, 2023
1 parent 72eed45 commit 2599b05
Show file tree
Hide file tree
Showing 19 changed files with 117 additions and 183 deletions.
23 changes: 15 additions & 8 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@
# Ansible managed
#
exclude_paths:
- ./molecule/default/prepare.yml
- ./molecule/default/converge.yml
- ./molecule/default/verify.yml
- ./molecule/default/collections.yml
- ./.tox
- ./.cache
- ./.github
- ./requirements.yml
- meta/preferences.yml
- molecule/default/prepare.yml
- molecule/default/converge.yml
- molecule/default/verify.yml
- molecule/default/collections.yml
- .tox
- .cache
- .github
- requirements.yml

skip_list:
- yaml[truthy]

enable_list:
- name[prefix]
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
github: buluma
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ Show at least the error, possible related output, maybe just all the output.
- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`)
- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`)
- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`)

Please consider [sponsoring me](https://github.com/sponsors/buluma).
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ Why is this feature required?
## Additional context

Add any other context about the feature request here.

Please consider [sponsoring me](https://github.com/sponsors/buluma).
2 changes: 1 addition & 1 deletion .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
repository:
description: Install and configure keepalived
homepage: https://buluma.github.io/
topics: keepalived, ansible, molecule, tox, playbook, hacktoberfest
topics: keepalived, ansible, molecule, tox, playbook
4 changes: 2 additions & 2 deletions .github/workflows/galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: galaxy
uses: buluma/[email protected]
# uses: buluma/[email protected] # TODO: rebuild action
uses: robertdebock/[email protected]
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}
git_branch: master
31 changes: 14 additions & 17 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
name: Ansible Molecule

on:
# Schedule updates (once weekly)
schedule:
- cron: '21 11/5 * * 3,4'
workflow_dispatch:
push:
branches:
- master
Expand All @@ -18,6 +14,11 @@ on:
paths-ignore:
- '**/README.md'
- '**/CHANGELOG.md'
tags_ignore:
- '*'
pull_request:
schedule:
- cron: '21 11 11 * *'

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
Expand All @@ -28,13 +29,9 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v3
with:
path: "${{ github.repository }}"
- name: molecule
uses: buluma/[email protected]
with:
command: lint
uses: actions/checkout@v4
- name: ansible-lint
uses: ansible-community/ansible-lint-action@main
test:
needs:
- lint
Expand All @@ -50,11 +47,9 @@ jobs:
- image: "debian-systemd"
tag: "latest"
- image: "debian-systemd"
tag: "buster"
tag: "bullseye"
- image: "fedora-systemd"
tag: "35"
- image: "fedora-systemd"
tag: "34"
tag: "37"
- image: "fedora-systemd"
tag: "latest"
- image: "docker-opensuse-systemd"
Expand All @@ -65,17 +60,19 @@ jobs:
tag: "focal"
- image: "docker-ubuntu-systemd"
tag: "bionic"
- image: "docker-ubuntu-systemd"
tag: "lunar"
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: "${{ github.repository }}"
- name: disable apparmor for mysql
run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
- name: parse apparmor for mysql
run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
- name: molecule
uses: buluma/[email protected].1
uses: buluma/[email protected].9
with:
image: ${{ matrix.config.image }}
tag: ${{ matrix.config.tag }}
18 changes: 7 additions & 11 deletions .github/workflows/requirements2png.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,23 @@
#

on:
workflow_dispatch:
push: {branches: ["master", "main"]}


concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

push:
paths:
- '.github/workflows/requirements2png.yml'
name: Ansible Graphviz

jobs:
build:
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ${{ github.repository }}
- name: create png
uses: buluma/[email protected]
uses: buluma/[email protected] # TODO: Update action
- name: Commit files
run: |
cd ${{ github.repository }}
Expand All @@ -34,7 +31,6 @@ jobs:
- name: save to png branch
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
directory: ${{ github.repository }}
force: true
branch: png
11 changes: 3 additions & 8 deletions .github/workflows/todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,13 @@ name: "TODO 2 Issue"
on:
push:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
build:
runs-on: "ubuntu-20.04"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/checkout@master"
- name: "TODO to Issue"
uses: "buluma/[email protected]"
uses: "alstr/[email protected]" # TODO: Update buluma/[email protected] @buluma
id: "todo"
with:
USER_PROJECTS: buluma/Ansible/To do
PROJECTS_SECRET: ${{ secrets.PROJECTS_SECRET }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
.tox
.cache
.DS_Store
./molecule_tests.sh
55 changes: 10 additions & 45 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
---
image: "buluma/github-action-molecule:4.0.9"

services:
- docker:dind
image: "buluma/github-action-molecule:5.0.9"

variables:
DOCKER_HOST: "tcp://docker:2375"
PY_COLORS: 1

molecule:
stage: build
allow_failure: true
script:
- if [ -f tox.ini ] ; then tox ; fi
- if [ ! -f tox.ini ] ; then molecule test ; fi
- molecule test
rules:
- if: $CI_COMMIT_REF_NAME == "master"
retry: 1
allow_failure: true
parallel:
matrix:
- image: "alpine-openrc"
Expand All @@ -26,11 +19,9 @@ molecule:
- image: "debian-systemd"
tag: "latest"
- image: "debian-systemd"
tag: "bookworm"
- image: "fedora-systemd"
tag: "35"
tag: "bullseye"
- image: "fedora-systemd"
tag: "34"
tag: "37"
- image: "fedora-systemd"
tag: "latest"
- image: "docker-opensuse-systemd"
Expand All @@ -41,37 +32,11 @@ molecule:
tag: "focal"
- image: "docker-ubuntu-systemd"
tag: "bionic"
- image: "docker-ubuntu-systemd"
tag: "lunar"

testing:
stage: test
needs: []
galaxy:
script:
- if [ -f tox.ini ] ; then tox ; fi
- if [ ! -f tox.ini ] ; then molecule test ; fi
- ansible-galaxy role import --api-key ${GALAXY_API_KEY} buluma ${CI_PROJECT_NAME}
rules:
- if: $CI_COMMIT_REF_NAME == "testing"
retry: 1
parallel:
matrix:
- image: "alpine-openrc"
tag: "latest"
- image: "enterpriselinux"
tag: "8"
- image: "debian-systemd"
tag: "latest"
- image: "debian-systemd"
tag: "bookworm"
- image: "fedora-systemd"
tag: "35"
- image: "fedora-systemd"
tag: "34"
- image: "fedora-systemd"
tag: "latest"
- image: "docker-opensuse-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "focal"
- image: "docker-ubuntu-systemd"
tag: "bionic"
- if: $CI_COMMIT_TAG != null
5 changes: 2 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files

- repo: https://github.com/adrienverge/yamllint
rev: v1.26.3
rev: v1.32.0
hooks:
- id: yamllint
args: [-c=.yamllint]
Expand All @@ -19,7 +19,6 @@ repos:
- id: ansible_role_find_unused_variable
- id: ansible_role_find_empty_files
- id: ansible_role_find_empty_directories
- id: ansible_role_fix_readability
- id: ansible_role_find_undefined_handlers
- id: ansible_role_find_unquoted_values
- id: ansible_role_find_horizontal_when
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,5 @@ In the comment-box, you can [refer to the issue number](https://help.github.com/
Now I'll get a message that you've added some code. Thank you, really.

CI starts to test your changes. You can follow the progress on GitHub.

Please consider [sponsoring me](https://github.com/sponsors/buluma).
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Apache License
Version 2.0, 08 2022
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
Expand Down Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2022 Michael Buluma ([email protected])
Copyright 2023 Shadow Walker ([email protected])

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 2599b05

Please sign in to comment.