mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add support for setting root ssh pubkey to proxmox containers.
This commit is contained in:
parent
0ece06ef66
commit
3a62f74758
2 changed files with 7 additions and 0 deletions
|
@ -156,6 +156,10 @@ with their default settings listed.
|
|||
# Network interfaces, netX
|
||||
net0: name=eth0,bridge=vmbr0,ip=dhcp
|
||||
|
||||
# Public key to add to /root/.ssh/authorized_keys.
|
||||
pubkey: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA...'
|
||||
|
||||
|
||||
QEMU
|
||||
====
|
||||
|
||||
|
|
|
@ -726,6 +726,9 @@ def create_node(vm_, newid):
|
|||
if prop in vm_: # if the property is set, use it for the VM request
|
||||
newnode[prop] = vm_[prop]
|
||||
|
||||
if 'pubkey' in vm_:
|
||||
newnode['ssh-public-keys'] = vm_['pubkey']
|
||||
|
||||
# inform user the "disk" option is not supported for LXC hosts
|
||||
if 'disk' in vm_:
|
||||
log.warning('The "disk" option is not supported for LXC hosts and was ignored')
|
||||
|
|
Loading…
Add table
Reference in a new issue