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

Move cert_name parameter default to module data #126

Merged
merged 1 commit into from
Jun 5, 2024
Merged
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
2 changes: 2 additions & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ icinga::agent::logging_level: warning
icinga::agentless::user: icinga
icinga::agentless::manage_user: true
icinga::agentless::ssh_key_type: rsa

icinga::cert_name: "%{facts.networking.fqdn}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite understand this change. Do you do this because you want to use icinga::cert_name within other Hiera values?

Copy link
Contributor Author

@lbetz lbetz Jun 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct, like in a profile class for icinga objects

profile::icinga::objects:
  Host:
    "%{lookup('icinga::cert_name')}"
      attribute1: value1
      attribute2: valie2

and relize these objects in this class.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@
Boolean $ca,
String $this_zone,
Hash[String, Hash] $zones,
String $cert_name,
Optional[Stdlib::Host] $ca_server = undef,
Optional[Icinga::Secret] $ticket_salt = undef,
Array[String] $extra_packages = [],
Enum['file', 'syslog', 'eventlog'] $logging_type = 'file',
Optional[Icinga::LogLevel] $logging_level = undef,
Optional[Icinga::Secret] $ssh_private_key = undef,
Optional[Enum['ecdsa','ed25519','rsa']] $ssh_key_type = undef,
String $cert_name = $facts['networking']['fqdn'],
Boolean $prepare_web = false,
Variant[Boolean, String] $confd = false,
) {
Expand Down
Loading