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
Description
If the given line is already present in the file, but clean_file is true, Salt will clean the file but not report any changes.
Setup
salt repo:
pkgrepo.managed:
- name: > deb [arch=amd64 signed-by=/etc/apt/keyrings/salt-archive-keyring.gpg] http://packages.broadcom.com/artifactory/saltproject-deb/ stable main
- file: /etc/apt/sources.list.d/salt.list
- clean_file: true
- key_url: https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public
- aptkey: false
Steps to Reproduce the behavior
# cat /etc/apt/sources.list.d/salt.list
deb [arch=amd64 signed-by=/etc/apt/keyrings/salt-archive-keyring.gpg] http://repo.saltproject.io/salt/py3/ubuntu/24.04/amd64/latest noble main
deb [arch=amd64 signed-by=/etc/apt/keyrings/salt-archive-keyring.gpg] http://repo.saltproject.io/salt/py3/ubuntu/24.04/amd64/3006 noble main
deb [arch=amd64 signed-by=/etc/apt/keyrings/salt-archive-keyring.gpg] http://repo.saltproject.io/salt/py3/ubuntu/24.04/amd64/minor/3006.9 noble main
deb [arch=amd64 signed-by=/etc/apt/keyrings/salt-archive-keyring.gpg] http://packages.broadcom.com/artifactory/saltproject-deb/ stable main
# salt-call state.apply
local:
Summary for local
--------------
Succeeded: 264
Failed: 0
--------------
Total states run: 264
Total run time: 22.334 s
# cat /etc/apt/sources.list.d/salt.list
deb [arch=amd64 signed-by=/etc/apt/keyrings/salt-archive-keyring.gpg] http://packages.broadcom.com/artifactory/saltproject-deb/ stable main
Expected behavior
The state should report changes if it changed something.
Versions Report
salt --versions-report
Salt Version:
Salt: 3006.9Python Version:
Python: 3.10.14 (main, Jun 26 2024, 11:44:37) [GCC 11.2.0]Dependency Versions:
cffi: 1.17.1cherrypy: unknowncryptography: 42.0.5dateutil: 2.8.1docker-py: Not Installedgitdb: Not Installedgitpython: Not InstalledJinja2: 3.1.4libgit2: 1.7.2looseversion: 1.0.2M2Crypto: 0.38.0Mako: Not Installedmsgpack: 1.0.2msgpack-pure: Not Installedmysql-python: Not Installedpackaging: 22.0pycparser: 2.21pycrypto: Not Installedpycryptodome: 3.19.1pygit2: 1.14.1python-gnupg: 0.4.8PyYAML: 6.0.1PyZMQ: 23.2.0relenv: 0.17.0smmap: Not Installedtimelib: 0.2.4Tornado: 4.5.3ZMQ: 4.3.4System Versions:
dist: ubuntu 24.04.1 noblelocale: utf-8machine: x86_64release: 6.8.0-48-genericsystem: Linuxversion: Ubuntu 24.04.1 noble
The text was updated successfully, but these errors were encountered:
Description
If the given line is already present in the file, but
clean_file
is true, Salt will clean the file but not report any changes.Setup
Steps to Reproduce the behavior
Expected behavior
The state should report changes if it changed something.
Versions Report
salt --versions-report
The text was updated successfully, but these errors were encountered: