Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #124 #125

Merged
merged 1 commit into from May 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/models/foreman_virt_who_configure/output_generator.rb
Expand Up @@ -51,6 +51,7 @@ def missing_virt_who_input_messages
def virt_who_output(format = nil)
kubeconfig = config.hypervisor_type == 'kubevirt' ? "\nkubeconfig=#{config.kubeconfig_path}" : ''
result = ''
cr_password_base64 = Base64.strict_encode64("#{cr_password}")
result += "#!/bin/bash\n" if format == :bash_script
result += <<EOS
heading() {
Expand Down Expand Up @@ -105,7 +106,7 @@ def virt_who_output(format = nil)

if verify_minimal_version; then
step 2 "Encrypting password"
cr_password=`virt-who-password --password '#{cr_password}' 2> /dev/null`
cr_password=`virt-who-password --password $(echo #{cr_password_base64}|base64 -d) 2> /dev/null`
user_password=`virt-who-password --password '#{service_user_password}' 2> /dev/null`

step 3 "Creating virt-who configuration"
Expand Down