From 3c24a78ffa9537bd4f3f48382524513717eff545 Mon Sep 17 00:00:00 2001 From: Manisha Singhal Date: Fri, 23 Feb 2024 13:52:15 +0530 Subject: [PATCH] Fixes User-data not created correctly by foreman_fog_proxmox (#313) --- app/helpers/proxmox_vm_cloudinit_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/proxmox_vm_cloudinit_helper.rb b/app/helpers/proxmox_vm_cloudinit_helper.rb index b241ad0ea..f1601d57f 100644 --- a/app/helpers/proxmox_vm_cloudinit_helper.rb +++ b/app/helpers/proxmox_vm_cloudinit_helper.rb @@ -48,7 +48,7 @@ def create_cloudinit_iso(vm_name, configs, ssh) wd = create_temp_directory(ssh) configs.each do |config| - config_file = ssh.run(%(echo "#{config[1]}" >> "#{wd}/#{config[0]}")) + config_file = ssh.run(%(echo '#{config[1]}' >> "#{wd}/#{config[0]}")) unless config_file.first.status.zero? delete_temp_dir(ssh, wd) raise ::Foreman::Exception, "Failed to create file #{config[0]}: #{config_file.first.stdout}"