Skip to content

Commit 1c57090

Browse files
committed
Migrate ERB templates to EPP
Fixes #152
1 parent 19fce8e commit 1c57090

File tree

5 files changed

+208
-112
lines changed

5 files changed

+208
-112
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
* Wed Nov 27 2024 Steven Pritchard <[email protected]> - 7.12.1
2+
- Migrate ERB templates to EPP (#152)
3+
14
* Mon Nov 18 2024 dpavlotzky <[email protected]> - 7.12.0
25
- Add "ad" option to autofs_provider list (#147)
36

manifests/domain.pp

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

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.12.0",
3+
"version": "7.12.1",
44
"author": "SIMP Team",
55
"summary": "Manages SSSD",
66
"license": "Apache-2.0",

templates/domain.epp

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

templates/domain.erb

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

0 commit comments

Comments
 (0)