Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wiki #43

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Wiki #43

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
*.retry
/secrets.yml
/passwd
*~
.*.swp
/env
1 change: 1 addition & 0 deletions ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
inventory = inventory
error_on_missing_handler = True
interpreter_python = auto
vault_password_file = passwd

[ssh_connection]
pipelining = True
Expand Down
1 change: 1 addition & 0 deletions inventory
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
space.labitat.dk
sky.labitat.dk ansible_host=85.209.118.135
mail1.labitat.dk

[rpis]
Expand Down
10 changes: 10 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ansible==7.1.0
ansible-core==2.14.1
cffi==1.15.1
cryptography==39.0.0
Jinja2==3.1.2
MarkupSafe==2.1.1
packaging==23.0
pycparser==2.21
PyYAML==6.0
resolvelib==0.8.1
3 changes: 3 additions & 0 deletions roles/geerlingguy.mysql/.ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
skip_list:
- 'yaml'
- 'role-name'
4 changes: 4 additions & 0 deletions roles/geerlingguy.mysql/.github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms
---
github: geerlingguy
patreon: geerlingguy
57 changes: 57 additions & 0 deletions roles/geerlingguy.mysql/.github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 90

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 30

# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []

# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- bug
- pinned
- security
- planned

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false

# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false

# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false

# Label to use when marking as stale
staleLabel: stale

# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30

pulls:
markComment: |-
This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark pull requests as stale.

unmarkComment: >-
This pull request is no longer marked for closure.

closeComment: >-
This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details.

issues:
markComment: |-
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark issues as stale.

unmarkComment: >-
This issue is no longer marked for closure.

closeComment: >-
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
79 changes: 79 additions & 0 deletions roles/geerlingguy.mysql/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
name: CI
'on':
pull_request:
push:
branches:
- master
schedule:
- cron: "0 1 * * 3"

defaults:
run:
working-directory: 'geerlingguy.mysql'

jobs:

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v2
with:
path: 'geerlingguy.mysql'

- name: Set up Python 3.
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install test dependencies.
run: pip3 install yamllint

- name: Lint code.
run: |
yamllint .

molecule:
name: Molecule
runs-on: ubuntu-latest
strategy:
matrix:
distro:
- rockylinux8
- rockylinux9
- ubuntu2204
- ubuntu2004
- debian11
- debian10

steps:
- name: Check out the codebase.
uses: actions/checkout@v2
with:
path: 'geerlingguy.mysql'

- name: Set up Python 3.
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install test dependencies.
run: pip3 install ansible molecule[docker] docker

# See: https://github.com/geerlingguy/ansible-role-mysql/issues/422
- name: Disable AppArmor on Debian.
run: |
set -x
sudo apt-get install apparmor-profiles
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
if: ${{ startsWith(matrix.distro, 'debian') }}

- name: Run Molecule tests.
run: molecule test
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_DISTRO: ${{ matrix.distro }}
40 changes: 40 additions & 0 deletions roles/geerlingguy.mysql/.github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
# This workflow requires a GALAXY_API_KEY secret present in the GitHub
# repository or organization.
#
# See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy
# See: https://github.com/ansible/galaxy/issues/46

name: Release
'on':
push:
tags:
- '*'

defaults:
run:
working-directory: 'geerlingguy.mysql'

jobs:

release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v2
with:
path: 'geerlingguy.mysql'

- name: Set up Python 3.
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install Ansible.
run: pip3 install ansible-core

- 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)
4 changes: 4 additions & 0 deletions roles/geerlingguy.mysql/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.retry
*/__pycache__
*.pyc
.cache
10 changes: 10 additions & 0 deletions roles/geerlingguy.mysql/.yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
extends: default

rules:
line-length:
max: 160
level: warning

ignore: |
.github/stale.yml
20 changes: 20 additions & 0 deletions roles/geerlingguy.mysql/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2017 Jeff Geerling

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading