Skip to content

Commit

Permalink
Merge pull request #55 from bastelfreak/foo
Browse files Browse the repository at this point in the history
Simplify domain_join_password logic
  • Loading branch information
mattock authored Nov 28, 2023
2 parents 302c13d + 53ca79b commit 46d50ee
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
7 changes: 1 addition & 6 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
Boolean $configure_sshd = true,
Array[String] $custom_dns_forwarders = [],
String[1] $domain_join_principal = 'admin',
Optional[String[1]] $domain_join_password = undef,
Optional[String[1]] $domain_join_password = $directory_services_password,
Boolean $enable_dns_updates = false,
Boolean $enable_hostname = true,
Boolean $enable_ip_address = false,
Expand Down Expand Up @@ -219,11 +219,6 @@
"@${final_realm}"
)

$final_domain_join_password = $domain_join_password ? {
undef => $directory_services_password,
default => $domain_join_password,
}

if $ipa_role == 'client' {
$final_configure_dns_server = false
} else {
Expand Down
2 changes: 1 addition & 1 deletion manifests/install/client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
--realm=${easy_ipa::final_realm} \
--domain=${easy_ipa::domain} \
--principal='${easy_ipa::domain_join_principal}' \
--password='${easy_ipa::final_domain_join_password}' \
--password='${easy_ipa::domain_join_password}' \
${client_install_cmd_opts_dns_updates} \
${client_install_cmd_opts_hostname} \
${client_install_cmd_opts_mkhomedir} \
Expand Down
2 changes: 1 addition & 1 deletion manifests/install/server/replica.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
$replica_install_cmd = "\
/usr/sbin/ipa-replica-install \
--principal=${easy_ipa::domain_join_principal} \
--admin-password='${easy_ipa::final_domain_join_password}' \
--admin-password='${easy_ipa::domain_join_password}' \
${easy_ipa::install::server::server_install_cmd_opts_hostname} \
--realm=${easy_ipa::final_realm} \
--domain=${easy_ipa::domain} \
Expand Down
2 changes: 1 addition & 1 deletion manifests/validate_params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}

if $easy_ipa::ipa_role != 'master' { # if replica or client
unless $easy_ipa::final_domain_join_password {
unless $easy_ipa::domain_join_password {
fail("When creating a ${easy_ipa::ipa_role} the parameter named domain_join_password cannot be empty.")
}
unless $easy_ipa::ipa_master_fqdn {
Expand Down

0 comments on commit 46d50ee

Please sign in to comment.