Skip to content

Add puppetcore support for macOS #784

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

joshcooper
Copy link
Contributor

@joshcooper joshcooper commented Jun 28, 2025

Install puppetcore packages on macOS via SSH:

/opt/puppetlabs/bolt/bin/bolt task run puppet_agent::install \
  collection=puppetcore8 \
  version=8.13.1 \
  username=forge-key \
  password=${PUPPET_FORGE_TOKEN} \
  --targets 'www.example.com'
  • Update manifests to upgrade packages

Install puppetcore packages on macOS via SSH:

```
/opt/puppetlabs/bolt/bin/bolt task run puppet_agent::install \
  collection=puppetcore8 \
  version=8.13.1 \
  username=forge-key \
  password=${PUPPET_FORGE_TOKEN} \
  --targets www.example.com
```
If yum_source wasn't specified, such as when installing puppetcore on apt or
mac, and a password wasn't specified, the error message incorrectly referenced
yum:

    A password parameter is required to install from https://yum-puppetcore.puppet.com/public

Move the password check prior to handling yum, apt, etc sources. If installing
puppetcore packages and password isn't specified, we now report:

    A password parameter is required to install from puppetcore
Since wget and curl may attempt to use credentials, report if authentication
fails.
The script assumed curl was using HTTP/1.1 as it was tried to match:

    404 Not Found

When using 2.0, the HTTP status text is not included in the response:

    HTTP/2 404

Update the grep pattern so we handle both 1.1 and 2. If the credentials are
invalid, the task will report:

    21:49:40 -0700 CRIT: ERROR 401
    21:49:40 -0700 CRIT: Unable to retrieve a valid package!

If the requested package doesn't exist, the task will report:

    21:56:33 -0700 CRIT: ERROR 404
    21:56:33 -0700 CRIT: Unable to retrieve a valid package!
@joshcooper joshcooper requested review from bastelfreak and a team as code owners June 28, 2025 05:10
@joshcooper joshcooper marked this pull request as draft June 28, 2025 05:11
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.

1 participant