ansible/roles/adguard-home/tasks/main.yaml
2024-05-25 18:12:30 +03:00

33 lines
1.2 KiB
YAML

- name: Request cert for Adguard Home
k8s:
state: present
definition:
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: "{{ adguard_dns_name | default('dns.' + domain) }}-crt"
namespace: "{{ adguard_namespace | default(namespace) }}"
spec:
secretName: "{{ adguard_dns_name | default('dns.' + domain) }}-secret"
dnsNames:
- "{{ adguard_dns_name | default('dns.' + domain) }}"
issuerRef:
name: letsencrypt-prod
# We can reference ClusterIssuers by changing the kind here.
# The default value is Issuer (i.e. a locally namespaced Issuer)
kind: ClusterIssuer
group: cert-manager.io
- set_fact:
adguard_combined_values: "{{ adguard_default_values | combine(adguard_values | default({}), recursive=true) }}"
- name: Deploy Adguard Home
kubernetes.core.helm:
create_namespace: true
release_namespace: "{{ adguard_namespace | default(namespace) }}"
release_name: "{{ adguard_name | default('adguard') }}"
chart_ref: "{{ adguard_chart_ref }}"
chart_version: "{{ adguard_version | default(omit) }}"
release_values: "{{ adguard_combined_values | from_yaml }}"