Cambiamento posizione template basati su jinja.
This commit is contained in:
parent
373adff418
commit
7a81d01461
4 changed files with 3 additions and 3 deletions
2
vm-ansible/templates/meta-data.jinja
Normal file
2
vm-ansible/templates/meta-data.jinja
Normal file
|
@ -0,0 +1,2 @@
|
|||
instance-id: {{ name }}
|
||||
local-hostname: {{ name }}
|
5
vm-ansible/templates/network-config
Normal file
5
vm-ansible/templates/network-config
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
version: 2
|
||||
ethernets:
|
||||
ens3:
|
||||
dhcp4: true
|
24
vm-ansible/templates/user-data.jinja
Normal file
24
vm-ansible/templates/user-data.jinja
Normal file
|
@ -0,0 +1,24 @@
|
|||
#cloud-config
|
||||
resize_rootfs: true
|
||||
users:
|
||||
- name: {{ username }}
|
||||
sudo: ALL=(ALL) NOPASSWD:ALL
|
||||
groups: users, admin
|
||||
shell: /bin/bash
|
||||
ssh_authorized_keys:
|
||||
{% for key in sshkeys %}
|
||||
- "{{ key }}"
|
||||
{% endfor %}
|
||||
hashed_passwd: {{ password }}
|
||||
ssh_pwauth: true
|
||||
disable_root: false
|
||||
chpasswd:
|
||||
expire: false
|
||||
list: |
|
||||
root:{{ password }}
|
||||
syntaxerrormmm:{{ password }}
|
||||
#packages:
|
||||
# - qemu-guest-agent
|
||||
#power_state:
|
||||
# delay: now
|
||||
# mode: reboot
|
Loading…
Add table
Add a link
Reference in a new issue