Fixing multiple issues.

This commit is contained in:
Emiliano Vavassori 2022-08-20 01:49:13 +02:00
parent 6267a7e843
commit 27e08ea2be
4 changed files with 10 additions and 9 deletions

View File

@ -6,7 +6,7 @@ import pulumi_command as command
import yaml import yaml
from dotmap import DotMap from dotmap import DotMap
from jinja2 import Template from jinja2 import Template
from passlib import sha512_crypt from passlib.hash import sha512_crypt
conf = DotMap(yaml.safe_load(open("./input.yaml", "r").read())) conf = DotMap(yaml.safe_load(open("./input.yaml", "r").read()))

View File

@ -1,2 +1,2 @@
instance-id: {{ conf.name }} instance-id: {{ name }}
local-hostname: {{ conf.name }} local-hostname: {{ name }}

View File

@ -1,22 +1,22 @@
#cloud-config #cloud-config
resize_rootfs: true resize_rootfs: true
users: users:
- name: {{ conf.username }} - name: {{ username }}
sudo: ALL=(ALL) NOPASSWD:ALL sudo: ALL=(ALL) NOPASSWD:ALL
groups: users, admin groups: users, admin
shell: /bin/bash shell: /bin/bash
ssh_authorized_keys: ssh_authorized_keys:
{% for key in conf.sshkeys %} {% for key in sshkeys %}
- {{ item }} - "{{ key }}"
{% endfor %} {% endfor %}
hashed_passwd: {{ conf.password }} hashed_passwd: {{ password }}
ssh_pwauth: true ssh_pwauth: true
disable_root: false disable_root: false
chpasswd: chpasswd:
expire: false expire: false
list: | list: |
root:{{ conf.password }} root:{{ password }}
syntaxerrormmm:{{ conf.password }} syntaxerrormmm:{{ password }}
#packages: #packages:
# - qemu-guest-agent # - qemu-guest-agent
#power_state: #power_state:

View File

@ -1,6 +1,7 @@
pulumi>=3.0.0,<4.0.0 pulumi>=3.0.0,<4.0.0
pulumi_libvirt>=0.3.0 pulumi_libvirt>=0.3.0
pulumi-command>=0.4.1 pulumi-command>=0.4.1
pyyaml>=6.0
Jinja2>=3.1.2 Jinja2>=3.1.2
dotmap>=1.3.30 dotmap>=1.3.30
passlib>=1.7.4 passlib>=1.7.4