0

why does my use of the saltstack apache-formula fail to set the 'id' variable ? my code is as fallows ?

apache:
    sites:

        changed.com:

            template_file: salt://salt/formulas/salt/apache-formula/apache/vhosts/standard.tmpl
            template_engine: jinja

            interface: '*'
            port: '80'

           ServerName: {{ id }}
           ServerAdmin: webmaster@{{ id }}
           LogLevel: Debug
           ErrorLog: {{ logdir }}/{{ id }}-error.log

           WSGIScriptAlias: / /var/www/project2/django.wsgi

the error message is as fallows:

Rendering SLS "base:netchosis" failed: Jinja variable 'id' is undefined; line 15


        port: '80'

        ServerName: {{ id }}
        ServerAdmin: webmaster@{{ id }}
        LogLevel: Debug 
        ErrorLog: {{ logdir }}/{{ id }}-error.log    <======================

        WSGIScriptAlias: / /var/www/project2/django.wsgi

I was expecting "changed.com" as the ID thanks.

  • It doesn't work for me either! I've been trying to learn Saltstack but I'm afraid I should have gone with something else instead. Basic stuff works, but then when you're trying to pick up those popular "formulas" it doesn't really work out of the box. – punkbit May 20 '14 at 11:27

1 Answers1

0

The example pillar file is here: https://github.com/saltstack-formulas/apache-formula/blob/master/pillar.example

I'd suggest using 2 spaces per indentation level and make sure they line up.

Utah_Dave
  • 532
  • 2
  • 6