Skip to content

Commit

Permalink
Merge pull request #65 from tedgarb/master
Browse files Browse the repository at this point in the history
Treat values as simple/array based on local lens
  • Loading branch information
zilchms authored Feb 15, 2024
2 parents d818ef6 + b59794a commit 51f3b88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/puppet/provider/ssh_config/augeas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def self.get_value(aug, pathx)
end

def self.set_value(aug, base, path, label, value)
if label =~ %r{Ciphers|SendEnv|MACs|(HostKey|Kex)Algorithms|GlobalKnownHostsFile|PubkeyAcceptedKeyTypes}i
if parsed_as?("#{label} FOO\n", "#{label}/1", lens)
set_array_value(aug, path, value)
else
set_simple_value(aug, base, path, label, value)
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/provider/sshd_config/augeas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def self.get_value(aug, pathx)
end

def self.set_value(aug, base, path, label, value)
if label =~ %r{^(((Allow|Deny)(Groups|Users))|AcceptEnv|MACs|(HostKey|Kex)Algorithms|Ciphers)$}i
if parsed_as?("#{label} FOO\n", "#{label}/1", lens)
set_array_value(aug, base, path, label, value)
else
set_simple_value(aug, base, path, label, value)
Expand Down

0 comments on commit 51f3b88

Please sign in to comment.