Skip to content

Commit

Permalink
Prepare ansible roles & plays
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt committed Jun 19, 2024
1 parent d1c1b74 commit 677be1b
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
exclude_paths:
- .github
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.

0 comments on commit 677be1b

Please sign in to comment.