Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Scaffolder committed Apr 19, 2024
0 parents commit edfede2
Show file tree
Hide file tree
Showing 52 changed files with 1,331 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "ansible-dev-container-codespaces",
"image": "ghcr.io/ansible/community-ansible-dev-tools-container:latest",
"containerUser": "podman",
"runArgs": [
"--security-opt",
"seccomp=unconfined",
"--security-opt",
"label=disable",
"--cap-add=SYS_ADMIN",
"--cap-add=SYS_RESOURCE",
"--device",
"/dev/fuse",
"--security-opt",
"apparmor=unconfined",
"--hostname=ansible-dev-container"
],
"updateRemoteUserUID": true,
"customizations": {
"vscode": {
"extensions": ["redhat.ansible"]
}
}
}
24 changes: 24 additions & 0 deletions .devcontainer/docker/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "ansible-dev-container-docker",
"image": "ghcr.io/ansible/community-ansible-dev-tools-container:latest",
"containerUser": "podman",
"runArgs": [
"--security-opt",
"seccomp=unconfined",
"--security-opt",
"label=disable",
"--cap-add=SYS_ADMIN",
"--cap-add=SYS_RESOURCE",
"--device",
"/dev/fuse",
"--security-opt",
"apparmor=unconfined",
"--hostname=ansible-dev-container"
],
"updateRemoteUserUID": true,
"customizations": {
"vscode": {
"extensions": ["redhat.ansible"]
}
}
}
25 changes: 25 additions & 0 deletions .devcontainer/podman/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "ansible-dev-container-podman",
"image": "ghcr.io/ansible/community-ansible-dev-tools-container:latest",
"containerUser": "podman",
"runArgs": [
"--security-opt",
"seccomp=unconfined",
"--security-opt",
"label=disable",
"--cap-add=SYS_ADMIN",
"--cap-add=SYS_RESOURCE",
"--device",
"/dev/fuse",
"--security-opt",
"apparmor=unconfined",
"--userns=keep-id:uid=1000,gid=1000",
"--hostname=ansible-dev-container"
],
"updateRemoteUserUID": true,
"customizations": {
"vscode": {
"extensions": ["redhat.ansible"]
}
}
}
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Release testOrg.testCol

on: # yamllint disable-line rule:truthy
release:
types: [published]

jobs:
release_automation_hub:
uses: ansible/ansible-content-actions/.github/workflows/release_galaxy.yaml@main
with:
environment: release
secrets:
ansible_galaxy_api_key: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
44 changes: 44 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: GHA for testOrg.testCol

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on: # yamllint disable-line rule:truthy
pull_request:
branches: [main]
workflow_dispatch:
schedule:
- cron: "0 0 * * *"

jobs:
changelog:
uses: ansible/ansible-content-actions/.github/workflows/changelog.yaml@main
if: github.event_name == 'pull_request'
ansible-lint:
uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main
sanity:
uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@main
unit-galaxy:
uses: ansible/ansible-content-actions/.github/workflows/unit.yaml@main
integration:
uses: ansible/ansible-content-actions/.github/workflows/integration.yaml@main
all_green:
if: ${{ always() && (github.event_name != 'schedule') }}
needs:
- changelog
- integration
- sanity
- unit-galaxy
- ansible-lint
runs-on: ubuntu-latest
steps:
- run: >-
python -c "assert set([
'${{ needs.changelog.result }}',
'${{ needs.integration.result }}',
'${{ needs.sanity.result }}',
'${{ needs.unit-galaxy.result }}'
'${{ needs.ansible-lint.result }}'
]) == {'success'}"
6 changes: 6 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[settings]
known_first_party=ansible_collections.testOrg.testCol
line_length=100
lines_after_imports=2
lines_between_types=1
profile=black
45 changes: 45 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
repos:
- repo: https://github.com/ansible-network/collection_prep
rev: 1.1.1
hooks:
- id: update-docs

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: end-of-file-fixer
- id: no-commit-to-branch
args: [--branch, main]
- id: trailing-whitespace

- repo: https://github.com/asottile/add-trailing-comma
rev: v3.0.0
hooks:
- id: add-trailing-comma

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.0"
hooks:
- id: prettier
entry: env CI=1 bash -c "prettier --list-different . || ec=$? && prettier --loglevel=error --write . && exit $ec"
pass_filenames: false
args: []
additional_dependencies:
- prettier
- prettier-plugin-toml

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
name: Sort import statements using isort
args: ["--filter-files"]

- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
19 changes: 19 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# files we don't want prettier to ever to look into
.*/
coverage/

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# A linked collection directory created by pytest-ansible-units
collections/

tests/output/

README.md
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["redhat.ansible"]
}
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This should be updated by antsibull-changelog. Do not edit this manually!

See https://github.com/ansible-community/antsibull-changelog/blob/main/docs/changelogs.rst for
information on how to use antsibull-changelog.

Check out ``changelogs/config.yaml`` for its configuration. You need to change at least the ``title`` field in there.
3 changes: 3 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Community Code of Conduct

Please see the official [Ansible Community Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html).
3 changes: 3 additions & 0 deletions CONTRIBUTING
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Contributing

Refer to the [Ansible community guide](https://docs.ansible.com/ansible/devel/community/index.html).
Loading

0 comments on commit edfede2

Please sign in to comment.