Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $webapp_list = lookup('webapps', Hash, 'hash')
- $webapp_list.each | $app_name, $app_info| {
- $app_port = $app_info[port]
- $app_description = $app_info[description]
- $app_settings = [ $app_info[settings] ]
- webapps:
- webapp-template:
- port: 5001
- description: "Webapp Description"
- live: false
- settings:
- FLASK_APP: appname.py
- MAIL_USERNAME: email@example.com
- MAIL_PASSWORD: <extra strong password>
- <% @app_settings.each do |settingKey, settingValue| -%>
- export <%= settingKey -%>='<%= settingValue -%>'
- <% end %>
- export FLASK_APP=appname.py
- export MAIL_USERNAME=email@example.com
- export MAIL_PASSWORD=<extra strong password>
- Info: Using configured environment 'special'
- Info: Retrieving pluginfacts
- Info: Retrieving plugin
- 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:
- Filepath: /etc/puppet/code/modules/webapps/templates/settings.conf.erb
- Line: 2
- Detail: undefined method `each' for nil:NilClass
- at /etc/puppet/code/modules/webapps/manifests/init.pp:40:18 on node web.home
- Warning: Not using cache on failed catalog
- Error: Could not retrieve catalog; skipping run
- export {"FLASK_APP"=>"appname.py", "MAIL_USERNAME"=>"email@example.com", "MAIL_PASSWORD"=>"<extra strong password>"}=''
Add Comment
Please, Sign In to add comment