hostname works
This commit is contained in:
parent
d4782d00cc
commit
9d43c19189
3 changed files with 25 additions and 24 deletions
|
|
@ -78,15 +78,14 @@
|
|||
set_fact:
|
||||
ssh_keys_list: "{{ ssh_key_content.content | b64decode | split('\n') | select('match', '^ssh-') | list }}"
|
||||
|
||||
- name: Write cloud-init user-data snippet to install qemu-guest-agent
|
||||
- name: Write cloud-init vendor-data snippet to install qemu-guest-agent
|
||||
copy:
|
||||
dest: "{{ zfs_pool_mountpoint }}/snippets/{{ qemu_agent_snippet_filename }}"
|
||||
mode: '0644'
|
||||
content: |
|
||||
#cloud-config
|
||||
user: {{ proxmox_ciuser }}
|
||||
ssh_authorized_keys:
|
||||
{{ ssh_keys_list | to_nice_yaml | indent(10, first=True) }}
|
||||
# Vendor-data snippet: Proxmox will automatically set hostname from VM name when using vendor-data
|
||||
# User info (ciuser/sshkeys) is set separately via Terraform/Proxmox parameters
|
||||
package_update: true
|
||||
package_upgrade: true
|
||||
packages:
|
||||
|
|
@ -164,7 +163,7 @@
|
|||
]
|
||||
+ (proxmox_ci_upgrade | bool
|
||||
| ternary(['--ciupgrade 1'], []))
|
||||
+ ['--cicustom user=local:snippets/' ~ qemu_agent_snippet_filename]
|
||||
+ ['--cicustom vendor=local:snippets/' ~ qemu_agent_snippet_filename]
|
||||
}}
|
||||
when:
|
||||
- vmid_config_check.rc != 0 or not vm_already_template | default(false) or ide2_removed.changed | default(false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue