Closed lmf-mx closed 1 year ago
v1.7.0
Salt Version: Salt: 3001.3 Dependency Versions: cffi: Not Installed cherrypy: Not Installed dateutil: 2.7.3 docker-py: Not Installed gitdb: 2.0.6 gitpython: 3.0.7 Jinja2: 2.10.1 libgit2: 0.28.3 M2Crypto: Not Installed Mako: Not Installed msgpack-pure: Not Installed msgpack-python: 0.6.2 mysql-python: Not Installed pycparser: Not Installed pycrypto: Not Installed pycryptodome: 3.6.1 pygit2: 1.0.3 Python: 3.8.5 (default, Jul 28 2020, 12:59:40) python-gnupg: 0.4.5 PyYAML: 5.3.1 PyZMQ: 18.1.1 smmap: 2.0.5 timelib: Not Installed Tornado: 4.5.3 ZMQ: 4.3.2 System Versions: dist: ubuntu 20.04 focal locale: utf-8 machine: x86_64 release: 5.4.0-56-generic system: Linux version: Ubuntu 20.04 focal
<saltmaster.sls> ... ext_pillar: - git: - master ssh://<a_valid_git_pillar_repo>.git - file_tree: root_dir: '/srv/pillar_files' follow_dir_links: False keep_newline: True ...
The ext_pillar rendering logic doesn't render the file_tree configuration successfully.
ext_pillar
file_tree
/etc/salt/master.d/f_defaults.conf: ---------- diff: --- +++ @@ -910,13 +910,10 @@ ext_pillar: - git: - master ssh://git@<a_valid_git_pillar_repo>.git -# Error in rendering file_tree, please read https://docs.saltstack.com/en/latest/topics/development/external_pillars.html#configuration - - - root_dir: /srv/pillar_files -# Error in rendering follow_dir_links, please read https://docs.saltstack.com/en/latest/topics/development/external_pillars.html#configuration - -# Error in rendering keep_newline, please read https://docs.saltstack.com/en/latest/topics/development/external_pillars.html#configuration - + - file_tree: + - root_dir + - follow_dir_links + - keep_newline docs.saltstack.com/en/latest/topics/development/external_pillars.html#configuration
Include a file_tree config under ext_pillar. (See above) Apply the salt state.
salt
A correct output utilizing file_tree would be
ext_pillar: - git: - master ssh://<a_valid_git_pillar_repo>.git - file_tree: root_dir: '/srv/pillar_files' follow_dir_links: False keep_newline: True
It appears the last elif section in the jinja template is or is close to what would render the correct output, but the file_tree section is caught by the previous elif.
It behave the same regardless of platform or version.
Revisited on 3006.1 and works properly
Your setup
Formula commit hash / release tag
v1.7.0
Versions reports (master & minion)
Pillar / config used
Bug details
Describe the bug
The
ext_pillar
rendering logic doesn't render thefile_tree
configuration successfully.Steps to reproduce the bug
Include a
file_tree
config underext_pillar
. (See above) Apply thesalt
state.Expected behaviour
A correct output utilizing
file_tree
would beAttempts to fix the bug
It appears the last elif section in the jinja template is or is close to what would render the correct output, but the
file_tree
section is caught by the previous elif.Additional context
It behave the same regardless of platform or version.