Uploaded image for project: 'Hiera'
  1. Hiera
  2. HI-527

Hiera not passing data to erb template file

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Incomplete
    • Affects Version/s: HI 3.2.0
    • Fix Version/s: None
    • Component/s: PE
    • Labels:
      None
    • Environment:

      PE 4.5.2, Ubuntu 14.04 server edition

    • Template:

      Description

      We are having this issue where Component/module template file is not being update by hiera data content. This works on our current puppet 3.8 version, we are migrating our modules but this is looking like a blocker at the moment.

      • We have a template file named file.conf.py.erb which has variable entries.
      • The variable entries are updated by whatever we have in file2.yaml hiera data

      Sample content of file.conf.py.erb

      DATABASES = {
        'default': {
      	'ENGINE': 'sentry.db.postgres',
      	'NAME': '<%= @db_name %>',
      	'USER': '<%= @db_user %>',
      	'PASSWORD': '<%= @db_password %>',	
      	'HOST': '<%= @db_host %>',
      	'PORT': '<%= @db_port %>',
           }
      }

      Sample content of file2.yaml hiera file

              db_name: 'name'
              db_user: 'useroi'
              db_password: 'my_password'
              db_host: 'abc.com'
              db_port: '8964'
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            adelanre Lanre
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support