Fix per service option parsing.

* None is being passed as a string. Replace with explicit ''
* Fix typo with autorestart preventing its use
What I saw was:

1)

 if you had autorestart=None in the macro arg defs,

 {% if autorestart %} would eval to true.

2)

if you had autorestart=False in the macro arg defs

{% if autorestart %} would eval to false.

3)

if you had autorestart='' in the macro arg defs

{% if autorestart != '' %} would eval to true

and the value of {{ autorestart }} would be 'None'.


Unless i've had a minor stroke today, Jinja+Salt is pretty awful.



On 17 December 2014 at 13:31, Ash Berlin <notifications@github.com> wrote:
>
> In supervisor/templates/app-generic.ini
> <https://github.com/ministryofjustice/supervisor-formula/pull/4#discussion-diff-21971078>
> :
>
> > @@ -6,25 +6,25 @@ directory={{working_dir}}
> >  {# numprocs={{numprocs}} #}
> >  {# process_name=%(program_name)s_%(process_num)02d #}
> >
> > -{% if autostart %}
> > +{% if autostart and autostart != '' %}
>
> Should still be the case:
>
> [image: screen shot 2014-12-17 at 13 30 05]
> <https://cloud.githubusercontent.com/assets/34150/5471729/d8c52d50-85f0-11e4-9855-24af9666e1b5.png>
>
> (generated using https://github.com/abourguignon/jinja2-live-parser)
>
> Is salt really mangling the jinja that badly? :(
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ministryofjustice/supervisor-formula/pull/4/files#r21971078>
> .
>