Skip to content

Commit

Permalink
Generated Ansible files
Browse files Browse the repository at this point in the history
  • Loading branch information
buluma committed Nov 5, 2023
1 parent b56a4dd commit 492aea3
Show file tree
Hide file tree
Showing 18 changed files with 125 additions and 204 deletions.
25 changes: 14 additions & 11 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
# Ansible managed
#
exclude_paths:
- ./meta/exception.yml
- ./meta/preferences.yml
- ./molecule/default/prepare.yml
- ./molecule/default/converge.yml
- ./molecule/default/verify.yml
- ./molecule/default/collections.yml
- ./.tox
- ./.cache
- 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: # TODO: Check why this is failing
- no-changed-when
- fqcn-builtins
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 ara api on your system.
homepage: https://buluma.github.io/
topics: ansible, records, ara, reports, cloud, development, monitoring, reporting, ansible, molecule, tox, playbook, hacktoberfest
topics: ansible, records, ara, reports, cloud, development, monitoring, reporting, 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
38 changes: 21 additions & 17 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@
name: Ansible Molecule

on:
# Schedule updates (once daily)
push:
branches:
- master
- main
- testing
paths-ignore:
- '**/README.md'
- '**/CHANGELOG.md'
tags_ignore:
- '*'
pull_request:
schedule:
- cron: '1 1 * * *'
workflow_dispatch:
push: {branches: ["master", "main"]}
- cron: '1 1 1 * *'

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
Expand All @@ -21,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 @@ -38,31 +42,31 @@ jobs:
config:
- image: "enterpriselinux"
tag: "7"
- image: "enterpriselinux"
tag: "8"
- image: "enterpriselinux"
tag: "latest"
- image: "debian-systemd"
tag: "latest"
- image: "debian-systemd"
tag: "bookworm"
- image: "fedora-systemd"
tag: "34"
tag: "bullseye"
- image: "fedora-systemd"
tag: "35"
tag: "37"
- image: "fedora-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "bionic"
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/molecule-action@v4.0.7
uses: buluma/molecule-action@v5.0.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 }}
94 changes: 10 additions & 84 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,110 +1,36 @@
---
image: "buluma/github-action-molecule:4.0.7"

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:
- image=${image} tag=${tag} molecule test
retry: 1
parallel:
matrix:
- image: "enterpriselinux"
tag: "7"
- image: "enterpriselinux"
tag: "latest"
- image: "debian-systemd"
tag: "latest"
- image: "debian-systemd"
tag: "bookworm"
- image: "fedora-systemd"
tag: "34"
- image: "fedora-systemd"
tag: "35"
- image: "fedora-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "bionic"

testing:
stage: test
needs: []
script:
- image=${image} tag=${tag} molecule test
- molecule test
rules:
- if: $CI_COMMIT_REF_NAME == "testing"
retry: 1
- if: $CI_COMMIT_REF_NAME == "master"
allow_failure: true
parallel:
matrix:
- image: "enterpriselinux"
tag: "7"
- image: "enterpriselinux"
tag: "8"
- image: "enterpriselinux"
tag: "latest"
- image: "debian-systemd"
tag: "latest"
- image: "debian-systemd"
tag: "bookworm"
tag: "bullseye"
- image: "fedora-systemd"
tag: "34"
- image: "fedora-systemd"
tag: "35"
tag: "37"
- image: "fedora-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "bionic"

galaxy:
stage: deploy
needs: []
script:
- ansible-galaxy role info buluma.ara_api

role_testing:
stage: test
needs: []
script:
- image=${image} tag=${tag} ansible-galaxy install buluma.ara_api
retry: 1
parallel:
matrix:
- image: "enterpriselinux"
tag: "7"
- image: "enterpriselinux"
tag: "latest"
- image: "debian-systemd"
tag: "latest"
- image: "debian-systemd"
tag: "bookworm"
- image: "fedora-systemd"
tag: "34"
- image: "fedora-systemd"
tag: "35"
- image: "fedora-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "bionic"

release_job:
stage: .post
needs: [molecule]
image: registry.gitlab.com/gitlab-org/release-cli:latest
- ansible-galaxy role import --api-key ${GALAXY_API_KEY} buluma ${CI_PROJECT_NAME}
rules:
- if: $CI_COMMIT_TAG
script:
- echo "Running the release job."
release:
tag_name: $CI_COMMIT_TAG
name: 'Release $CI_COMMIT_TAG'
description: 'Release created using the release-cli.'
artifacts:
name: "$CI_JOB_STAGE-$CI_COMMIT_REF_NAME"
paths:
- /
expire_in: 1 day
- if: $CI_COMMIT_TAG != null
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.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]

- repo: https://github.com/buluma/pre-commit
rev: v1.0.2
rev: v1.0.3
hooks:
- 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, 05 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 492aea3

Please sign in to comment.