Skip to content

Gunicorn via Hiera #499

@linuxmail

Description

@linuxmail

hi,

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5
  • Distribution: Debian Stretch
  • Module version: 3.0.1

I try to configure Gunicorn via Hiera and tried to use create_resources, which isn't working

  • profile.pp
class profile::webserver::gunicorn {
  contain python

  $python_gunicorn =  hiera('python::gunicorn', {})
  create_resources('python::gunicorn', $python_gunicorn)
}

backend.yaml

python::gunicorn:
  'vhost':
    ensure: 'present'
    virtualenv: "/opt/backoffice-backend/django"
    mode: 'wsgi'
    dir: '/opt/backoffice-backend/django/current'
    bind: 'unix:/var/tmp/gunicorn.socket'
    owner: 'www-data'
    group: 'www-data'
    workers: '30'
    manage_config_dir: 'true'
    environment: 'prod'
    osenv:
      'DBHOST': 'dc.example'
    timeout: 30

But I get always:

 Error while evaluating a Function Call, Class[Python]: parameter 'gunicorn' expects a match for Enum['absent', 'latest', 'present']
, got Struct

So, can someone tell me, what I'm doing wrong ?

cu denny

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions