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

Unable to remove extension configuration settings #653

Closed
mpdude opened this issue Jan 13, 2022 · 0 comments
Closed

Unable to remove extension configuration settings #653

mpdude opened this issue Jan 13, 2022 · 0 comments

Comments

@mpdude
Copy link
Contributor

mpdude commented Jan 13, 2022

When using this:

::php::extension { 'some-extension':
    settings => {
        'some.setting' => 'old-value',
    }
}

... and you later change it to ...

::php::extension { 'some-extension':
    settings => {}
}

... the some.setting is not removed from the ...some-extension.ini file.

The reason probably is that the settings hash is converted into ::php::config::settings here:

create_resources(::php::config::setting, to_hash_settings($config, $file),{ file => $file })

... which in turn becomes an ini_setting:

ini_setting { $name:
ensure => $ensure,
value => $value,
path => $file,
section => $section,
setting => $setting,
}

... but there is never anything that cleans up old/stale/unmanaged settings.

In an older version of this module, a possible workaround was to use undef for values that you'd like to remove, but that's no longer possible due to the typing. #654 re-enables that.

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet:
  • Ruby:
  • Distribution: Ubuntu 20.04
  • Module version: 8.0.2
mpdude added a commit to mpdude/puppet-php that referenced this issue Jan 13, 2022
This is necessary so that config settings can be removed (at least as a workaround for voxpupuli#653).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants