saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.11k stars 5.47k forks source link

[BUG] Rendering SLS 'base:zabbix.agent.repo' failed: Jinja variable 'dict object' has no attribute 'repo_signedby' #66867

Closed tmclo closed 3 weeks ago

tmclo commented 3 weeks ago

Description zabbix-formula is failing to work on Ubuntu machines due to lack of 'repo_signedby' attribute however works fine on Debian 12 and RedHat based machines, for some reason it doesn't look like the attribute is being passed to Ubuntu machines?

timemachine:
    Data failed to compile:
----------
    Rendering SLS 'base:zabbix.agent.repo' failed: Jinja variable 'dict object' has no attribute 'repo_signedby'
/var/cache/salt/minion/files/base/zabbix/repo.sls(28):
---
[...]
{{ id_prefix }}_apt-transport-https:
  pkg.installed:
    - name: apt-transport-https
{{ id_prefix }}_repo:
  pkgrepo.managed:
    - name: deb [ arch={{ salt['grains.get']('osarch')|lower }} {{ zabbix.repo_signedby }} ]    <======================
        https://repo.zabbix.com/zabbix/{{ zabbix.version_repo }}/{{ salt['grains.get']('os')|lower }} {{ salt['grains.get']('oscodename') }} main
    - file: /etc/apt/sources.list.d/zabbix.list
    - key_url: https://repo.zabbix.com/zabbix-official-repo.key
    - clean_file: True
    - aptkey: {{ zabbix.repo_aptkey }}
[...]
---

Setup (Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)

Please be as specific as possible and give set-up details.

Steps to Reproduce the behavior Configure zabbix-formula Attempt to apply state to Ubuntu 24.04 machine

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.) ```yaml Salt Version: Salt: 3006.0 Python Version: Python: 3.6.15 (default, Sep 23 2021, 15:41:43) [GCC] Dependency Versions: cffi: 1.13.2 cherrypy: Not Installed contextvars: 2.4 dateutil: Not Installed docker-py: Not Installed gitdb: 4.0.7 gitpython: 3.1.12 Jinja2: 2.10.1 libgit2: 1.7.1 looseversion: 1.0.2 M2Crypto: 0.38.0 Mako: Not Installed msgpack: 0.5.6 msgpack-pure: Not Installed mysql-python: Not Installed packaging: 21.3 pycparser: 2.17 pycrypto: Not Installed pycryptodome: Not Installed pygit2: 1.14.0 python-gnupg: Not Installed PyYAML: 5.4.1 PyZMQ: 17.1.2 relenv: Not Installed smmap: 3.0.2 timelib: Not Installed Tornado: 4.5.3 ZMQ: 4.2.3 System Versions: dist: opensuse-leap 15.6 locale: UTF-8 machine: x86_64 release: 6.4.0-150600.23.7-default system: Linux version: openSUSE Leap 15.6 ```

Additional context

salt master running 3006.0 ubuntu minion running 3007.1

Ubuntu version is 24.04 amd64

root@timemachine:~ # uname -a
Linux timemachine 6.8.0-36-generic #36-Ubuntu SMP PREEMPT_DYNAMIC Mon Jun 10 10:49:14 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
root@timemachine:~ #
welcome[bot] commented 3 weeks ago

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!