Skip to content

Commit

Permalink
Happy Newmanium 2024/Update Role.
Browse files Browse the repository at this point in the history
  • Loading branch information
buluma committed Jan 2, 2024
1 parent 20bb46e commit 1606ae4
Show file tree
Hide file tree
Showing 13 changed files with 108 additions and 59 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug report
about: Create a report to help me improve
about: Create a report to help me improve this role.

---

Expand All @@ -20,7 +20,7 @@ YOUR PLAYBOOK HERE

## Output

Show at least the error, possible related output, maybe just all the output.
Show at least the error, possible related output, if possible all the output.

## Environment

Expand Down
11 changes: 6 additions & 5 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
name-template: 'v$NEXT_MINOR_VERSION'
tag-template: 'v$NEXT_MINOR_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
- 'dependencies'
- title: '🐛 Role Fixes'
labels:
- 'fix'
- 'bugfix'
Expand All @@ -25,8 +26,8 @@ version-resolver:
patch:
labels:
- 'patch'
default: patch
default: minor
template: |
## Rifle, Rifle, Rifle!
## What’s Changed
$CHANGES
35 changes: 35 additions & 0 deletions .github/workflows/depandabot_merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
#
# Ansible managed
#

name: "Dependabot Merge"

on:
pull_request:
pull_request_target:

permissions:
contents: write
pull-requests: write

jobs:
build:
runs-on: "ubuntu-20.04"
steps:
- uses: "actions/checkout@master"
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Merge Dependabot PR"
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
uses: robertdebock/galaxy-action@1.2.1
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}
git_branch: main
git_branch: ${{ github.event.repository.default_branch }}
14 changes: 6 additions & 8 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ jobs:
- image: "debian-systemd"
tag: "bullseye"
- image: "fedora-systemd"
tag: "37"
tag: "38"
- image: "fedora-systemd"
tag: "latest"
- image: "fedora-systemd"
tag: "rawhide"
- image: "docker-opensuse-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
Expand All @@ -68,16 +70,12 @@ jobs:
- image: "kali"
tag: "latest"
steps:
- name: checkout
- name: Checkout Role
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@v5.1.1
- name: Running Molecule Test
uses: buluma/molecule-action@v6.0.0
with:
image: ${{ matrix.config.image }}
tag: ${{ matrix.config.tag }}
31 changes: 20 additions & 11 deletions .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
# branches to consider in the event; optional, defaults to default
branches:
- master
- main
- testing
paths-ignore:
Expand All @@ -19,43 +20,51 @@ on:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]

permissions:
contents: write

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

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest
steps:

# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
with:
config-name: release-drafter.yml
disable-autolabeler: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
changelog_draft:
runs-on: ubuntu-latest

steps:
- name: Checkout dj-wasabi-release repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: dj-wasabi/dj-wasabi-release
path: dj-wasabi-release

- name: Checkout current repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: main

path: ${{ github.event.repository.default_branch }}
- name: Commit Changelog file
run: |
# We are cloned in the 'main' directory and the dj-wasabi-release
# repository is the 'dj-wasabi-release' next to 'main'
cd main
# We are cloned in the 'default' directory and the dj-wasabi-release
# repository is the 'dj-wasabi-release' next to 'default'
cd ${{ github.event.repository.default_branch }}
# Generate CHANGELOG.md file
../dj-wasabi-release/release.sh -d
# Let commit the changes if there are any? (Well there should be!)
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/requirements2png.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
# Ansible managed
#

name: Ansible Graphviz
on:
push:
branches:
- master
- main
paths:
- '.github/workflows/requirements2png.yml'
name: Ansible Graphviz
tags_ignore:
- '*'

jobs:
build:
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,22 @@ name: "TODO 2 Issue"

on:
push:
branches:
- master
- main
paths-ignore:
- '**/README.md'
- '**/CHANGELOG.md'
tags_ignore:
- '*'

jobs:
build:
runs-on: "ubuntu-20.04"
steps:
- uses: "actions/checkout@master"
- uses: "actions/checkout@v4"
- name: "TODO to Issue"
uses: "alstr/todo-to-issue-action@v2.3" # TODO: Update buluma/todo-to-issue-action@v1.0.1 @buluma
uses: "buluma/todo-to-issue-action@v2.0.2"
id: "todo"
with:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 6 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Here is how you can help, a lot of steps are related to GitHub, not specifically

When you spot an issue, [create an issue](https://github.com/buluma/ansible-role-openssh/issues).

Making the issue help me and others to find similar problems in the future.
Raising the issue helps me and others to find similar problems and solutions in the future.

### [2. Fork the project.](#2-fork-the-project)

Expand All @@ -29,7 +29,7 @@ In you own GitHub namespace, make the required changes.

I typically do that by cloning the repository (in your namespace) locally:

```
```shell
git clone git@github.com:YOURNAMESPACE/ansible-role-openssh.git
```

Expand All @@ -39,19 +39,19 @@ Now you can start to edit on your laptop.

Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/):

```
```shell
pip install molecule tox ansible-lint docker
```

And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`:

```
```shell
image=centos tag=7 molecule test
```

Once it start to work, you can test multiple version of Ansible:

```
```shell
image=centos tag=7 tox
```

Expand All @@ -71,6 +71,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.
CI starts to test your changes once pull request is reviewed. You can follow the progress on GitHub.

Please consider [sponsoring me](https://github.com/sponsors/buluma).
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2023 Shadow Walker (bulumaknight@gmail.com)
Copyright 2024 Shadow Walker (bulumaknight@gmail.com)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
23 changes: 9 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# [Ansible role openssh](#openssh)
# Ansible role [openssh](https://galaxy.ansible.com/ui/standalone/roles/buluma/openssh/documentation)

Install and configure openssh on your system.

|GitHub|GitLab|Downloads|Version|Issues|Pull Requests|
|------|------|-------|-------|------|-------------|
|[![github](https://github.com/buluma/ansible-role-openssh/actions/workflows/molecule.yml/badge.svg)](https://github.com/buluma/ansible-role-openssh/actions/workflows/molecule.yml)|[![gitlab](https://gitlab.com/shadowwalker/ansible-role-openssh/badges/master/pipeline.svg)](https://gitlab.com/shadowwalker/ansible-role-openssh)|[![downloads](https://img.shields.io/ansible/role/d/4787)](https://galaxy.ansible.com/buluma/openssh)|[![Version](https://img.shields.io/github/release/buluma/ansible-role-openssh.svg)](https://github.com/buluma/ansible-role-openssh/releases/)|[![Issues](https://img.shields.io/github/issues/buluma/ansible-role-openssh.svg)](https://github.com/buluma/ansible-role-openssh/issues/)|[![PullRequests](https://img.shields.io/github/issues-pr-closed-raw/buluma/ansible-role-openssh.svg)](https://github.com/buluma/ansible-role-openssh/pulls/)|
|GitHub|Version|Issues|Pull Requests|Downloads|
|------|-------|------|-------------|---------|
|[![github](https://github.com/buluma/ansible-role-openssh/actions/workflows/molecule.yml/badge.svg)](https://github.com/buluma/ansible-role-openssh/actions/workflows/molecule.yml)|[![Version](https://img.shields.io/github/release/buluma/ansible-role-openssh.svg)](https://github.com/buluma/ansible-role-openssh/releases/)|[![Issues](https://img.shields.io/github/issues/buluma/ansible-role-openssh.svg)](https://github.com/buluma/ansible-role-openssh/issues/)|[![PullRequests](https://img.shields.io/github/issues-pr-closed-raw/buluma/ansible-role-openssh.svg)](https://github.com/buluma/ansible-role-openssh/pulls/)|[![Ansible Role](https://img.shields.io/ansible/role/d/buluma/openssh)](https://galaxy.ansible.com/ui/standalone/roles/buluma/openssh/documentation)|

## [Example Playbook](#example-playbook)

Expand Down Expand Up @@ -164,10 +164,10 @@ openssh_trusted_user_ca_keys: none

The following roles are used to prepare a system. You can prepare your system in another way.

| Requirement | GitHub | GitLab |
| Requirement | GitHub | Version |
|-------------|--------|--------|
|[buluma.bootstrap](https://galaxy.ansible.com/buluma/bootstrap)|[![Build Status GitHub](https://github.com/buluma/ansible-role-bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/buluma/ansible-role-bootstrap/actions)|[![Build Status GitLab](https://gitlab.com/shadowwalker/ansible-role-bootstrap/badges/master/pipeline.svg)](https://gitlab.com/shadowwalker/ansible-role-bootstrap)|
|[buluma.selinux](https://galaxy.ansible.com/buluma/selinux)|[![Build Status GitHub](https://github.com/buluma/ansible-role-selinux/workflows/Ansible%20Molecule/badge.svg)](https://github.com/buluma/ansible-role-selinux/actions)|[![Build Status GitLab](https://gitlab.com/shadowwalker/ansible-role-selinux/badges/master/pipeline.svg)](https://gitlab.com/shadowwalker/ansible-role-selinux)|
|[buluma.bootstrap](https://galaxy.ansible.com/buluma/bootstrap)|[![Ansible Molecule](https://github.com/buluma/ansible-role-bootstrap/actions/workflows/molecule.yml/badge.svg)](https://github.com/buluma/ansible-role-bootstrap/actions/workflows/molecule.yml)|[![Version](https://img.shields.io/github/release/buluma/ansible-role-bootstrap.svg)](https://github.com/shadowwalker/ansible-role-bootstrap)|
|[buluma.selinux](https://galaxy.ansible.com/buluma/selinux)|[![Ansible Molecule](https://github.com/buluma/ansible-role-selinux/actions/workflows/molecule.yml/badge.svg)](https://github.com/buluma/ansible-role-selinux/actions/workflows/molecule.yml)|[![Version](https://img.shields.io/github/release/buluma/ansible-role-selinux.svg)](https://github.com/shadowwalker/ansible-role-selinux)|

## [Context](#context)

Expand Down Expand Up @@ -206,14 +206,9 @@ If you find issues, please register them in [GitHub](https://github.com/buluma/a

## [License](#license)

[Apache-2.0](https://github.com/buluma/ansible-role-openssh/blob/master/LICENSE).
[Apache-2.0](https://github.com/buluma/ansible-role-openssh/blob/master/LICENSE)

## [Author Information](#author-information)

[buluma](https://buluma.github.io/)
[Shadow Walker](https://buluma.github.io/)

Please consider [sponsoring me](https://github.com/sponsors/buluma).

### [Special Thanks](#special-thanks)

Template inspired by [Robert de Bock](https://github.com/robertdebock)
5 changes: 2 additions & 3 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ These version of [ansible](https://pypi.org/project/ansible/) are supported:

| Version | Supported |
| ------- | ------------------ |
| 9 | :white_check_mark: |
| 8 | :white_check_mark: |
| 7 | :white_check_mark: |
| 6 | :white_check_mark: |
| 5 | :white_check_mark: |

## [Reporting a Vulnerability](#reporting-a-vulnarability)

Expand All @@ -20,4 +20,3 @@ Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc.

Please consider [sponsoring me](https://github.com/sponsors/buluma).
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
#
[tox]
minversion = 4.2.4
# Ansible 6 and 7 are disabled, causing issues with Fedora:
# Ansible 7 is disabled, causing issues with Fedora:
# https://github.com/ansible/ansible/issues/81199#event-9773321055
# envlist = py3-ansible{6,7,8}
envlist = py3-ansible{8}
# envlist = py3-ansible{7,8,9}
envlist = py3-ansible{8,9}

skipsdist = true

[testenv]
deps =
-rrequirements.txt
ansible6: ansible == 6.*
ansible7: ansible == 7.*
ansible8: ansible == 8.*
ansible9: ansible == 9.*
commands = molecule test
setenv =
TOX_ENVNAME={envname}
Expand Down

0 comments on commit 1606ae4

Please sign in to comment.