f-8: code: add module to load nocloud in db #8
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
b43e45488e
commit
55ed2c8e53
6 changed files with 82 additions and 0 deletions
2
internal/load_db/nocloud/templates/meta-data.tmpl
Normal file
2
internal/load_db/nocloud/templates/meta-data.tmpl
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
instance-id: {{ .Name }}
|
||||
local-hostname: {{ .Name }}
|
||||
4
internal/load_db/nocloud/templates/network-config.tmpl
Normal file
4
internal/load_db/nocloud/templates/network-config.tmpl
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
version: 2
|
||||
ethernets:
|
||||
eth0:
|
||||
dhcp4: true
|
||||
3
internal/load_db/nocloud/templates/user-data.tmpl
Normal file
3
internal/load_db/nocloud/templates/user-data.tmpl
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
passwd -d root
|
||||
13
internal/load_db/nocloud/templates/vendor-data.tmpl
Normal file
13
internal/load_db/nocloud/templates/vendor-data.tmpl
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#cloud-config
|
||||
users:
|
||||
- name: syonad
|
||||
lock_passwd: false
|
||||
gecos: alpine Cloud User
|
||||
groups: [adm, wheel]
|
||||
doas:
|
||||
- permit nopass syonad
|
||||
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
|
||||
shell: /bin/ash
|
||||
passwd: "{{ .Password }}"
|
||||
ssh_authorized_keys:
|
||||
- "{{ .SSHKEY }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue