Repository navigation
Commit c94bb84
committed
Confine the phpversion fact on php in PATH
Addresses a review comment on
#768: a confine is the
idiomatic way to keep a command-backed fact quiet where the command is
missing, as done in puppet-letsencrypt's certbot_version fact. The fact
is now not resolved at all on nodes without php, rather than running
php -v and discarding the failure.
The on_fail: nil from the previous commit is kept: it still covers a php
that is in PATH but cannot run (broken install, missing libraries,
permissions), which the confine does not catch.
Prompt: (review comment on the pull request) I think it should be using a `confine` like this: https://github.com/voxpupuli/puppet-letsencrypt/blob/836d38e5526e4b6286d3bfe28f1cd412ee7e2b4e/lib/facter/certbot_version.rb
Prompt: #768 got a comment. I believe the work on this was done under [a local working copy]
Assisted-By: Claude Opus 5 <noreply@anthropic.com>1 parent 3b0ddc5 commit c94bb84
2 files changed
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | | - | |
| 29 | + | |
28 | 30 | | |
29 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
30 | 44 | | |
31 | 45 | | |
32 | 46 | | |
| |||
0 commit comments