Skip to content

Commit

Permalink
Merge pull request #227 from grycap/devel
Browse files Browse the repository at this point in the history
Set default values for admin user and pass
  • Loading branch information
micafer authored Dec 20, 2024
2 parents ac0f37f + 6d1a77c commit 16a448b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion artifacts/lrms/kube_fe_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
export_line: "(fsid=0,rw,async,no_root_squash,no_subtree_check,insecure)"
nfs_path: "{{ kube_nfs_path | default('/pv') }}"
csi_driver: "{{ kube_csi_driver | default('NFS') }}"
admin_username: "{{ kube_admin_username | default('admin') }}"
admin_token: "{{ kube_admin_token | default(lookup('password', '/var/tmp/kubeadminpass chars=ascii_letters,digits length=16')) }}"

pre_tasks:
- name: Create dir for the NFS PV
file: path={{ nfs_path }} state=directory mode=755
- name: Create auth file dir
file: path=/etc/kubernetes/pki state=directory mode=755 recurse=yes
- name: Create auth data file with an admin user
copy: content='{{ kube_admin_token }},{{ kube_admin_username }},100,"users,system:masters"' dest=/etc/kubernetes/pki/auth mode=600
copy: content='{{ admin_token }},{{ admin_username }},100,"users,system:masters"' dest=/etc/kubernetes/pki/auth mode=600
- name: Do not use fsid=0 in Ubuntu 20.04
set_fact:
export_line: "(rw,async,no_root_squash,no_subtree_check,insecure)"
Expand Down

0 comments on commit 16a448b

Please sign in to comment.