Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
Merged
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
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:latest",
"containerUser": "root",
"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", "redhat.vscode-redhat-account"]
}
}
}
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:latest",
"containerUser": "root",
"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", "redhat.vscode-redhat-account"]
}
}
}
26 changes: 26 additions & 0 deletions .devcontainer/podman/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "ansible-dev-container-podman",
"image": "ghcr.io/ansible/community-ansible-dev-tools:latest",
"containerUser": "root",
"runArgs": [
"--cap-add=SYS_ADMIN",
"--cap-add=SYS_RESOURCE",
"--device",
"/dev/fuse",
"--security-opt",
"seccomp=unconfined",
"--security-opt",
"label=disable",
"--security-opt",
"apparmor=unconfined",
"--userns=host",
"--hostname=ansible-dev-container",
"--volume",
"ansible-dev-tools-container-storage:/var/lib/containers"
],
"customizations": {
"vscode": {
"extensions": ["redhat.ansible", "redhat.vscode-redhat-account"]
}
}
}
3 changes: 3 additions & 0 deletions .github/ansible-code-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
schedule:
interval: "daily"
17 changes: 17 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: "CI"

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:
ansible-lint:
uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main
171 changes: 171 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
.logs/*
*.retry
*.vault
collections/*
!collections/ansible_collections
!collections/requirements.yml
collections/ansible_collections/*
!collections/ansible_collections/cloudkit
collections/ansible_collections/cloudkit/*
!collections/ansible_collections/cloudkit/global_config
# https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

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

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# public_template
# Cloudkit Ansible Project

Use this repository as the template for public-facing repositories. Please keep the following warning at the top of the repository README:

> [!WARNING]
> Be mindful of the content you commit to this repository. Do not commit any
> material containing Red Hat confidential content, including information about
> future product development plans.
This repository contains the Ansible roles, playbooks, rulebooks, and
inventories that are used in the scope of cloudkit.
10 changes: 10 additions & 0 deletions ansible-navigator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
ansible-navigator:
logging:
level: debug
append: false
file: $PWD/.logs/ansible-navigator.log

playbook-artifact:
enable: true
save-as: "$PWD/.logs/{playbook_name}-artifact-{time_stamp}.json"
13 changes: 13 additions & 0 deletions ansible.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[defaults]
# Set the logging verbosity level
verbosity = 2

# Define the default become method
become_method = sudo

[persistent_connection]
# Controls how long the persistent connection will remain idle before it is destroyed
connect_timeout=30

# Controls the amount of time to wait for response from remote device before timing out persistent connection
command_timeout=30
2 changes: 2 additions & 0 deletions collections/requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
collections: []
15 changes: 15 additions & 0 deletions devfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
schemaVersion: 2.2.2
metadata:
name: cloudkit.global_config-87d43573
components:
- name: tooling-container
container:
image: ghcr.io/ansible/ansible-workspace-env-reference:latest
memoryRequest: 256M
memoryLimit: 6Gi
cpuRequest: 250m
cpuLimit: 2000m
args: ["tail", "-f", "/dev/null"]
env:
- name: KUBEDOCK_ENABLED
value: "true"
6 changes: 6 additions & 0 deletions inventory/localhost.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
all:
hosts:
config:
ansible_host: localhost
ansible_connection: local
6 changes: 6 additions & 0 deletions playbook_cloudkit_create_hosted_cluster.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- name: Create a hosted control plane cluster
hosts: localhost
gather_facts: false

tasks:
6 changes: 6 additions & 0 deletions playbook_cloudkit_delete_hosted_cluster.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- name: Delete a hosted control plane cluster
hosts: localhost
gather_facts: false

tasks:
Empty file added roles/.gitkeep
Empty file.
22 changes: 22 additions & 0 deletions rulebooks/cluster_fulfillment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
- name: Fulfillment webhook
hosts: localhost
## Define our source for events
sources:
- ansible.eda.webhook:
host: 0.0.0.0
port: 5000
## Define the conditions we are looking for
rules:
- name: Create hosted cluster
condition: event.payload.message == "create_hosted_cluster"
action:
run_job_template:
name: "create-hosted-cluster"
organization: "cloudkit"

- name: Delete hosted cluster
condition: event.payload.message == "delete_hosted_cluster"
action:
run_job_template:
name: "delete-hosted-cluster"
organization: "cloudkit"