chore: prevent empty lines #135
@ -20,20 +20,7 @@ define glauth::obj::user (
|
|||||||
}
|
}
|
||||||
concat::fragment { "glauth_user_${user_name}":
|
concat::fragment { "glauth_user_${user_name}":
|
||||||
target => $config_path,
|
target => $config_path,
|
||||||
content => epp('glauth/obj/user.epp', {
|
content => template('glauth/obj/user.erb'),
|
||||||
'name' => $user_name,
|
|
||||||
'givenname' => $givenname,
|
|
||||||
'sn' => $sn,
|
|
||||||
'mail' => $mail,
|
|
||||||
'uidnumber' => $uidnumber,
|
|
||||||
'primarygroup' => $primarygroup,
|
|
||||||
'loginshell' => $loginshell,
|
|
||||||
'homedir' => $homedir,
|
|
||||||
'passsha256' => $passsha256,
|
|
||||||
'sshkeys' => $sshkeys,
|
|
||||||
'passappsha256' => $passappsha256,
|
|
||||||
'othergroups' => $formatted_othergroups,
|
|
||||||
}),
|
|
||||||
order => '70',
|
order => '70',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,14 +0,0 @@
|
|||||||
[[users]]
|
|
||||||
name = "<%= $name %>"
|
|
||||||
<% if $givenname != '' { %>givenname = "<%= $givenname %>"<% } %>
|
|
||||||
<% if $sn != '' { %>sn = "<%= $sn %>"<% } %>
|
|
||||||
mail = "<%= $mail %>"
|
|
||||||
uidnumber = <%= $uidnumber %>
|
|
||||||
primarygroup = <%= $primarygroup %>
|
|
||||||
<% if $loginshell != '' { %>loginShell = "<%= $loginshell %>"<% } %>
|
|
||||||
<% if $homedir != '' { %>homeDir = "<%= $homedir %>"<% } %>
|
|
||||||
passsha256 = "<%= $passsha256 %>"
|
|
||||||
<% if $sshkeys.length > 0 { %>sshkeys = [<% $sshkeys.each |String $key| { %>"<%= $key %>", <% } %>]<% } %>
|
|
||||||
<% if $passappsha256.length > 0 { %>passappsha256 = [<% $passappsha256.each |String $pass| { %>"<%= $pass %>", <% } %>]<% } %>
|
|
||||||
othergroups = <%= $othergroups %>
|
|
||||||
|
|
||||||
26
modules/glauth/templates/obj/user.erb
Normal file
26
modules/glauth/templates/obj/user.erb
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
[[users]]
|
||||||
|
name = "<%= @user_name %>"
|
||||||
|
<% if @givenname != '' -%>
|
||||||
|
givenname = "<%= @givenname %>"
|
||||||
|
<% end -%>
|
||||||
|
<% if @sn != '' -%>
|
||||||
|
sn = "<%= @sn %>"
|
||||||
|
<% end -%>
|
||||||
|
mail = "<%= @mail %>"
|
||||||
|
uidnumber = <%= @uidnumber %>
|
||||||
|
primarygroup = <%= @primarygroup %>
|
||||||
|
<% if @loginshell != '' -%>
|
||||||
|
loginShell = "<%= @loginshell %>"
|
||||||
|
<% end -%>
|
||||||
|
<% if @homedir != '' -%>
|
||||||
|
homeDir = "<%= @homedir %>"
|
||||||
|
<% end -%>
|
||||||
|
passsha256 = "<%= @passsha256 %>"
|
||||||
|
<% if @sshkeys.length > 0 -%>
|
||||||
|
sshkeys = [<%= @sshkeys.map { |key| "\"#{key}\"" }.join(', ') %>]
|
||||||
|
<% end -%>
|
||||||
|
<% if @passappsha256.length > 0 -%>
|
||||||
|
passappsha256 = [<%= @passappsha256.map { |pass| "\"#{pass}\"" }.join(', ') %>]
|
||||||
|
<% end -%>
|
||||||
|
othergroups = <%= @formatted_othergroups %>
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user