add support for file share
This commit is contained in:
parent
a286450d0a
commit
308e572471
3 changed files with 33 additions and 0 deletions
|
@ -3,9 +3,11 @@ hostname: "${name}"
|
|||
manage_etc_hosts: true
|
||||
disable_root: false
|
||||
ssh_authorized_keys:
|
||||
|
||||
%{ for key in admin_authorized_keys ~}
|
||||
- "${key}"
|
||||
%{ endfor ~}
|
||||
|
||||
%{ if insecure_password }
|
||||
chpasswd:
|
||||
list: |
|
||||
|
@ -15,12 +17,14 @@ ssh_pwauth: true
|
|||
%{ else }
|
||||
ssh_pwauth: false
|
||||
%{ endif }
|
||||
|
||||
%{ if use_host_cert }
|
||||
ssh_keys:
|
||||
ed25519_private: |
|
||||
${indent(4, private_key)}
|
||||
ed25519_certificate: "${host_cert}"
|
||||
%{ endif}
|
||||
|
||||
write_files:
|
||||
- path: /etc/default/locale
|
||||
content: |
|
||||
|
@ -29,10 +33,12 @@ write_files:
|
|||
- path: /etc/locale.gen
|
||||
content: |
|
||||
en_US.UTF-8 UTF-8
|
||||
|
||||
runcmd:
|
||||
- dhclient -r
|
||||
- dhclient
|
||||
- locale-gen
|
||||
|
||||
%{ if data_disk }
|
||||
device_aliases:
|
||||
data: /dev/vdb
|
||||
|
@ -46,9 +52,18 @@ fs_setup:
|
|||
filesystem: 'ext4'
|
||||
device: data.1
|
||||
overwrite: false
|
||||
%{ endif }
|
||||
|
||||
%{ if data_disk || add_data_share }
|
||||
mounts:
|
||||
%{ if data_disk }
|
||||
- ["data.1", "/mnt/data"]
|
||||
%{ endif }
|
||||
%{ if add_data_share }
|
||||
- ["data", "/mnt/data", "9p", "trans=virtio", "0", "0"]
|
||||
%{ endif }
|
||||
%{ endif }
|
||||
|
||||
%{ if fixed_dns != "" }
|
||||
manage_resolv_conf: true
|
||||
resolv_conf:
|
||||
|
|
Reference in a new issue