voxpupuli / voxpupuli/puppet-php
Add switch to run `update-alternatives` to set the managed PHP version as default
Nobody has claimed this yet.
- Dominant language
- Puppet
- Stars
- 86
- Forks
- 264
- Avg merge
- 29m
- Merged PRs (30d)
- 1
Description
Depending on which PHP version is installed with this module (and there might even be other versions not managed by it!), it's hard to predict what /usr/bin/php will resolve to.
At least on Ubuntu, the update-alternatives command can be used to control that. You need to be aware, however, that there are a few alternatives that need to be configured:
$ update-alternatives --get-selections | grep ph
phar auto /usr/bin/phar8.1
phar.phar auto /usr/bin/phar.phar8.1
php auto /usr/bin/php8.1
php-config auto /usr/bin/php-config8.1
phpize auto /usr/bin/phpize8.1
It would be nice if this module could encapsulate the necessary knowledge (which alternatives need to be set to what). Maybe an additional module (puppet/alternatives?) comes in handy?
class { '::php': update_alternatives => true } should set all php-related alternatives to the PHP version given in ::php::globals.
X-Ref #235
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the ::php class parameter and ::php::globals version selection described in the issue, then trace how platform-specific PHP packages are managed. Done means an opt-in update_alternatives setting configures the listed PHP-related alternatives to the selected PHP version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ubuntu
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100