Guest User

Untitled

a guest
May 27th, 2018
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. $webapp_list = lookup('webapps', Hash, 'hash')
  2. $webapp_list.each | $app_name, $app_info| {
  3. $app_port = $app_info[port]
  4. $app_description = $app_info[description]
  5. $app_settings = [ $app_info[settings] ]
  6.  
  7. webapps:
  8. webapp-template:
  9. port: 5001
  10. description: "Webapp Description"
  11. live: false
  12. settings:
  13. FLASK_APP: appname.py
  14. MAIL_USERNAME: email@example.com
  15. MAIL_PASSWORD: <extra strong password>
  16.  
  17. <% @app_settings.each do |settingKey, settingValue| -%>
  18. export <%= settingKey -%>='<%= settingValue -%>'
  19. <% end %>
  20.  
  21. export FLASK_APP=appname.py
  22. export MAIL_USERNAME=email@example.com
  23. export MAIL_PASSWORD=<extra strong password>
  24.  
  25. Info: Using configured environment 'special'
  26. Info: Retrieving pluginfacts
  27. Info: Retrieving plugin
  28. Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Failed to parse template webapps/settings.conf.erb:
  29. Filepath: /etc/puppet/code/modules/webapps/templates/settings.conf.erb
  30. Line: 2
  31. Detail: undefined method `each' for nil:NilClass
  32. at /etc/puppet/code/modules/webapps/manifests/init.pp:40:18 on node web.home
  33. Warning: Not using cache on failed catalog
  34. Error: Could not retrieve catalog; skipping run
  35.  
  36. export {"FLASK_APP"=>"appname.py", "MAIL_USERNAME"=>"email@example.com", "MAIL_PASSWORD"=>"<extra strong password>"}=''
Add Comment
Please, Sign In to add comment