Method: PoolParty::Resources::User#print_to_chef

Defined in:
lib/poolparty/resources/user.rb


45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/poolparty/resources/user.rb', line 45

def print_to_chef
str = 'user "<%= name %>" do
  action <%= print_variable(action ? action : (exists ? :create : :remove)) %>
'
  str << "  comment <%= print_variable(comment) %>\n" if comment
  str << "  uid <%= print_variable(uid) %>\n" if uid
  str << "  gid <%= print_variable(gid) %>\n" if gid
  str << "  home <%= print_variable(home) %>\n" if home
  str << "  shell <%= print_variable(shell) %>\n" if shell
  str << "  password <%= print_variable(password) %>\n" if password
  str << "  supports <%= print_variable(supports) %>\n" if supports
  
  str << "end"
end