daily pastebin goal
39%
SHARE
TWEET

Untitled

a guest May 27th, 2018 242 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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>"}=''
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top