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

Feature - PE Client tools Deployment #12

Merged
merged 5 commits into from Jan 5, 2021
Merged

Feature - PE Client tools Deployment #12

merged 5 commits into from Jan 5, 2021

Conversation

MartyEwings
Copy link
Collaborator

adds client tools declaration,

and a script to create a default user and role, with minimal permissions

@MartyEwings MartyEwings added the enhancement New feature or request label Dec 29, 2020
@MartyEwings MartyEwings added this to the Feature Complete - No VPN milestone Dec 29, 2020
@MartyEwings MartyEwings added this to To Do in RSAN Development via automation Dec 29, 2020
@MartyEwings MartyEwings linked an issue Dec 29, 2020 that may be closed by this pull request

curl -X POST -H 'Content-Type: application/json' --cert $(puppet config print hostcert) --key $(puppet config print hostprivkey) --cacert $(puppet config print localcacert) https://$(hostname -f):4433/rbac-api/v1/users -d "{\"login\":\"pesupport\",\"email\":\"support@puppet.com\",\"role_ids\": [],\"display_name\":\"Puppet Enterprise Support\", \"password\": \"$password\"}"

echo "password for pesupport account is $password"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MartyEwings Do we intend to to use the output of this in a plan at all, or is it purely informational? If it's a plan then I'd recommend formatting it as JSON so that bolt does the parsing for us i.e.

echo '{"status":"created","password":"$password"}'

That way it will be parsed and returned as a Puppet data structure natively

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its not going to be used in a plan, but it couldn't hurt to future proof, ill make the changes

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2021-01-04 at 14 53 06
tested and working

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll need literal double quotes in the output to be valid JSON, like around each string. You'll probably have to escape the double quotes so that they actually end up in the output e.g.

{"status":"created","password":"hunter2"}

tasks/supportuser.sh Outdated Show resolved Hide resolved
Co-authored-by: Dylan <dylanratcliffe@outlook.com>
@MartyEwings MartyEwings merged commit 7e0f84d into main Jan 5, 2021
RSAN Development automation moved this from To Do to complete Jan 5, 2021
@MartyEwings MartyEwings deleted the marty branch January 5, 2021 14:28
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
Development

Successfully merging this pull request may close these issues.

Feature - PE Client tools Deployment
2 participants