You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Change file_switch to append source_file lookups, rather than override #151
On any given host, I may have many managed server values. Therefore, it's important that it's possible to use the dynamic server filename.
If I configure nginx.tofs.source_files.server_conf_file_managed to, e.g. default.conf, I expect this to be appended to the list of files that get looked for.
However instead, nginx-formula will now only look for default.conf, removing the ability to have multiple servers per host.
My expectation is that setting server_conf_file_managed adds a cascading override - i.e. it appends to the beginning of the list of file names to look for, not overrides the full existing list.
Thanks @ErisDS. Note for others, this issue was discussed in Slack. I put forward a potential solution (appending the original source_files rather than overriding it) which is working for us both:
{#- Lookup source_files (v2), files (v1), or fallback to an empty list #}
{%- set src_files = salt['config.get'](
tplroot ~ ':tofs:source_files:' ~ lookup,
salt['config.get'](
tplroot ~ ':tofs:files:' ~ lookup,
[]
)
) %}
{#- Append source_files #}
{%- set src_files = src_files + source_files %}
I'll put that in a PR soon, so that it can be discussed further.
Activity
myii commentedon Jul 23, 2019
Thanks @ErisDS. Note for others, this issue was discussed in Slack. I put forward a potential solution (appending the original
source_filesrather than overriding it) which is working for us both:{#- Lookup source_files (v2), files (v1), or fallback to an empty list #} {%- set src_files = salt['config.get']( tplroot ~ ':tofs:source_files:' ~ lookup, salt['config.get']( tplroot ~ ':tofs:files:' ~ lookup, [] ) ) %} {#- Append source_files #} {%- set src_files = src_files + source_files %}I'll put that in a PR soon, so that it can be discussed further.
Append lookup to file_switch, instead of override
fix(tofs): prepend the config-based `source_files` to the default
fix(tofs): prepend the config-based `source_files` to the default
fix(tofs): prepend the config-based `source_files` to the default
fix(tofs): prepend the config-based `source_files` to the default
chore(release): 3.1.1 [skip ci]
saltstack-formulas-travis commentedon Jul 25, 2019
🎉 This issue has been resolved in version 3.1.1 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
chore(release): 1.0.0 [skip ci]