Skip to content

Commit

Permalink
Change existing Kafo type definitions to Puppet 4 types (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
stbenjam authored Jan 11, 2017
1 parent e0f6d24 commit b219b79
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 16 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ gem 'puppet-blacksmith', '>= 3.1.0', {"groups"=>["development"]}
gem 'json', '~> 1.0', {"platforms"=>["ruby_19"], "groups"=>["test"]}
gem 'json_pure', '~> 1.0', {"platforms"=>["ruby_19"], "groups"=>["test"]}
gem 'metadata-json-lint'
gem 'kafo_module_lint'

# vim:ft=ruby
5 changes: 5 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,9 @@ PuppetLintParamDocs.define_selective do |config|
config.pattern = ["manifests/foreman_proxy_content.pp", "manifests/init.pp"]
end

require 'kafo_module_lint/tasks'
KafoModuleLint::RakeTask.new do |config|
config.pattern = ["manifests/foreman_proxy_content.pp", "manifests/init.pp"]
end

task :default => [:validate, :lint, :spec]
9 changes: 6 additions & 3 deletions manifests/foreman_proxy_content.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
#
# === Parameters:
#
# $parent_fqdn:: fqdn of the parent node. Does not usually
# $parent_fqdn:: FQDN of the parent node. Does not usually
# need to be set.
# type:Optional[String]
#
# $foreman_proxy_fqdn:: fqdn of the foreman proxy. REQUIRED
# $foreman_proxy_fqdn:: FQDN of the foreman proxy
# type:String
#
# $certs_tar:: path to tar file with certs to generate. REQUIRED
# $certs_tar:: Path to tar file with certs to generate
# type:Optional[Stdlib::Absolutepath]
#
class certs::foreman_proxy_content (
$parent_fqdn = $fqdn,
Expand Down
38 changes: 25 additions & 13 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,73 +8,85 @@
#
# $node_fqdn:: The fqdn of the host the generated certificates
# should be for
# type:String
#
# $server_ca_cert:: Path to the CA that issued the ssl certificates for https
# if not specified, the default CA will be used
# type:Optional[Stdlib::Absolutepath]
#
# $server_cert:: Path to the ssl certificate for https
# if not specified, the default CA will generate one
# type:Optional[Stdlib::Absolutepath]
#
# $server_key:: Path to the ssl key for https
# if not specified, the default CA will generate one
# type:Optional[Stdlib::Absolutepath]
#
# $server_cert_req:: Path to the ssl certificate request for https
# if not specified, the default CA will generate one
# type:Optional[Stdlib::Absolutepath]
#
# === Advanced parameters:
#
# $log_dir:: Where the log files should go
# type:Stdlib::Absolutepath
#
# $generate:: Should the generation of the certs be part of the
# configuration
# type: boolean
# type:Boolean
#
# $regenerate:: Force regeneration of the certificates (excluding
# ca certificates)
# type: boolean
# type:Boolean
#
# $regenerate_ca:: Force regeneration of the ca certificate
# type: boolean
# type:Boolean
#
# $deploy:: Deploy the certs on the configured system. False means
# we want apply it on a different system
# type: boolean
# type:Boolean
#
# $ca_common_name:: Common name for the generated CA certificate
# type: string
# type:String
#
# $country:: Country attribute for managed certificates
# type: string
# type:String[2]
#
# $state:: State attribute for managed certificates
# type: string
# type:String
#
# $city:: City attribute for managed certificates
# type: string
# type:String
#
# $org:: Org attribute for managed certificates
# type: string
# type:String
#
# $org_unit:: Org unit attribute for managed certificates
# type: string
# type:String
#
# $expiration:: Expiration attribute for managed certificates
# type: string
# type:String
#
# $ca_expiration:: Ca expiration attribute for managed certificates
# type: string
# $ca_expiration:: CA expiration attribute for managed certificates
# type:String
#
# $pki_dir:: The PKI directory under which to place certs
# type:Stdlib::Absolutepath
#
# $ssl_build_dir:: The directory where SSL keys, certs and RPMs will be generated
# type:Stdlib::Absolutepath
#
# $user:: The system user name who should own the certs
# type:String
#
# $group:: The group who should own the certs
# type:String
#
# $default_ca_name:: The name of the default CA
# type:String
#
# $server_ca_name:: The name of the server CA (used for https)
# type:String
#
class certs (

Expand Down

0 comments on commit b219b79

Please sign in to comment.