Skip to content

Commit

Permalink
importing role template from https://github.com/coopdevs/ansible-role…
Browse files Browse the repository at this point in the history
  • Loading branch information
ampledata committed Dec 13, 2024
1 parent 30b0f78 commit 7a156d8
Show file tree
Hide file tree
Showing 21 changed files with 962 additions and 212 deletions.
4 changes: 4 additions & 0 deletions .config/ansible-lint-ignore.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.github/workflows/ansible_lint.yml yaml[truthy]
.github/workflows/dependency-review.yml yaml[line-length]
.github/workflows/dependency-review.yml yaml[truthy]
.github/workflows/main.yml yaml[truthy]
2 changes: 2 additions & 0 deletions .config/ansible-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
warn_list: # or 'skip_list' to silence them completely
- no-changed-when # Commands should not change things if nothing needs do
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: konykon, oyale

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behaviour. Tell us about:
- Python version
- Use of virtual environments
- Any other information of interest.

**Logs**
```bash
Properly redacted if needed, please paste here the output of the execution.
```
**Environment (please complete the following information):**
- OS: [e.g. Arch]
- Shell [e.g. bash, zshi]
**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE]"
labels: enhancement
assignees: konykon, oyale

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/workflows"
schedule:
interval: "daily"
12 changes: 12 additions & 0 deletions .github/workflows/ansible_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Ansible Lint
on: [push, pull_request]

Check warning on line 2 in .github/workflows/ansible_lint.yml

View workflow job for this annotation

GitHub Actions / build

yaml[truthy]

Truthy value should be one of \[false, true]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Run ansible-lint
uses: ansible-community/ansible-lint-action@main
20 changes: 20 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.

Check warning on line 3 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / build

yaml[line-length]

Line too long (302 > 160 characters)
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement

Check warning on line 6 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / build

yaml[line-length]

Line too long (181 > 160 characters)
name: 'Dependency Review'
on: [pull_request]

Check warning on line 8 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / build

yaml[truthy]

Truthy value should be one of \[false, true]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
15 changes: 15 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: auto-merge

on:

Check warning on line 3 in .github/workflows/main.yml

View workflow job for this annotation

GitHub Actions / build

yaml[truthy]

Truthy value should be one of \[false, true]
pull_request:

jobs:
auto-merge:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v4
- uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
target: minor
github-token: ${{ secrets.MERGE_TOKEN }}
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
repos:
- repo: https://github.com/ansible-community/ansible-lint
rev: v5.4.0
hooks:
- id: ansible-lint

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
exclude: /README\.rst$|\.pot?$

- repo: https://github.com/adrienverge/yamllint
rev: v1.26.3
hooks:
- id: yamllint
40 changes: 40 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Code of Conduct for Our Cooperative Open Source Project

## Purpose

Our open-source software project is committed to fostering a cooperative, solidary, welcoming, and collaborative environment for everyone, irrespective of their background. This Code of Conduct applies to everyone who engages with our project on any level, providing guidance to all participants to maintain a safe, positive, and mutually supportive community.

## Values

1. **Cooperation:** We believe in the power of working together. We encourage team efforts, collaborations, and the pooling of resources and knowledge. We understand that our collective intelligence surpasses individual capacities.

2. **Solidarity:** We stand together and support each other. We believe that the success of one is the success of all, and we're committed to helping each other in times of need.

## Expected Behavior

1. **Respect:** Treat all community members with kindness and respect. Remember that everyone is contributing their time and expertise to improve the project.
2. **Patience:** Demonstrate patience and understanding towards others, especially when discussing complex or controversial issues.
3. **Constructive Criticism:** Provide feedback that is constructive and helpful. This includes being open to receiving such feedback.
4. **Openness:** All trascendental technical debates should take place in the project's repository issues, ensuring everyone has the chance to contribute to the discussion.
5. **Inclusivity:** Promote an inclusive and supportive environment. Every contribution is important and should be recognized.
6. **Transparency:** *If it is not in the repository, it has not happened*, or, in other words, the single source of truth is the repository and its issues. Document everything, including, e.g, writting down discussions that have been held elsewhere.

## Unacceptable Behavior

1. **Personal Attacks:** Any form of personal attacks, trolling, or insulting/derogatory comments are not tolerated.
2. **Harassment:** This includes, but is not limited to, harassment based on race, gender, sexual orientation, disability, age, or religion.
3. **Disruptive Behavior:** Any disruptive behavior that derails technical discussions or demeans others' contributions is unacceptable.
4. **Public or Private Harassment:** Harassment in any form, either online or offline, is not allowed.
5. **Other Unethical or Unprofessional Conduct:** Any other conduct which could reasonably be considered inappropriate in a professional setting.

## Reporting and Enforcement

Violations of this Code of Conduct will result in actions aimed at facilitating conflict resolution and repairing any harm caused. These measures will be adapted according to the evolution of the situation and the process. Actions could range from mediation between involved parties to temporary or permanent restrictions from contributing. If you witness or experience any violations, please report them by sending an email to [email protected].

Our project maintainers will review and investigate all reports, and then take action that is deemed necessary and appropriate based on the progress and nature of the process. We are committed to ensuring that all our community members feel safe and respected, and we appreciate your help in maintaining this environment.

---

This Code of Conduct is a living document, and we are committed to it for the project's health and community. We will continuously review and update it as our community grows and learns.

We believe in the quality and potential of everyone who contributes to our project. Adhering to this Code of Conduct helps ensure that our community is welcoming, inclusive, cooperative, solidary, and respectful to all. We expect everyone to help make this a place where everyone feels safe and welcomed.
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Development setup

### Configure python environment

In order to assure that the files contained here are linted the same way, we are using [`pyenv`](https://github.com/pyenv/pyenv).

Follow [Installing and using pyenv](https://github.com/coopdevs/handbook/wiki/Installing-and-using-pyenv), or, in short:

```sh
pyenv install 3.8.12
pyenv virtualenv 3.8.12 role-name
```

### Configure ansible environment

You will need Ansible on your machine to run the playbooks, follow the steps below to install it.

```sh
pyenv exec pip install -r requirements.txt
ansible-galaxy install -r requirements.yml -f
```

### Install pre-commit hooks

We use [pre-commit framework](https://pre-commit.com/) to assure quality code.

```sh
pre-commit install
```
Loading

0 comments on commit 7a156d8

Please sign in to comment.