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

Add the option display_name to template #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions manifests/current.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,29 @@
# Whether to obfuscate IP addresses.
# @param obfuscate_hostname
# Whether to obfuscate hostname.
# @param display_name
# Display name for this system.
#
# @author Lindani Phiri <[email protected]>
# @author Dan Varga <[email protected]>
#
# Copyright 2015 Red Hat Inc.
#
class access_insights_client::current (
$package_name = 'insights-client',
String $package_name = 'insights-client',
Optional[Enum['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']] $log_level = undef,
$auto_config = 'True',
$authmethod = undef,
$username = undef,
$password = undef,
$base_url = undef,
$proxy = undef,
$cert_verify = undef,
$gpg = undef,
$auto_update = undef,
$obfuscate = undef,
$obfuscate_hostname = undef,
Boolean $auto_config = 'True',
Optional[Enum['BASIC','CERT']] $authmethod = undef,
Optional[String] $username = undef,
Optional[String] $password = undef,
Optional[Stdlib::Fqdn] $base_url = undef,
Optional[Stdlib::HTTPUrl] $proxy = undef,
Optional[Boolean] $cert_verify = undef,
Optional[Boolean] $gpg = undef,
Optional[Boolean] $auto_update = undef,
Optional[Boolean] $obfuscate = undef,
Optional[Boolean] $obfuscate_hostname = undef,
Stdlib::Host $display_name = undef,
) {
package { $package_name:
ensure => installed,
Expand Down
30 changes: 19 additions & 11 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# The access insights module is intended to deploy and configure the Red Hat
# Access Insights client.
#
# @param package_name
# Name of the package to install.
# @param log_level
# Change log level, valid options DEBUG, INFO, WARNING, ERROR, CRITICAL.
# @param auto_config
Expand Down Expand Up @@ -30,25 +32,29 @@
# @param deployment_style
# How the module should be deploy. Can be undef (auto),
# current (6.10+ or 7.5+) or old.
# @param display_name
# Display name for the client.
#
# @author Lindani Phiri <[email protected]>
# @author Dan Varga <[email protected]>
#
# Copyright 2015 Red Hat Inc.
#
class access_insights_client (
String $package_name = 'insights-client',
Optional[Enum['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']] $log_level = undef,
$auto_config = 'True',
$authmethod = undef,
$username = undef,
$password = undef,
$base_url = undef,
$proxy = undef,
$cert_verify = undef,
$gpg = undef,
$auto_update = undef,
$obfuscate = undef,
$obfuscate_hostname = undef,
Boolean $auto_config = 'True',
Optional[Enum['BASIC','CERT']] $authmethod = undef,
Optional[String] $username = undef,
Optional[String] $password = undef,
Optional[Stdlib::Fqdn] $base_url = undef,
Optionla[Stdlib::HTTPUrl] $proxy = undef,
Optional[Boolean] $cert_verify = undef,
Optional[Boolean] $gpg = undef,
Optional[Boolean] $auto_update = undef,
Optional[Boolean] $obfuscate = undef,
Optional[Boolean] $obfuscate_hostname = undef,
Optional[Stdlib::Host] $display_name = undef,
Optional[Enum['current', 'old']] $deployment_style = undef,
) {
if $deployment_style {
Expand All @@ -63,6 +69,7 @@
}

class { "access_insights_client::${class_name}":
package_name => $package_name,
log_level => $log_level,
auto_config => $auto_config,
authmethod => $authmethod,
Expand All @@ -75,6 +82,7 @@
auto_update => $auto_update,
obfuscate => $obfuscate,
obfuscate_hostname => $obfuscate_hostname,
display_name => $display_name,
}
contain "access_insights_client::${class_name}"
}
29 changes: 16 additions & 13 deletions manifests/old.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,29 @@
# Whether to obfuscate IP addresses.
# @param obfuscate_hostname
# Whether to obfuscate hostname.
# @param display_name
# Display name for this system.
#
# @author Lindani Phiri <[email protected]>
# @author Dan Varga <[email protected]>
#
# Copyright 2015 Red Hat Inc.
#
class access_insights_client::old (
$package_name = 'redhat-access-insights',
$log_level = undef,
$auto_config = 'True',
$authmethod = undef,
$username = undef,
$password = undef,
$base_url = undef,
$proxy = undef,
$cert_verify = undef,
$gpg = undef,
$auto_update = undef,
$obfuscate = undef,
$obfuscate_hostname = undef,
String $package_name = 'insights-client',
Optional[Enum['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']] $log_level = undef,
Boolean $auto_config = 'True',
Optional[Enum['BASIC','CERT']] $authmethod = undef,
Optional[String] $username = undef,
Optional[String] $password = undef,
Optional[Stdlib::Fqdn] $base_url = undef,
Optional[Stdlib::HTTPUrl] $proxy = undef,
Optional[Boolean] $cert_verify = undef,
Optional[Boolean] $gpg = undef,
Optional[Boolean] $auto_update = undef,
Optional[Boolean] $obfuscate = undef,
Optional[Boolean] $obfuscate_hostname = undef,
Optional[Stdlib::Host] $display_name = undef,
) {
package { $package_name:
ensure => installed,
Expand Down
8 changes: 3 additions & 5 deletions templates/redhat-access-insights.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ obfuscate=<%= @obfuscate %>
obfuscate_hostname=<%= @obfuscate_hostname %>
<%- end -%>





<%- if @display_name -%>
display_name=<%= @display_name %>
<%- end -%>