saltstack-formulas / salt-formula

Yes, Salt can Salt itself!
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
197 stars 423 forks source link

[BUG] Jinja variable 'salt' is undefined [jinja3] #512

Open noelmcloughlin opened 2 years ago

noelmcloughlin commented 2 years ago

Your setup

Formula commit hash / release tag

Versions reports (master & minion)

Salt Version:
          Salt: 3002.2

Dependency Versions:
          cffi: 1.14.6
      cherrypy: 18.6.1
      dateutil: Not Installed
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.0.1
       libgit2: Not Installed
      M2Crypto: 0.38.0
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.20
      pycrypto: Not Installed
  pycryptodome: Not Installed
        pygit2: Not Installed
        Python: 3.8.11 (default, Aug 10 2021, 00:29:46) [GCC]
  python-gnupg: Not Installed
        PyYAML: 5.4.1
         PyZMQ: 22.2.1
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.4

System Versions:
          dist: opensuse-tumbleweed 20210829 n/a
        locale: utf-8
       machine: x86_64
       release: 5.13.12-2-default
        system: Linux
       version: openSUSE Tumbleweed 20210829 n/a

Pillar / config used


Bug details

Describe the bug

 File "/usr/lib/python3.8/site-packages/salt/utils/templates.py", line 260, in render_tmpl
    output = render_str(tmplstr, context, tmplpath)
  File "/usr/lib/python3.8/site-packages/salt/utils/templates.py", line 505, in render_jinja_tmpl
    raise SaltRenderError("Jinja variable {}{}".format(exc, out), buf=tmplstr)
salt.exceptions.SaltRenderError: Jinja variable 'salt' is undefined

Related issues

https://github.com/saltstack-formulas/postgres-formula/pull/311 https://github.com/saltstack-formulas/salt-formula/issues/509

noelmcloughlin commented 2 years ago

https://github.com/saltstack/salt/issues/60188