-
Notifications
You must be signed in to change notification settings - Fork 130
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
Add puppet http api support #488
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -202,6 +202,7 @@ | |
|
||
# puppetca settings | ||
$puppetca = true | ||
$puppetca_split_configs = true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My eyes! My eyes! If only the parameter was |
||
$puppetca_provider = 'puppetca_hostname_whitelisting' | ||
$puppetca_listen_on = 'https' | ||
$puppetca_cmd = "${puppet_cmd} cert" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
--- | ||
# PuppetCA management | ||
# Can be true, false, or http/https to enable just one of the protocols | ||
:enabled: <%= @module_enabled %> | ||
<% unless scope.lookupvar("foreman_proxy::puppetca_split_configs") -%> | ||
:ssldir: <%= scope.lookupvar("foreman_proxy::ssldir") %> | ||
<% end -%> | ||
|
||
# valid providers: | ||
# - puppetca_hostname_whitelisting (verify CSRs based on a hostname whitelist) | ||
# - puppetca_token_whitelisting (verify CSRs based on a token whitelist) | ||
:use_provider: <%= scope.lookupvar("foreman_proxy::puppetca_provider") %> | ||
<% if scope.lookupvar("foreman_proxy::puppetca_split_configs") -%> | ||
|
||
# Puppet version used | ||
:puppet_version: <%= @puppetversion %> | ||
<% end -%> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
# URL of the puppet master itself for API requests. | ||
:puppet_url: <%= scope.lookupvar("foreman_proxy::puppet_url") %> | ||
# | ||
# SSL certificates used to access the CA API. | ||
:puppet_ssl_ca: <%= scope.lookupvar("foreman_proxy::puppet_ssl_ca") %> | ||
:puppet_ssl_cert: <%= scope.lookupvar("foreman_proxy::puppet_ssl_cert") %> | ||
:puppet_ssl_key: <%= scope.lookupvar("foreman_proxy::puppet_ssl_key") %> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
:ssldir: <%= scope.lookupvar("foreman_proxy::ssldir") %> | ||
#:puppetca_use_sudo: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does having these parameters here commented out serve any purpose? If they're worth including here, they should probably also go in |
||
#:sudo_command: /usr/bin/sudo |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<% if scope.lookupvar("foreman_proxy::puppetca") -%> | ||
<% if @puppetca_sudo -%> | ||
<%= scope.lookupvar("foreman_proxy::user") %> ALL = (root) NOPASSWD : <%= scope.lookupvar("foreman_proxy::puppetca_cmd") %> * | ||
<% end -%> | ||
<% if scope.lookupvar("foreman_proxy::puppet") and scope.lookupvar("foreman_proxy::puppetrun_provider") == 'puppetrun' -%> | ||
<% if @puppetrun_sudo -%> | ||
<%= scope.lookupvar("foreman_proxy::user") %> ALL = (<%= scope.lookupvar("foreman_proxy::puppet_user") %>) NOPASSWD : <%= scope.lookupvar("foreman_proxy::puppetrun_cmd") %> * | ||
<% end -%> | ||
Defaults:<%= scope.lookupvar("foreman_proxy::user") %> !requiretty |
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 took me a little while to understand what was meant by 'split config'. Looking back and forth between this and at the smart proxy PR before I really understood. I can't think of a better parameter name or wording though!
Some extra confusion might also come from what is a 'ca provider'? You appear to be given a choice of 2 providers.
but then depending on your puppet version you'll automatically either use
puppetca_http_api
orpuppetca_puppet_cert
'providers'.