Skip to content

Commit

Permalink
Merge pull request #99 from mrlesmithjr/mrlesmithjr/issue98
Browse files Browse the repository at this point in the history
Publish v0.3.2 to Ansible Galaxy
  • Loading branch information
mrlesmithjr authored Nov 10, 2021
2 parents 6f466c4 + 84e3dc0 commit a9903d1
Show file tree
Hide file tree
Showing 17 changed files with 1,858 additions and 130 deletions.
3 changes: 2 additions & 1 deletion .ansible-lint
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
skip_list: []
skip_list:
- role-name
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[flake8]
exclude = venv/
exclude = .venv/
32 changes: 21 additions & 11 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Molecule Test
on: ["push", "pull_request"]
on: push
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -11,27 +11,37 @@ jobs:
molecule_distro:
- centos7
- centos8
# - debian8
- debian9
- debian10
#- fedora
- ubuntu1604
# - fedora
# - ubuntu1604
- ubuntu1804
- ubuntu2004
# - ubuntu2004
python-version: [3.8]

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python 3
uses: actions/setup-python@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: "3.x"
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip pip-tools
pip-sync requirements.txt requirements-dev.txt
ansible --version
molecule --version
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
pip install pre-commit
- name: Run pre-commit checks
run: |
SKIP=no-commit-to-branch pre-commit run --all-files
- name: Test with molecule
run: |
molecule test --scenario-name ${{ matrix.molecule_distro }}
40 changes: 40 additions & 0 deletions .github/workflows/release-galaxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Ansible Galaxy
on:
push:
branches:
- main
- master
# - "releases/**"
tags:
- "*"
# pull_request:
# branches:
# - main
# - master
# - "releases/**"

jobs:
galaxy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
pip install pre-commit
- name: Trigger a new import on Galaxy.
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
33 changes: 33 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: no-commit-to-branch
args: [--branch, develop, --branch, master, --branch, main]
- id: trailing-whitespace
- repo: https://github.com/ansible-community/ansible-lint
rev: v5.2.1
hooks:
- id: ansible-lint
- repo: https://github.com/psf/black
rev: 21.10b0
hooks:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
- repo: https://github.com/adrienverge/yamllint
rev: v1.26.3
hooks:
- id: yamllint
3 changes: 2 additions & 1 deletion .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
extends: default

ignore: |
venv/
.venv/
.cache/

rules:
braces:
Expand Down
7 changes: 4 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ mariadb_mysql_settings:

# Define TLS certs & keys which will be used to encrypt mysql, WSREP, SST connections
# This variable should have defined exactly three items, any other item count is handled like none.
# Items must be named ca_cert, server_key, server_cert. Each item must have defined values name and content.
# Names will be used to create such file at target system. Content can be defined inline like example below,
# Items must be named ca_cert, server_key, server_cert. Each item must have defined values name and content.
# Names will be used to create such file at target system. Content can be defined inline like example below,
# or can by linked to variables defined in ansible-vault or other lookup plugins (file, hashicorp vault, etc.)
#
# mariadb_tls_files:
Expand Down Expand Up @@ -114,7 +114,8 @@ galera_cluster_name: "vagrant-test"
galera_cluster_nodes_group: "galera-cluster-nodes"

# https://mariadb.com/kb/en/mariadb/wsrep_provider_options/
galera_extra_wsrep_provider_options: []
galera_extra_wsrep_provider_options:
[]
# evs.auto_evict: 1
# evs.delayed_margin: 'PT5S'
# evs.delayed_keep_period: 'PT45S'
Expand Down
2 changes: 2 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
galaxy_info:
author: Larry Smith Jr.
description: An ansible role to install/configure a [MariaDB-Galera Cluster](https://mariadb.com/kb/en/mariadb/what-is-mariadb-galera-cluster/)
role_name: mariadb_galera_cluster
namespace: mrlesmithjr

license: MIT

Expand Down
Loading

0 comments on commit a9903d1

Please sign in to comment.