GHP publish
This commit is contained in:
27
playbooks/ghp/bootstrap.yaml
Normal file
27
playbooks/ghp/bootstrap.yaml
Normal file
@ -0,0 +1,27 @@
|
||||
- hosts: localhost
|
||||
connection: local
|
||||
pre_tasks:
|
||||
- name: Check docker is working
|
||||
shell: docker info
|
||||
register: docker_info
|
||||
changed_when: "docker_info.rc != 0"
|
||||
failed_when: "docker_info.rc != 0"
|
||||
- name: Check Helm installed
|
||||
shell: helm version
|
||||
register: helm_version
|
||||
changed_when: "helm_version.rc != 0"
|
||||
failed_when: "helm_version.rc != 0"
|
||||
- name: Helm version
|
||||
debug:
|
||||
msg: "{{ helm_version.stdout }}"
|
||||
- name: Check kubectl installed and have access to cluster
|
||||
shell: kubectl get nodes
|
||||
register: kubectl_cluster_nodes
|
||||
changed_when: "kubectl_cluster_nodes.rc != 0"
|
||||
failed_when: "kubectl_cluster_nodes.rc != 0"
|
||||
- name: Kubectl nodes output
|
||||
debug:
|
||||
msg: "{{ kubectl_cluster_nodes.stdout.split('\n') }}"
|
||||
roles:
|
||||
- helm-repos
|
||||
- pwgen
|
5
playbooks/ghp/cert-manager.yaml
Normal file
5
playbooks/ghp/cert-manager.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- cert-manager
|
5
playbooks/ghp/chartmuseum.yaml
Normal file
5
playbooks/ghp/chartmuseum.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- chartmuseum
|
75
playbooks/ghp/core-infra.yaml
Normal file
75
playbooks/ghp/core-infra.yaml
Normal file
@ -0,0 +1,75 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
tasks:
|
||||
- name: Deploy MetalLB
|
||||
import_role:
|
||||
name: metallb
|
||||
when: metallb_enabled | default(true)
|
||||
tags: metallb
|
||||
|
||||
- name: Deploy External Ingress Nginx
|
||||
import_role:
|
||||
name: external-ingress-nginx
|
||||
when: external_ingress_nginx_enabled | default(true)
|
||||
tags:
|
||||
- external-ingress-nginx
|
||||
- ingress-nginx
|
||||
|
||||
- name: Deploy Internal Ingress Nginx
|
||||
import_role:
|
||||
name: internal-ingress-nginx
|
||||
when: internal_ingress_nginx_enabled | default(true)
|
||||
tags:
|
||||
- internal-ingress-nginx
|
||||
- ingress-nginx
|
||||
|
||||
- name: Deploy Local Ingress Nginx
|
||||
import_role:
|
||||
name: internal-ingress-nginx
|
||||
when: local_ingress_nginx_enabled | default(true)
|
||||
tags:
|
||||
- local-ingress-nginx
|
||||
- ingress-nginx
|
||||
|
||||
- name: Deploy Internal DNS
|
||||
import_role:
|
||||
name: internal-dns
|
||||
when: internal_dns_enabled | default(true)
|
||||
tags:
|
||||
- internal-dns
|
||||
- dns
|
||||
|
||||
- name: Deploy Local DNS
|
||||
import_role:
|
||||
name: local-dns
|
||||
when: local_dns_enabled | default(true)
|
||||
tags:
|
||||
- local-dns
|
||||
- dns
|
||||
|
||||
- name: Deploy Service DNS
|
||||
import_role:
|
||||
name: service-dns
|
||||
when: service_dns_enabled | default(true)
|
||||
tags:
|
||||
- service-dns
|
||||
- dns
|
||||
|
||||
- name: Deploy Cert-manager
|
||||
import_role:
|
||||
name: cert-manager
|
||||
when: cert_manager_enabled | default(true)
|
||||
tags: cert-manager
|
||||
|
||||
- name: Deploy NFS-client-provisioner
|
||||
import_role:
|
||||
name: nfs-client-provisioner
|
||||
when: nfs_client_provisioner_enabled | default(true)
|
||||
tags: nfs-client-provisioner
|
||||
|
||||
- name: Deploy Metrics-server
|
||||
import_role:
|
||||
name: metrics-server
|
||||
when: metrics_server_enabled | default(true)
|
||||
tags: metrics-server
|
4
playbooks/ghp/dns.yaml
Normal file
4
playbooks/ghp/dns.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
- hosts: knot_dns
|
||||
roles:
|
||||
- knot
|
5
playbooks/ghp/dovecot.yaml
Normal file
5
playbooks/ghp/dovecot.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- dovecot
|
5
playbooks/ghp/drone.yaml
Normal file
5
playbooks/ghp/drone.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- drone
|
5
playbooks/ghp/external-ingress-nginx.yaml
Normal file
5
playbooks/ghp/external-ingress-nginx.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- external-ingress-nginx
|
5
playbooks/ghp/gitea.yaml
Normal file
5
playbooks/ghp/gitea.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- gitea
|
5
playbooks/ghp/internal-dns.yaml
Normal file
5
playbooks/ghp/internal-dns.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- internal-dns
|
5
playbooks/ghp/internal-ingress-nginx.yaml
Normal file
5
playbooks/ghp/internal-ingress-nginx.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- internal-ingress-nginx
|
5
playbooks/ghp/local-dns.yaml
Normal file
5
playbooks/ghp/local-dns.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- local-dns
|
5
playbooks/ghp/local-ingress-nginx.yaml
Normal file
5
playbooks/ghp/local-ingress-nginx.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- local-ingress-nginx
|
5
playbooks/ghp/mail.yaml
Normal file
5
playbooks/ghp/mail.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- mail
|
5
playbooks/ghp/metallb.yaml
Normal file
5
playbooks/ghp/metallb.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- metallb
|
5
playbooks/ghp/metrics-server.yaml
Normal file
5
playbooks/ghp/metrics-server.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- metrics-server
|
5
playbooks/ghp/nextcloud.yaml
Normal file
5
playbooks/ghp/nextcloud.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- nextcloud
|
5
playbooks/ghp/nfs-client-provisioner.yaml
Normal file
5
playbooks/ghp/nfs-client-provisioner.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- nfs-client-provisioner
|
5
playbooks/ghp/opendkim.yaml
Normal file
5
playbooks/ghp/opendkim.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- opendkim
|
5
playbooks/ghp/opendmarc.yaml
Normal file
5
playbooks/ghp/opendmarc.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- opendmarc
|
5
playbooks/ghp/openldap.yaml
Normal file
5
playbooks/ghp/openldap.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- openldap
|
5
playbooks/ghp/playmaker.yaml
Normal file
5
playbooks/ghp/playmaker.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- playmaker
|
5
playbooks/ghp/postfix.yaml
Normal file
5
playbooks/ghp/postfix.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- postfix
|
5
playbooks/ghp/postgres.yaml
Normal file
5
playbooks/ghp/postgres.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- postgres
|
5
playbooks/ghp/pypiserver.yaml
Normal file
5
playbooks/ghp/pypiserver.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- pypiserver
|
5
playbooks/ghp/registry.yaml
Normal file
5
playbooks/ghp/registry.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- registry
|
5
playbooks/ghp/roundcube.yaml
Normal file
5
playbooks/ghp/roundcube.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- roundcube
|
5
playbooks/ghp/rspamd.yaml
Normal file
5
playbooks/ghp/rspamd.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- rspamd
|
27
playbooks/ghp/shared-infra.yaml
Normal file
27
playbooks/ghp/shared-infra.yaml
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
tasks:
|
||||
- name: Deploy PostgreSQL
|
||||
import_role:
|
||||
name: postgres
|
||||
when: postgres_enabled | default(true)
|
||||
tags: postgres
|
||||
|
||||
- name: Deploy OpenLDAP
|
||||
import_role:
|
||||
name: openldap
|
||||
when: openldap_enabled | default(true)
|
||||
tags: openldap
|
||||
|
||||
- name: Deploy Docker registry
|
||||
import_role:
|
||||
name: registry
|
||||
when: registry_enabled | default(true)
|
||||
tags: registry
|
||||
|
||||
- name: Deploy ChartMuseum
|
||||
import_role:
|
||||
name: chartmuseum
|
||||
when: chartmuseum_enabled | default(true)
|
||||
tags: chartmuseum
|
12
playbooks/ghp/site.yaml
Normal file
12
playbooks/ghp/site.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
- name: Deploy Core Infrastructure
|
||||
import_playbook: core-infra.yaml
|
||||
tags: core-infra
|
||||
|
||||
- name: Deploy Shared Infrastructure
|
||||
import_playbook: shared-infra.yaml
|
||||
tags: shared-infra
|
||||
|
||||
- name: Deploy End User Applications
|
||||
import_playbook: user-apps.yaml
|
||||
tags: user-apps
|
63
playbooks/ghp/user-apps.yaml
Normal file
63
playbooks/ghp/user-apps.yaml
Normal file
@ -0,0 +1,63 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
tasks:
|
||||
- name: Deploy Mail
|
||||
import_role:
|
||||
name: mail
|
||||
when: mail_enabled | default(true)
|
||||
tags: mail
|
||||
|
||||
- name: Deploy Nextcloud
|
||||
import_role:
|
||||
name: nextcloud
|
||||
when: nextcloud_enabled | default(true)
|
||||
tags: nextcloud
|
||||
|
||||
- name: Deploy Bitwarden
|
||||
import_role:
|
||||
name: bitwarden
|
||||
when: bitwarden_enabled | default(true)
|
||||
tags: bitwarden
|
||||
|
||||
- name: Deploy Gitea
|
||||
import_role:
|
||||
name: gitea
|
||||
when: gitea_enabled | default(true)
|
||||
tags: gitea
|
||||
|
||||
- name: Deploy Drone
|
||||
import_role:
|
||||
name: drone
|
||||
when: drone_enabled | default(true)
|
||||
tags: drone
|
||||
|
||||
- name: Deploy WikiJS
|
||||
import_role:
|
||||
name: wikijs
|
||||
when: wikijs_enabled | default(true)
|
||||
tags: wikijs
|
||||
|
||||
- name: Deploy Playmaker
|
||||
import_role:
|
||||
name: playmaker
|
||||
when: playmaker_enabled | default(false)
|
||||
tags: playmaker
|
||||
|
||||
- name: Deploy Pypiserver
|
||||
import_role:
|
||||
name: pypiserver
|
||||
when: pypiserver_enabled | default(false)
|
||||
tags: pypiserver
|
||||
|
||||
- name: Deploy PeerTube
|
||||
import_role:
|
||||
name: peertube
|
||||
when: peertube_enabled | default(false)
|
||||
tags: peertube
|
||||
|
||||
- name: Deploy Adguard Home
|
||||
import_role:
|
||||
name: adguard-home
|
||||
when: adguard_enabled | default(false)
|
||||
tags: adguard
|
17
playbooks/ghp/vps.yaml
Normal file
17
playbooks/ghp/vps.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
- hosts: web_proxy
|
||||
roles:
|
||||
- nginx
|
||||
tags: web-proxy
|
||||
|
||||
- hosts: mail_proxy
|
||||
roles:
|
||||
- haproxy
|
||||
tags: mail-proxy
|
||||
|
||||
- hosts: ddclient
|
||||
roles:
|
||||
- docker
|
||||
- role: ddclient
|
||||
dockerize: true
|
||||
tags: ddclient
|
5
playbooks/ghp/wikijs.yaml
Normal file
5
playbooks/ghp/wikijs.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: k8s
|
||||
connection: local
|
||||
roles:
|
||||
- wikijs
|
Reference in New Issue
Block a user