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

Use Test-PuppetInstalledVersion instead of Test-PuppetInstalled #585

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cgorshing
Copy link

I ran into an issue with Bolt running "puppet_agent::install" where we had uninstalled the Puppet Agent on a Win10 machine and Bolt would not install the agent again. The message was Version parameter not defined and agent detected. Nothing to do.

When the Puppet Agent is uninstalled, the registry keys (at least on the two Windows machines I've tested) are left in place. I believe the Test-PuppetInstalled method is a little lacking and should do further testing to check whether Puppet is installed or not. Similar to what the existing Test-PuppetInstalledVersion already does, which only has a boolean result.

I'm looking for suggestions related to this topic, because I can see a couple different options to tackle this problem.

I've also noticed there are a couple different places doing similar logic, reading the registry keys and the VERSION file. Another refactor might be to pull those pieces up to a "helper".

@cgorshing cgorshing requested a review from a team as a code owner November 5, 2021 11:31
@CLAassistant
Copy link

CLAassistant commented Nov 5, 2021

CLA assistant check
All committers have signed the CLA.

@joshcooper
Copy link
Contributor

It makes sense to me to check for the version file and not just the presence of registry keys that may be left over after an uninstall. I'm closing and reopening this to trigger the GH checks.

@joshcooper
Copy link
Contributor

@donoghuc could you review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants