fix: add optional FQDN configuration to VM template and Cloud-Init user-data
This commit is contained in:
@@ -13,6 +13,10 @@ vm_id: 150
|
|||||||
# Hostname for the base VM (template)
|
# Hostname for the base VM (template)
|
||||||
hostname: debian-template-base
|
hostname: debian-template-base
|
||||||
|
|
||||||
|
# optional fqdn
|
||||||
|
# fqdn: myvm.example.com
|
||||||
|
|
||||||
|
|
||||||
# Memory in MB
|
# Memory in MB
|
||||||
memory: 2048
|
memory: 2048
|
||||||
|
|
||||||
|
|||||||
@@ -156,7 +156,6 @@
|
|||||||
qm set {{ vm_id }}
|
qm set {{ vm_id }}
|
||||||
--ciuser {{ ci_user }}
|
--ciuser {{ ci_user }}
|
||||||
--sshkeys local:snippets/{{ vm_id }}-sshkey.pub
|
--sshkeys local:snippets/{{ vm_id }}-sshkey.pub
|
||||||
--hostname {{ hostname }}
|
|
||||||
--citype nocloud
|
--citype nocloud
|
||||||
--cicustom "user=local:snippets/{{ vm_id }}-user.yaml,vendor=local:snippets/{{ vm_id }}-vendor.yaml"
|
--cicustom "user=local:snippets/{{ vm_id }}-user.yaml,vendor=local:snippets/{{ vm_id }}-vendor.yaml"
|
||||||
--ipconfig0 {{ ipconfig0 }}
|
--ipconfig0 {{ ipconfig0 }}
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
#cloud-config
|
#cloud-config
|
||||||
|
|
||||||
|
hostname: {{ hostname }}
|
||||||
|
{% if domain is defined and domain %}
|
||||||
|
fqdn: {{ hostname }}.{{ domain }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
users:
|
users:
|
||||||
- name: {{ ci_user }}
|
- name: {{ ci_user }}
|
||||||
sudo: ALL=(ALL) NOPASSWD:ALL
|
sudo: ALL=(ALL) NOPASSWD:ALL
|
||||||
|
|||||||
Reference in New Issue
Block a user