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

Remove config when module is ensured to absent #478

Merged
merged 1 commit into from
Oct 6, 2018
Merged

Remove config when module is ensured to absent #478

merged 1 commit into from
Oct 6, 2018

Conversation

amateo
Copy link
Contributor

@amateo amateo commented Sep 25, 2018

When the module is ensured to absent, it removes its config and not try
to create the config file and enable it.

@bastelfreak
Copy link
Member

Fixes #477

exec { $cmd:
onlyif => "${ext_tool_query} -s ${_sapi} -m ${so_name} | /bin/grep 'No module matches ${so_name}'",
require => ::Php::Config[$title],
}
}

if $php::fpm {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is specific to Debian as well?

@bastelfreak bastelfreak added bug Something isn't working needs-tests tests-fail labels Sep 25, 2018
@bastelfreak
Copy link
Member

Hi @amateo, thanks for this PR as well! Can you take a look at travis? The jobs are failing on CentOS, probably because of the if block in line 118 (see my inline comment for that). Could you add an acceptance test for this so we know it's working properly now?

When the module is ensured to absent, it removes its config and not try
to create the config file and enable it.
@amateo
Copy link
Contributor Author

amateo commented Oct 2, 2018

Hi @bastelfreak. I think all problems are now solved.

@bastelfreak
Copy link
Member

Thanks!

@bastelfreak bastelfreak merged commit 6e74026 into voxpupuli:master Oct 6, 2018
@RedChops
Copy link

This patch ends up being a bit of a wild goose chase for all the available values of $ensure, since it can also be 'snapshot' or a pinned version. Even with #485 these will be marked as 'absent'. Doesn't it make more sense for line 93 to simply be if $ensure != 'absent'?

@amateo amateo mentioned this pull request Oct 31, 2018
@amateo
Copy link
Contributor Author

amateo commented Oct 31, 2018

I have just made #493 with this last change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants