mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 13:46:59 +01:00
Add basic auth to k8s dashboard
This commit is contained in:
parent
d8d9733ed9
commit
2315ed19df
4 changed files with 75 additions and 99 deletions
|
|
@ -2,7 +2,7 @@
|
|||
- block:
|
||||
- name: Installing python-passlib
|
||||
apt:
|
||||
name: python-passlib
|
||||
name: python3-passlib
|
||||
state: latest
|
||||
register: result
|
||||
retries: 3
|
||||
|
|
@ -11,8 +11,8 @@
|
|||
- name: Creating htpasswd file if k8s has basic auth
|
||||
htpasswd:
|
||||
path: /tmp/auth
|
||||
name: "{{ basic_auth_user }}"
|
||||
password: "{{ basic_auth_password }}"
|
||||
name: "{{ dashboard_basic_auth_user }}"
|
||||
password: "{{ dashboard_basic_auth_password }}"
|
||||
when: inventory_hostname == initial_master
|
||||
|
||||
- name: Getting secrets
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
state: absent
|
||||
when: inventory_hostname == initial_master
|
||||
|
||||
when: basic_auth_user | length > 0
|
||||
when: dashboard_basic_auth_user | length > 0
|
||||
|
||||
- name: Templating manifests
|
||||
template:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue