chore: prevent empty lines
- prevent empty lines when user features are not enabled - change epp to erb template for user objects
This commit is contained in:
@@ -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 %>
|
||||
|
||||
Reference in New Issue
Block a user