Skip to content

Conversation

@austb
Copy link
Contributor

@austb austb commented Oct 26, 2025

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.

@bastelfreak bastelfreak added the enhancement New feature or request label Oct 26, 2025
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.
@austb austb force-pushed the skip-if-installed branch from e4bbb13 to aa6e523 Compare October 26, 2025 22:09
@bastelfreak bastelfreak merged commit 77724de into voxpupuli:main Oct 26, 2025
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants