Skip to content

Commit

Permalink
Better mail message.
Browse files Browse the repository at this point in the history
  • Loading branch information
leoditommaso committed Jun 29, 2015
1 parent 7f0df04 commit 4d68ab7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libraries/users_management.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ def mo_openvpn_create_users(users)
users.each do |user|

execute "notify_admin_about_#{user}" do
command "echo 'Se adjuntan certificados del usuario #{user}.' | mutt #{node['mo_openvpn']['admin_email']} -s '[VPN] Nuevo certificado' -a '#{node['mo_openvpn']['keys_dir']}/#{user}.zip'"
command <<-SCRIPT
echo 'Se adjuntan certificados del usuario #{user} para el servidor #{node['fqdn']}.' |
mutt #{node['mo_openvpn']['admin_email']} \
-s '[VPN] Nuevo certificado para #{user} en #{node['hostname']}' \
-a '#{node['mo_openvpn']['keys_dir']}/#{user}.zip'
SCRIPT
action :nothing
end

Expand Down

0 comments on commit 4d68ab7

Please sign in to comment.