Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare ansible roles & plays #8

Merged
merged 1 commit into from
Jun 19, 2024
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
15 changes: 15 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
exclude_paths:
- .github
- charts
mock_roles:
- ensure-docker
use_default_rules: true
rulesdir:
- ./.ansible-lint-rules/
skip_list:
- galaxy[no-changelog]
# DO NOT DELETE THE WARNLIST! It is required for our custom rules!
# If this isn't there our custom rules will only through a warning and wont generate a failure!:
warn_list:
- dummy
7 changes: 5 additions & 2 deletions .zuul.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
- job:
name: osism-kubernetes-build
pre-run: playbooks/pre.yml
run: playbooks/build.yml
pre-run: zuul-playbooks/pre.yml
run: zuul-playbooks/build.yml
vars:
docker_namespace: osism
docker_registry: osism.harbor.regio.digital
Expand All @@ -12,15 +12,18 @@
default-branch: main
check:
jobs:
- ansible-lint
- hadolint
- osism-kubernetes-build
- yamllint
gate:
jobs:
- ansible-lint
- hadolint
- osism-kubernetes-build
- yamllint
periodic-daily:
jobs:
- ansible-lint
- hadolint
- yamllint
3 changes: 2 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ ENV DEBIAN_FRONTEND=noninteractive
USER root

COPY --link charts /charts
COPY --link playbooks/* /ansible/
COPY --link roles /ansible/roles

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

Expand All @@ -22,7 +24,6 @@ useradd -l -g dragon -G docker -u "$USER_ID" -m -d /ansible dragon

# create required directories
mkdir -p \
/ansible \
/interface \
/share

Expand Down
7 changes: 7 additions & 0 deletions playbooks/cloudnative_pg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
- name: Apply role cloudnative_pg
hosts: localhost
connection: local

roles:
- cloudnative_pg
21 changes: 21 additions & 0 deletions roles/cloudnative_pg/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
galaxy_info:
author: Arvid Requate
description: Role osism.services.cloudnative_pg, an operator for PostgreSQL
license: Apache License 2.0
min_ansible_version: 2.16.0
platforms:
- name: Ubuntu
versions:
- jammy
- noble
- name: Debian
versions:
- bookworm
- name: EL
versions:
- "9"
galaxy_tags:
- helm
- kubernetes
- osism
8 changes: 8 additions & 0 deletions roles/cloudnative_pg/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
- name: Deploy latest cloudnative-pg operator chart in namespace cnpg-system
kubernetes.core.helm:
release_name: cloudnative-pg
chart_ref: cnpg/cloudnative-pg
release_namespace: cnpg-system
create_namespace: true
wait: true
File renamed without changes.
File renamed without changes.