Closed pawelrosada closed 5 years ago
@aboe76 done
@pawelrosada thanks for this
Need default value in map.jinja ? As this PR breaks Backward compatibility
----------
Rendering SLS 'base:php.ng.fpm.install' failed: Jinja variable 'enable_php_repo' is undefined
/var/cache/salt/minion/files/base/php/ng/installed.jinja(94):
---
[...]
php_install_{{ state }}:
pkg.installed:
- name: {{ state }}
- pkgs: {{ pkgs|json() }}
{% if enable_php_repo %} <======================
- enablerepo: {{ enable_php_repo }}
{% endif %}
{% for pkg in specials %}
[...]
---```
@sticky-note
{% set enable_php_repo = salt['pillar.get']('php:ng:lookup:enable_php_repo', False) %}
Variable is initialized in default (false). With version of SaltStack do you use?
The var is initialized inside the elif statement for RedHat only: https://github.com/saltstack-formulas/php-formula/blob/0c923245e67c31bd51b78595bae57ad066c2a31b/php/ng/installed.jinja#L75 and is ALWAYS read (-> outside if elsif else ). That's because it is never initialized for Debian or all other OSes but RedHat.
@pawelrosada can you add your parameter to pillar.example so it's documented