Skip to content

Commit

Permalink
Move existing Puppet 4 data types to class parameters
Browse files Browse the repository at this point in the history
Almost all unchanged from the existing Kafo documentation, except where
'UNSET' was used. The types now permit the string value 'UNSET'.

Changes make mandatory class parameters optional in 3f5238c were also
reverted.
  • Loading branch information
domcleal authored and mmoll committed Apr 8, 2017
1 parent 859472d commit ca74301
Show file tree
Hide file tree
Showing 20 changed files with 174 additions and 307 deletions.
27 changes: 9 additions & 18 deletions manifests/cli.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,36 @@
# === Parameters:
#
# $foreman_url:: URL on which Foreman runs
# type:Optional[Stdlib::HTTPUrl]
#
# $username:: Username for authentication
# type:Optional[String]
#
# $password:: Password for authentication
# type:Optional[String]
#
# === Advanced parameters:
#
# $manage_root_config:: Whether to manage /root/.hammer configuration.
# type:Boolean
#
# $refresh_cache:: Check API documentation cache status on each request
# type:Boolean
#
# $request_timeout:: API request timeout, set -1 for infinity
# type:Integer[-1]
#
# $ssl_ca_file:: Path to SSL certificate authority
# type:Optional[Stdlib::Absolutepath]
#
# $hammer_plugin_prefix:: Hammer plugin package prefix based normally on platform
# type:String
#
# $version:: foreman-cli package version, it's passed to ensure parameter of package resource
# can be set to specific version number, 'latest', 'present' etc.
# type:String
#
class foreman::cli (
$foreman_url = $::foreman::cli::params::foreman_url,
$version = $::foreman::cli::params::version,
$manage_root_config = $::foreman::cli::params::manage_root_config,
$username = $::foreman::cli::params::username,
$password = $::foreman::cli::params::password,
$refresh_cache = $::foreman::cli::params::refresh_cache,
$request_timeout = $::foreman::cli::params::request_timeout,
$ssl_ca_file = $::foreman::cli::params::ssl_ca_file,
$hammer_plugin_prefix = $::foreman::cli::params::hammer_plugin_prefix,
Optional[Stdlib::HTTPUrl] $foreman_url = $::foreman::cli::params::foreman_url,
String $version = $::foreman::cli::params::version,
Boolean $manage_root_config = $::foreman::cli::params::manage_root_config,
Optional[String] $username = $::foreman::cli::params::username,
Optional[String] $password = $::foreman::cli::params::password,
Boolean $refresh_cache = $::foreman::cli::params::refresh_cache,
Integer[-1] $request_timeout = $::foreman::cli::params::request_timeout,
Optional[Stdlib::Absolutepath] $ssl_ca_file = $::foreman::cli::params::ssl_ca_file,
String $hammer_plugin_prefix = $::foreman::cli::params::hammer_plugin_prefix,
) inherits foreman::cli::params {
# Inherit URL & auth parameters from foreman class if possible
#
Expand Down
3 changes: 1 addition & 2 deletions manifests/compute/ec2.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
# === Parameters:
#
# $version:: Package version to install, defaults to installed
# type:Optional[String]
#
class foreman::compute::ec2($version = 'installed') {
class foreman::compute::ec2(String $version = 'installed') {
package { 'foreman-ec2':
ensure => $version,
tag => [ 'foreman-compute', ],
Expand Down
3 changes: 1 addition & 2 deletions manifests/compute/foreman_compute.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
# === Parameters:
#
# $version:: Package version to install, defaults to installed
# type:Optional[String]
#
class foreman::compute::foreman_compute ( $version = 'installed' ) {
class foreman::compute::foreman_compute(String $version = 'installed') {
package { 'foreman-compute':
ensure => $version,
tag => [ 'foreman-compute', ],
Expand Down
3 changes: 1 addition & 2 deletions manifests/compute/gce.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
# === Parameters:
#
# $version:: Package version to install, defaults to installed
# type:Optional[String]
#
class foreman::compute::gce ( $version = 'installed' ) {
class foreman::compute::gce(String $version = 'installed') {
package { 'foreman-gce':
ensure => $version,
tag => [ 'foreman-compute', ],
Expand Down
3 changes: 1 addition & 2 deletions manifests/compute/libvirt.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
# === Parameters:
#
# $version:: Package version to install, defaults to installed
# type:Optional[String]
#
class foreman::compute::libvirt ( $version = 'installed' ) {
class foreman::compute::libvirt(String $version = 'installed') {
package { 'foreman-libvirt':
ensure => $version,
tag => [ 'foreman-compute', ],
Expand Down
3 changes: 1 addition & 2 deletions manifests/compute/openstack.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
# === Parameters:
#
# $version:: Package version to install, defaults to installed
# type:Optional[String]
#
class foreman::compute::openstack($version = 'installed') {
class foreman::compute::openstack(String $version = 'installed') {
package { 'foreman-openstack':
ensure => $version,
tag => [ 'foreman-compute', ],
Expand Down
3 changes: 1 addition & 2 deletions manifests/compute/ovirt.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
# === Parameters:
#
# $version:: Package version to install, defaults to installed
# type:Optional[String]
#
class foreman::compute::ovirt ( $version = 'installed' ) {
class foreman::compute::ovirt(String $version = 'installed') {
package { 'foreman-ovirt':
ensure => $version,
tag => [ 'foreman-compute', ],
Expand Down
3 changes: 1 addition & 2 deletions manifests/compute/rackspace.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
# === Parameters:
#
# $version:: Package version to install, defaults to installed
# type:Optional[String]
#
class foreman::compute::rackspace ( $version = 'installed' ) {
class foreman::compute::rackspace(String $version = 'installed') {
package { 'foreman-rackspace':
ensure => $version,
tag => [ 'foreman-compute', ],
Expand Down
3 changes: 1 addition & 2 deletions manifests/compute/vmware.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
# === Parameters:
#
# $version:: Package version to install, defaults to installed
# type:Optional[String]
#
class foreman::compute::vmware ( $version = 'installed' ) {
class foreman::compute::vmware(String $version = 'installed') {
package { 'foreman-vmware':
ensure => $version,
tag => [ 'foreman-compute', ],
Expand Down
Loading

0 comments on commit ca74301

Please sign in to comment.