fix

parent e265c6d9
Pipeline #9287 passed with stages
in 11 minutes and 4 seconds
......@@ -29,6 +29,12 @@ Puppet::Type.type(:nextcloud_config).provide(:php, parent: Puppet::Provider::Nex
if config
config['system'].map do |name, value|
# initializes @property_hash
case value.to_s
when %r{.*REMOVED SENSITIVE VALUE.*}
# The occ command used to dump all configs hides some data considered as sensitive.
# The get command gives unhidden information when required
value = JSON.parse(execute_occ("config:system:get #{name} --ansi --output=json").chomp)
end
new(
name: name,
ensure: :present,
......@@ -65,15 +71,7 @@ Puppet::Type.type(:nextcloud_config).provide(:php, parent: Puppet::Provider::Nex
execute_occ("config:system:delete #{resource[:name]}")
end
def value
# The occ command used to dump all config in self.instances hides some data considered as sensitive.
# The getter have to get unhidden information.
case @property_hash[:value].to_s
when %r{.*REMOVED SENSITIVE VALUE.*}
@property_hash[:value] = JSON.parse(execute_occ("config:system:get #{resource[:name]} --ansi --output=json").chomp)
end
@property_hash[:value]
end
mk_resource_methods
def value=(val)
set_config_system(resource[:name], val)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment