mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 13:46:59 +01:00
Deploy ingress, lego and dashboard
This commit is contained in:
parent
bf83e675f2
commit
f468fd3e34
43 changed files with 1321 additions and 142 deletions
40
roles/lego/tasks/main.yml
Normal file
40
roles/lego/tasks/main.yml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
- name: kube_lego | Templating manifests
|
||||
template:
|
||||
src: "{{ item }}"
|
||||
dest: "/tmp/{{ item | regex_replace('.j2', '') }}"
|
||||
with_items:
|
||||
- lego-sa.yml.j2
|
||||
- lego-clusterolebinding.yml.j2
|
||||
- lego-clusterole.yml.j2
|
||||
- lego-configmap.yml.j2
|
||||
- lego-controller.yml.j2
|
||||
when: inventory_hostname == initial_master
|
||||
|
||||
- name: kube_lego | Deploying kube-lego
|
||||
kube:
|
||||
name: "{{ item.name }}"
|
||||
resource: "{{ item.type }}"
|
||||
filename: "{{ item.file }}"
|
||||
state: latest
|
||||
with_items:
|
||||
- { 'name': 'kube-lego', 'type': 'sa', 'file': '/tmp/lego-sa.yml' }
|
||||
- { 'name': 'kube-lego', 'type': 'clusterrolebingind', 'file': '/tmp/lego-clusterolebinding.yml' }
|
||||
- { 'name': 'kube-lego', 'type': 'clusterrole', 'file': '/tmp/lego-clusterole.yml' }
|
||||
- { 'name': 'kube-lego', 'type': 'configmap', 'file': '/tmp/lego-configmap.yml' }
|
||||
- { 'name': 'kube-lego', 'type': 'deploy', 'file': '/tmp/lego-controller.yml' }
|
||||
when: inventory_hostname == initial_master
|
||||
|
||||
- name: kube_lego | Removing manifest
|
||||
file:
|
||||
path: "/tmp/{{ item }}"
|
||||
state: absent
|
||||
with_items:
|
||||
- lego-namespace.yml
|
||||
- lego-sa.yml
|
||||
- lego-clusterolebinding.yml
|
||||
- lego-clusterole.yml
|
||||
- lego-configmap.yml
|
||||
- lego-controller.yml
|
||||
when: inventory_hostname == initial_master
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue