From c56ed3571cc2361f0d7207d81eec94264bbe2349 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Fri, 14 Feb 2020 19:00:07 +0000 Subject: [PATCH 1/2] =?UTF-8?q?feat(libtofs):=20=E2=80=9Cfiles=5Fswitch?= =?UTF-8?q?=E2=80=9D=20mess=20up=20the=20variable=20exported=20by=20?= =?UTF-8?q?=E2=80=9Cmap.jinja=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * https://github.com/saltstack-formulas/template-formula/pull/187 --- ssf/defaults.yaml | 4 ++-- ssf/files/default/formula/libtofs.jinja | 2 +- ssf/libtofs.jinja | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ssf/defaults.yaml b/ssf/defaults.yaml index 0d36c612..6301a5c0 100644 --- a/ssf/defaults.yaml +++ b/ssf/defaults.yaml @@ -22,8 +22,8 @@ ssf_node_anchors: # An alternative method could be to use: # `git describe --abbrev=0 --tags` # yamllint disable rule:line-length rule:quoted-strings - title: "chore(git): add Bundler config dir to '`'.gitignore'`' [skip ci]" - body: '* Checked using https://github.com/myii/ssf-formula/pull/130' + title: "fix(libtofs): “files_switch” mess up the variable exported by “map.jinja” [skip ci]" + body: '* Checked using https://github.com/myii/ssf-formula/pull/131' # yamllint enable rule:line-length rule:quoted-strings github: owner: 'saltstack-formulas' diff --git a/ssf/files/default/formula/libtofs.jinja b/ssf/files/default/formula/libtofs.jinja index 900e62b5..ffb3b545 100644 --- a/ssf/files/default/formula/libtofs.jinja +++ b/ssf/files/default/formula/libtofs.jinja @@ -82,7 +82,7 @@ ) %} {#- Append an empty value to evaluate as `default` in the loop below #} {%- if '' not in fsl %} - {%- do fsl.append('') %} + {%- set fsl = fsl + [''] %} {%- endif %} {%- for fs in fsl %} {%- for src_file in src_files %} diff --git a/ssf/libtofs.jinja b/ssf/libtofs.jinja index 900e62b5..ffb3b545 100644 --- a/ssf/libtofs.jinja +++ b/ssf/libtofs.jinja @@ -82,7 +82,7 @@ ) %} {#- Append an empty value to evaluate as `default` in the loop below #} {%- if '' not in fsl %} - {%- do fsl.append('') %} + {%- set fsl = fsl + [''] %} {%- endif %} {%- for fs in fsl %} {%- for src_file in src_files %} From 634365ee5ffb5810b473d7386e20d0f13ceda865 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Fri, 14 Feb 2020 19:05:10 +0000 Subject: [PATCH 2/2] fix(libtofs): fix typo --- ssf/files/default/formula/libtofs.jinja | 2 +- ssf/libtofs.jinja | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ssf/files/default/formula/libtofs.jinja b/ssf/files/default/formula/libtofs.jinja index ffb3b545..06689258 100644 --- a/ssf/files/default/formula/libtofs.jinja +++ b/ssf/files/default/formula/libtofs.jinja @@ -16,7 +16,7 @@ ':tofs:files_switch' this is the ordered list of grains to use as selector switch of the directories under "/files" - * indent_witdh: indentation of the result value to conform to YAML + * indent_width: indentation of the result value to conform to YAML * use_subpath: defaults to `False` but if set, lookup the source file recursively from the current state directory up to `tplroot` diff --git a/ssf/libtofs.jinja b/ssf/libtofs.jinja index ffb3b545..06689258 100644 --- a/ssf/libtofs.jinja +++ b/ssf/libtofs.jinja @@ -16,7 +16,7 @@ ':tofs:files_switch' this is the ordered list of grains to use as selector switch of the directories under "/files" - * indent_witdh: indentation of the result value to conform to YAML + * indent_width: indentation of the result value to conform to YAML * use_subpath: defaults to `False` but if set, lookup the source file recursively from the current state directory up to `tplroot`