Skip to content

Commit

Permalink
Migrate ERB templates to EPP
Browse files Browse the repository at this point in the history
Fixes #152
  • Loading branch information
silug committed Nov 27, 2024
1 parent 19fce8e commit a2ed52e
Show file tree
Hide file tree
Showing 5 changed files with 208 additions and 112 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* Wed Nov 27 2024 Steven Pritchard <[email protected]> - 7.12.1
- Migrate ERB templates to EPP (#152)

* Mon Nov 18 2024 dpavlotzky <[email protected]> - 7.12.0
- Add "ad" option to autofs_provider list (#147)

Expand Down
51 changes: 49 additions & 2 deletions manifests/domain.pp
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,55 @@
Optional[String] $proxy_lib_name = undef,
Optional[String] $ldap_user_search_filter = undef
) {

sssd::config::entry { "puppet_domain_${name}":
content => template('sssd/domain.erb')
content => epp(
'sssd/domain.erb',
{
'id_provider' => $id_provider,
'debug_level' => $debug_level,
'debug_timestamps' => $debug_timestamps,
'debug_microseconds' => $debug_microseconds,
'description' => $description,
'min_id' => $min_id,
'max_id' => $max_id,
'enumerate' => $enumerate,
'subdomain_enumerate' => $subdomain_enumerate,
'force_timeout' => $force_timeout,
'entry_cache_timeout' => $entry_cache_timeout,
'entry_cache_user_timeout' => $entry_cache_user_timeout,
'entry_cache_group_timeout' => $entry_cache_group_timeout,
'entry_cache_netgroup_timeout' => $entry_cache_netgroup_timeout,
'entry_cache_service_timeout' => $entry_cache_service_timeout,
'entry_cache_sudo_timeout' => $entry_cache_sudo_timeout,
'entry_cache_autofs_timeout' => $entry_cache_autofs_timeout,
'entry_cache_ssh_host_timeout' => $entry_cache_ssh_host_timeout,
'refresh_expired_interval' => $refresh_expired_interval,
'cache_credentials' => $cache_credentials,
'account_cache_expiration' => $account_cache_expiration,
'pwd_expiration_warning' => $pwd_expiration_warning,
'use_fully_qualified_names' => $use_fully_qualified_names,
'ignore_group_members' => $ignore_group_members,
'access_provider' => $access_provider,
'auth_provider' => $auth_provider,
'chpass_provider' => $chpass_provider,
'sudo_provider' => $sudo_provider,
'selinux_provider' => $selinux_provider,
'subdomains_provider' => $subdomains_provider,
'autofs_provider' => $autofs_provider,
'hostid_provider' => $hostid_provider,
're_expression' => $re_expression,
'full_name_format' => $full_name_format,
'lookup_family_order' => $lookup_family_order,
'dns_resolver_timeout' => $dns_resolver_timeout,
'dns_discovery_domain' => $dns_discovery_domain,
'override_gid' => $override_gid,
'case_sensitive' => $case_sensitive,
'proxy_fast_alias' => $proxy_fast_alias,
'realmd_tags' => $realmd_tags,
'proxy_pam_target' => $proxy_pam_target,
'proxy_lib_name' => $proxy_lib_name,
'ldap_user_search_filter' => $ldap_user_search_filter,
},
)
}
}
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simp-sssd",
"version": "7.12.0",
"version": "7.12.1",
"author": "SIMP Team",
"summary": "Manages SSSD",
"license": "Apache-2.0",
Expand Down
155 changes: 155 additions & 0 deletions templates/domain.epp
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
<% |
Sssd::IdProvider $id_provider,
Optional[Sssd::DebugLevel] $debug_level = undef,
Boolean $debug_timestamps = true,
Boolean $debug_microseconds = false,
Optional[String] $description = undef,
Integer[0] $min_id = 1,
Integer[0] $max_id = 0,
Boolean $enumerate = false,
Boolean $subdomain_enumerate = false,
Optional[Integer] $force_timeout = undef,
Optional[Integer] $entry_cache_timeout = undef,
Optional[Integer] $entry_cache_user_timeout = undef,
Optional[Integer] $entry_cache_group_timeout = undef,
Optional[Integer] $entry_cache_netgroup_timeout = undef,
Optional[Integer] $entry_cache_service_timeout = undef,
Optional[Integer] $entry_cache_sudo_timeout = undef,
Optional[Integer] $entry_cache_autofs_timeout = undef,
Optional[Integer] $entry_cache_ssh_host_timeout = undef,
Optional[Integer] $refresh_expired_interval = undef,
Boolean $cache_credentials = false,
Integer[0] $account_cache_expiration = 0,
Optional[Integer[0]] $pwd_expiration_warning = undef,
Boolean $use_fully_qualified_names = false,
Boolean $ignore_group_members = true,
Optional[Sssd::AccessProvider] $access_provider = undef,
Optional[Sssd::AuthProvider] $auth_provider = undef,
Optional[Sssd::ChpassProvider] $chpass_provider = undef,
Optional[Enum['ldap', 'ipa','ad','none']] $sudo_provider = undef,
Optional[Enum['ipa', 'none']] $selinux_provider = undef,
Optional[Enum['ipa', 'ad','none']] $subdomains_provider = undef,
Optional[Enum['ad', 'ldap', 'ipa','none']] $autofs_provider = undef,
Optional[Enum['ipa', 'none']] $hostid_provider = undef,
Optional[String] $re_expression = undef,
Optional[String] $full_name_format = undef,
Optional[String] $lookup_family_order = undef,
Integer[0] $dns_resolver_timeout = 5,
Optional[String] $dns_discovery_domain = undef,
Optional[String] $override_gid = undef,
Variant[Boolean,Enum['preserving']] $case_sensitive = true,
Boolean $proxy_fast_alias = false,
Optional[String] $realmd_tags = undef,
Optional[String] $proxy_pam_target = undef,
Optional[String] $proxy_lib_name = undef,
Optional[String] $ldap_user_search_filter = undef
| -%>

# sssd::domain <%= $name %>
[domain/<%= $name %>]
<% if $debug_level { -%>
debug_level = <%= $debug_level %>
<% } -%>
debug_timestamps = <%= $debug_timestamps %>
debug_microseconds = <%= $debug_microseconds %>
<% if $description { -%>
description = <%= $description %>
<% } -%>
min_id = <%= $min_id %>
max_id = <%= $max_id %>
enumerate = <%= $enumerate %>
<% if $subdomain_enumerate { -%>
subdomain_enumerate = <%= $subdomain_enumerate %>
<% } -%>
<% if $force_timeout { -%>
force_timeout = <%= $force_timeout %>
<% } -%>
<% if $entry_cache_timeout { -%>
entry_cache_timeout = <%= $entry_cache_timeout %>
<% } -%>
<% if $entry_cache_user_timeout { -%>
entry_cache_user_timeout = <%= $entry_cache_user_timeout %>
<% } -%>
<% if $entry_cache_group_timeout { -%>
entry_cache_group_timeout = <%= $entry_cache_group_timeout %>
<% } -%>
<% if $entry_cache_netgroup_timeout { -%>
entry_cache_netgroup_timeout = <%= $entry_cache_netgroup_timeout %>
<% } -%>
<% if $entry_cache_service_timeout { -%>
entry_cache_service_timeout = <%= $entry_cache_service_timeout %>
<% } -%>
<% if $entry_cache_sudo_timeout { -%>
entry_cache_sudo_timeout = <%= $entry_cache_sudo_timeout %>
<% } -%>
<% if $entry_cache_autofs_timeout { -%>
entry_cache_autofs_timeout = <%= $entry_cache_autofs_timeout %>
<% } -%>
<% if $entry_cache_ssh_host_timeout { -%>
entry_cache_ssh_host_timeout = <%= $entry_cache_ssh_host_timeout %>
<% } -%>
<% if $refresh_expired_interval { -%>
refresh_expired_interval = <%= $refresh_expired_interval %>
<% } -%>
cache_credentials = <%= $cache_credentials %>
account_cache_expiration = <%= $account_cache_expiration %>
<% if $pwd_expiration_warning { -%>
pwd_expiration_warning = <%= $pwd_expiration_warning %>
<% } -%>
use_fully_qualified_names = <%= $use_fully_qualified_names %>
ignore_group_members = <%= $ignore_group_members %>
id_provider = <%= $id_provider %>
<% if $auth_provider { -%>
auth_provider = <%= $auth_provider %>
<% } -%>
<% if $access_provider { -%>
access_provider = <%= $access_provider %>
<% } -%>
<% if $chpass_provider { -%>
chpass_provider = <%= $chpass_provider %>
<% } -%>
<% if $sudo_provider { -%>
sudo_provider = <%= $sudo_provider %>
<% } -%>
<% if $selinux_provider { -%>
selinux_provider = <%= $selinux_provider %>
<% } -%>
<% if $subdomains_provider { -%>
subdomains_provider = <%= $subdomains_provider %>
<% } -%>
<% if $autofs_provider { -%>
autofs_provider = <%= $autofs_provider %>
<% } -%>
<% if $hostid_provider { -%>
hostid_provider = <%= $hostid_provider %>
<% } -%>
<% if $re_expression { -%>
re_expression = <%= $re_expression %>
<% } -%>
<% if $full_name_format { -%>
full_name_format = <%= $full_name_format %>
<% } -%>
<% if $lookup_family_order { -%>
lookup_family_order = <%= $lookup_family_order %>
<% } -%>
dns_resolver_timeout = <%= $dns_resolver_timeout %>
<% if $dns_discovery_domain { -%>
dns_discovery_domain = <%= $dns_discovery_domain %>
<% } -%>
<% if $override_gid { -%>
override_gid = <%= $override_gid %>
<% } -%>
case_sensitive = <%= $case_sensitive %>
proxy_fast_alias = <%= $proxy_fast_alias %>
<% if $realmd_tags { -%>
realmd_tags = <%= $realmd_tags %>
<% } -%>
<% if $ldap_user_search_filter { -%>
ldap_user_search_filter = <%= $ldap_user_search_filter %>
<% } -%>
<% if $proxy_pam_target { -%>
proxy_pam_target = <%= $proxy_pam_target %>
<% } -%>
<% if $proxy_lib_name { -%>
proxy_lib_name = <%= $proxy_lib_name %>
<% } -%>
109 changes: 0 additions & 109 deletions templates/domain.erb

This file was deleted.

0 comments on commit a2ed52e

Please sign in to comment.