diff --git a/lib/facter/networkmanager_dns.rb b/lib/facter/networkmanager_dns.rb index f2c8b76..84f2239 100644 --- a/lib/facter/networkmanager_dns.rb +++ b/lib/facter/networkmanager_dns.rb @@ -9,9 +9,9 @@ nmcli = Facter.value(:networkmanager_nmcli_path) connections.each do |connection| dns[connection] = {} - dns[connection][:nameserver] = Facter::Core::Execution.execute("#{nmcli} -g ipv4.dns connection show id #{connection}").split(',') - dns[connection][:search] = Facter::Core::Execution.execute("#{nmcli} -g ipv4.dns-search connection show id #{connection}").split(',') - dns[connection][:options] = Facter::Core::Execution.execute("#{nmcli} -e no -g ipv4.dns-options connection show id #{connection}").split(',') + dns[connection][:nameserver] = Facter::Core::Execution.execute("#{nmcli} -g ipv4.dns connection show id '#{connection}'").split(',') + dns[connection][:search] = Facter::Core::Execution.execute("#{nmcli} -g ipv4.dns-search connection show id '#{connection}'").split(',') + dns[connection][:options] = Facter::Core::Execution.execute("#{nmcli} -e no -g ipv4.dns-options connection show id '#{connection}'").split(',') end end diff --git a/lib/facter/networkmanager_primaryconnection.rb b/lib/facter/networkmanager_primaryconnection.rb index 1338d64..05a703a 100644 --- a/lib/facter/networkmanager_primaryconnection.rb +++ b/lib/facter/networkmanager_primaryconnection.rb @@ -6,7 +6,7 @@ if nmcli device = Facter.value('networking')['primary'] if device - cmd = "#{nmcli} -g general.connection d show #{device}" + cmd = "#{nmcli} -g general.connection d show '#{device}'" Facter::Core::Execution.execute(cmd) end end