Skip to content

Commit

Permalink
init local
Browse files Browse the repository at this point in the history
  • Loading branch information
buluma committed Feb 1, 2022
1 parent 00b2ac6 commit 7b8ef8f
Show file tree
Hide file tree
Showing 31 changed files with 913 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
#
# Ansible managed
#
exclude_paths:
- ./molecule/default/prepare.yml
- ./molecule/default/converge.yml
- ./molecule/default/verify.yml
- ./molecule/default/collections.yml
- ./.tox
- ./.cache
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug report
about: Create a report to help me improve

---

## Describe the bug

A clear and concise description of what the bug is.

## Playbook

Please paste the playbook you are using. (Consider `requirements.yml` and
optionally the command you've invoked.)


```yaml
---
YOUR PLAYBOOK HERE
```

## Output

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

## Environment

- 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`)
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

## Proposed feature

A clear and concise description of what you want to happen.

## Rationale

Why is this feature required?

## Additional context

Add any other context about the feature request here.
8 changes: 8 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
#
# Ansible managed
#
repository:
description: Configure mounts
homepage: https://buluma.co.ke/
topics: mount, ansible, molecule, tox, playbook, hacktoberfest
18 changes: 18 additions & 0 deletions .github/workflows/galaxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
#
# Ansible managed
#

name: Release to Ansible Galaxy

on:
release:
types: [created, edited, published, released]
jobs:
release:
runs-on: ubuntu-20.04
steps:
- name: galaxy
uses: buluma/[email protected]
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}
69 changes: 69 additions & 0 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
#
# Ansible managed
#

name: Ansible Molecule

on:
push:
tags_ignore:
- '*'
pull_request:
schedule:
- cron: '25 13 13 * *'

jobs:
lint:
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
with:
path: "${{ github.repository }}"
- name: molecule
uses: buluma/[email protected]
with:
command: lint
test:
needs:
- lint
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
config:
- image: "alpine"
tag: "latest"
- image: "debian"
tag: "latest"
- image: "debian"
tag: "bookworm"
- image: "enterpriselinux"
tag: "latest"
- image: "fedora"
tag: "34"
- image: "fedora"
tag: "latest"
- image: "fedora"
tag: "rawhide"
- image: "opensuse"
tag: "latest"
- image: "ubuntu"
tag: "latest"
- image: "ubuntu"
tag: "bionic"
steps:
- name: checkout
uses: actions/checkout@v2
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]
with:
image: ${{ matrix.config.image }}
tag: ${{ matrix.config.tag }}
34 changes: 34 additions & 0 deletions .github/workflows/requirements2png.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
#
# Ansible managed
#

on:
- push

name: Ansible Graphviz

jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
with:
path: ${{ github.repository }}
- name: create png
uses: buluma/[email protected]
- name: Commit files
run: |
cd ${{ github.repository }}
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add requirements.dot requirements.png
git commit -m "Add generated files"
- 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
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
#
# Ansible managed
#

name: "Test Role"

on:
pull_request:
push:
paths:
- '.github/workflows/test.yaml'
schedule:
- cron: '1 2 * * *'
workflow_dispatch:

jobs:
# Test the image builds and works correctly.
test:
name: Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Test Role install.
run: ansible-galaxy install buluma.mount

- name: Get Role ID.
run: ansible-galaxy info buluma.mount
20 changes: 20 additions & 0 deletions .github/workflows/todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
#
# Ansible managed
#

name: "TODO 2 Issue"

on:
push:

jobs:
build:
runs-on: "ubuntu-20.04"
steps:
- uses: "actions/checkout@master"
- name: "TODO to Issue"
uses: "alstr/[email protected]"
id: "todo"
with:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.molecule
*.log
*.swp
.tox
.cache
.DS_Store
24 changes: 24 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
image: "buluma/github-action-molecule:4.0.5"

services:
- docker:dind

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

molecule:
script:
- image=${image} tag=${tag} molecule test
rules:
- if: $CI_COMMIT_REF_NAME == "main"
retry: 1
parallel:
matrix:
- image: "amazonlinux"
tag: "latest"

galaxy:
script:
- ansible-galaxy role info ${CI_PROJECT_NAMESPACE}.mount
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files

- repo: https://github.com/adrienverge/yamllint
rev: v1.26.3
hooks:
- id: yamllint
args: [-c=.yamllint]

- repo: https://github.com/buluma/pre-commit
rev: v1.0.0
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
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
#
# Ansible managed
#
language: python

os: linux
dist: xenial

python:
- "3.9"

services:
- docker

cache:
- pip

install:
- pip install --upgrade pip
- pip install ansible ansible-lint yamllint

script:
- yamllint .
- ansible-lint

notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
email: false
16 changes: 16 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
extends: default

rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
line-length: disable
truthy: disable

ignore: |
.tox/
.cache/
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behaviour that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behaviour by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behaviour and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviours that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
Loading

0 comments on commit 7b8ef8f

Please sign in to comment.