puppet-prod/modules/glauth/templates/obj/user.erb
Ben Vincent 0cad88cdad chore: prevent empty lines
- prevent empty lines when user features are not enabled
- change epp to erb template for user objects
2024-08-07 22:51:13 +10:00

27 lines
718 B
Plaintext

[[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 %>