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
Conversation
tasks/supportuser.sh
Outdated
|
||
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" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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"}
Co-authored-by: Dylan <dylanratcliffe@outlook.com>
adds client tools declaration,
and a script to create a default user and role, with minimal permissions