Commit aa6e523
committed
Exit install early if nothing to do
This is intended to match the behavior of puppetlabs-puppet_agent's
install script, which has similar logic.
The logic also appears necessary for OpenBolt's tests to pass.
In OpenBolt, a remote node with an agent installed on it, but which has
not had apply_prep executed will be initially identified as "agentless".
That causes this install script to be invoked via the puppet_library
hook. In at least one OpenBolt test this does not _run_as root, so it
relies on this bail-out logic to avoid failing when attempting to
install the package. After that initial apply_prep run, the puppet-agent
feature is added to the Target configuration, which bypasses invoking
this installation script in subsequent runs.
Initially I thought this might be a bug, but nothing else seems to add
the puppet-agent feature to a target configuration so my best guess is
that this is how OpenBolt is intended to "detect" the existence of an
agent on a remote node.1 parent d517aca commit aa6e523
1 file changed
+33
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
17 | 48 | | |
18 | 49 | | |
19 | 50 | | |
| |||
65 | 96 | | |
66 | 97 | | |
67 | 98 | | |
| 99 | + | |
| 100 | + | |
68 | 101 | | |
69 | 102 | | |
70 | 103 | | |
| |||
0 commit comments