mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-08 11:07:43 +03:00
Template out known_users.csv, optionally add groups
This commit is contained in:
@@ -27,12 +27,10 @@
|
||||
group: "{{ kube_cert_group }}"
|
||||
|
||||
- name: Populate users for basic auth in API
|
||||
lineinfile:
|
||||
template:
|
||||
src: known_users.csv.j2
|
||||
dest: "{{ kube_users_dir }}/known_users.csv"
|
||||
create: yes
|
||||
line: '{{ item.value.pass }},{{ item.key }},{{ item.value.role }}'
|
||||
backup: yes
|
||||
with_dict: "{{ kube_users }}"
|
||||
when: inventory_hostname in "{{ groups['kube-master'] }}" and kube_basic_auth|default(true)
|
||||
notify: set secret_changed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user