Skip to content

Commit 99dfe4e

Browse files
committed
Migrate ERB templates to EPP
Fixes #152
1 parent fda9111 commit 99dfe4e

File tree

5 files changed

+212
-117
lines changed

5 files changed

+212
-117
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
* Tue Sep 23 2025 Steven Pritchard <[email protected]> - 7.14.0
2+
- Migrate ERB templates to EPP (#152)
3+
14
* Wed Jun 11 2025 Chris Tessmer <[email protected]> - 7.13.1
25
- Fix rubocop issues
36

manifests/domain.pp

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,55 @@
123123
Optional[String] $ldap_user_search_filter = undef,
124124
Optional[Hash] $custom_options = undef
125125
) {
126-
127126
sssd::config::entry { "puppet_domain_${name}":
128-
content => template('sssd/domain.erb')
127+
content => epp(
128+
'sssd/domain.epp',
129+
{
130+
'id_provider' => $id_provider,
131+
'debug_level' => $debug_level,
132+
'debug_timestamps' => $debug_timestamps,
133+
'debug_microseconds' => $debug_microseconds,
134+
'description' => $description,
135+
'min_id' => $min_id,
136+
'max_id' => $max_id,
137+
'enumerate' => $enumerate,
138+
'subdomain_enumerate' => $subdomain_enumerate,
139+
'force_timeout' => $force_timeout,
140+
'entry_cache_timeout' => $entry_cache_timeout,
141+
'entry_cache_user_timeout' => $entry_cache_user_timeout,
142+
'entry_cache_group_timeout' => $entry_cache_group_timeout,
143+
'entry_cache_netgroup_timeout' => $entry_cache_netgroup_timeout,
144+
'entry_cache_service_timeout' => $entry_cache_service_timeout,
145+
'entry_cache_sudo_timeout' => $entry_cache_sudo_timeout,
146+
'entry_cache_autofs_timeout' => $entry_cache_autofs_timeout,
147+
'entry_cache_ssh_host_timeout' => $entry_cache_ssh_host_timeout,
148+
'refresh_expired_interval' => $refresh_expired_interval,
149+
'cache_credentials' => $cache_credentials,
150+
'account_cache_expiration' => $account_cache_expiration,
151+
'pwd_expiration_warning' => $pwd_expiration_warning,
152+
'use_fully_qualified_names' => $use_fully_qualified_names,
153+
'ignore_group_members' => $ignore_group_members,
154+
'access_provider' => $access_provider,
155+
'auth_provider' => $auth_provider,
156+
'chpass_provider' => $chpass_provider,
157+
'sudo_provider' => $sudo_provider,
158+
'selinux_provider' => $selinux_provider,
159+
'subdomains_provider' => $subdomains_provider,
160+
'autofs_provider' => $autofs_provider,
161+
'hostid_provider' => $hostid_provider,
162+
're_expression' => $re_expression,
163+
'full_name_format' => $full_name_format,
164+
'lookup_family_order' => $lookup_family_order,
165+
'dns_resolver_timeout' => $dns_resolver_timeout,
166+
'dns_discovery_domain' => $dns_discovery_domain,
167+
'override_gid' => $override_gid,
168+
'case_sensitive' => $case_sensitive,
169+
'proxy_fast_alias' => $proxy_fast_alias,
170+
'realmd_tags' => $realmd_tags,
171+
'proxy_pam_target' => $proxy_pam_target,
172+
'proxy_lib_name' => $proxy_lib_name,
173+
'ldap_user_search_filter' => $ldap_user_search_filter,
174+
},
175+
)
129176
}
130177
}

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simp-sssd",
3-
"version": "7.13.1",
3+
"version": "7.14.0",
44
"author": "SIMP Team",
55
"summary": "Manages SSSD",
66
"license": "Apache-2.0",

templates/domain.epp

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
<% |
2+
Sssd::IdProvider $id_provider,
3+
Optional[Sssd::DebugLevel] $debug_level,
4+
Boolean $debug_timestamps,
5+
Boolean $debug_microseconds,
6+
Optional[String] $description,
7+
Integer[0] $min_id,
8+
Integer[0] $max_id,
9+
Boolean $enumerate,
10+
Boolean $subdomain_enumerate,
11+
Optional[Integer] $force_timeout,
12+
Optional[Integer] $entry_cache_timeout,
13+
Optional[Integer] $entry_cache_user_timeout,
14+
Optional[Integer] $entry_cache_group_timeout,
15+
Optional[Integer] $entry_cache_netgroup_timeout,
16+
Optional[Integer] $entry_cache_service_timeout,
17+
Optional[Integer] $entry_cache_sudo_timeout,
18+
Optional[Integer] $entry_cache_autofs_timeout,
19+
Optional[Integer] $entry_cache_ssh_host_timeout,
20+
Optional[Integer] $refresh_expired_interval,
21+
Boolean $cache_credentials,
22+
Integer[0] $account_cache_expiration,
23+
Optional[Integer[0]] $pwd_expiration_warning,
24+
Boolean $use_fully_qualified_names,
25+
Boolean $ignore_group_members,
26+
Optional[Sssd::AccessProvider] $access_provider,
27+
Optional[Sssd::AuthProvider] $auth_provider,
28+
Optional[Sssd::ChpassProvider] $chpass_provider,
29+
Optional[Enum['ldap', 'ipa','ad','none']] $sudo_provider,
30+
Optional[Enum['ipa', 'none']] $selinux_provider,
31+
Optional[Enum['ipa', 'ad','none']] $subdomains_provider,
32+
Optional[Enum['ad', 'ldap', 'ipa','none']] $autofs_provider,
33+
Optional[Enum['ipa', 'none']] $hostid_provider,
34+
Optional[String] $re_expression,
35+
Optional[String] $full_name_format,
36+
Optional[String] $lookup_family_order,
37+
Integer[0] $dns_resolver_timeout,
38+
Optional[String] $dns_discovery_domain,
39+
Optional[String] $override_gid,
40+
Variant[Boolean,Enum['preserving']] $case_sensitive,
41+
Boolean $proxy_fast_alias,
42+
Optional[String] $realmd_tags,
43+
Optional[String] $proxy_pam_target,
44+
Optional[String] $proxy_lib_name,
45+
Optional[String] $ldap_user_search_filter,
46+
Optional[Hash] $custom_options,
47+
| -%>
48+
49+
# sssd::domain <%= $name %>
50+
[domain/<%= $name %>]
51+
<% if $debug_level { -%>
52+
debug_level = <%= $debug_level %>
53+
<% } -%>
54+
debug_timestamps = <%= $debug_timestamps %>
55+
debug_microseconds = <%= $debug_microseconds %>
56+
<% if $description { -%>
57+
description = <%= $description %>
58+
<% } -%>
59+
min_id = <%= $min_id %>
60+
max_id = <%= $max_id %>
61+
enumerate = <%= $enumerate %>
62+
<% if $subdomain_enumerate { -%>
63+
subdomain_enumerate = <%= $subdomain_enumerate %>
64+
<% } -%>
65+
<% if $force_timeout { -%>
66+
force_timeout = <%= $force_timeout %>
67+
<% } -%>
68+
<% if $entry_cache_timeout { -%>
69+
entry_cache_timeout = <%= $entry_cache_timeout %>
70+
<% } -%>
71+
<% if $entry_cache_user_timeout { -%>
72+
entry_cache_user_timeout = <%= $entry_cache_user_timeout %>
73+
<% } -%>
74+
<% if $entry_cache_group_timeout { -%>
75+
entry_cache_group_timeout = <%= $entry_cache_group_timeout %>
76+
<% } -%>
77+
<% if $entry_cache_netgroup_timeout { -%>
78+
entry_cache_netgroup_timeout = <%= $entry_cache_netgroup_timeout %>
79+
<% } -%>
80+
<% if $entry_cache_service_timeout { -%>
81+
entry_cache_service_timeout = <%= $entry_cache_service_timeout %>
82+
<% } -%>
83+
<% if $entry_cache_sudo_timeout { -%>
84+
entry_cache_sudo_timeout = <%= $entry_cache_sudo_timeout %>
85+
<% } -%>
86+
<% if $entry_cache_autofs_timeout { -%>
87+
entry_cache_autofs_timeout = <%= $entry_cache_autofs_timeout %>
88+
<% } -%>
89+
<% if $entry_cache_ssh_host_timeout { -%>
90+
entry_cache_ssh_host_timeout = <%= $entry_cache_ssh_host_timeout %>
91+
<% } -%>
92+
<% if $refresh_expired_interval { -%>
93+
refresh_expired_interval = <%= $refresh_expired_interval %>
94+
<% } -%>
95+
cache_credentials = <%= $cache_credentials %>
96+
account_cache_expiration = <%= $account_cache_expiration %>
97+
<% if $pwd_expiration_warning { -%>
98+
pwd_expiration_warning = <%= $pwd_expiration_warning %>
99+
<% } -%>
100+
use_fully_qualified_names = <%= $use_fully_qualified_names %>
101+
ignore_group_members = <%= $ignore_group_members %>
102+
id_provider = <%= $id_provider %>
103+
<% if $auth_provider { -%>
104+
auth_provider = <%= $auth_provider %>
105+
<% } -%>
106+
<% if $access_provider { -%>
107+
access_provider = <%= $access_provider %>
108+
<% } -%>
109+
<% if $chpass_provider { -%>
110+
chpass_provider = <%= $chpass_provider %>
111+
<% } -%>
112+
<% if $sudo_provider { -%>
113+
sudo_provider = <%= $sudo_provider %>
114+
<% } -%>
115+
<% if $selinux_provider { -%>
116+
selinux_provider = <%= $selinux_provider %>
117+
<% } -%>
118+
<% if $subdomains_provider { -%>
119+
subdomains_provider = <%= $subdomains_provider %>
120+
<% } -%>
121+
<% if $autofs_provider { -%>
122+
autofs_provider = <%= $autofs_provider %>
123+
<% } -%>
124+
<% if $hostid_provider { -%>
125+
hostid_provider = <%= $hostid_provider %>
126+
<% } -%>
127+
<% if $re_expression { -%>
128+
re_expression = <%= $re_expression %>
129+
<% } -%>
130+
<% if $full_name_format { -%>
131+
full_name_format = <%= $full_name_format %>
132+
<% } -%>
133+
<% if $lookup_family_order { -%>
134+
lookup_family_order = <%= $lookup_family_order %>
135+
<% } -%>
136+
dns_resolver_timeout = <%= $dns_resolver_timeout %>
137+
<% if $dns_discovery_domain { -%>
138+
dns_discovery_domain = <%= $dns_discovery_domain %>
139+
<% } -%>
140+
<% if $override_gid { -%>
141+
override_gid = <%= $override_gid %>
142+
<% } -%>
143+
case_sensitive = <%= $case_sensitive %>
144+
proxy_fast_alias = <%= $proxy_fast_alias %>
145+
<% if $realmd_tags { -%>
146+
realmd_tags = <%= $realmd_tags %>
147+
<% } -%>
148+
<% if $ldap_user_search_filter { -%>
149+
ldap_user_search_filter = <%= $ldap_user_search_filter %>
150+
<% } -%>
151+
<% if $proxy_pam_target { -%>
152+
proxy_pam_target = <%= $proxy_pam_target %>
153+
<% } -%>
154+
<% if $proxy_lib_name { -%>
155+
proxy_lib_name = <%= $proxy_lib_name %>
156+
<% } -%>
157+
<% $custom_options.each |$opt, $value| { -%>
158+
<%= $opt %> = <%= $value %>
159+
<% } -%>

templates/domain.erb

Lines changed: 0 additions & 114 deletions
This file was deleted.

0 commit comments

Comments
 (0)