Closed hramrach closed 1 year 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!
As far as I know, augeas doesn't work like that. If you tell it to ins
then it does.
If the example were changed to grep '^zabbix-agent\s' /etc/services
would that make you happier?
No, I mean that Augeas upstream provides both functions to change the file and get data from the file.
Then if I did not use Salt but rather Augeas upstream tools I could write a check that parses the file and looks if "zabbix-agent" service definition is present, and execute the actions to add it when it is not.
However, here the check is executed with 'grep' which has very little idea about the structure of the file rather than with Augeas, the very thing Augeas is supposed to prevent.
Then this should be a feature request that's going to require some design of how to implement that in a Salt state.
So it's not merely an omission in the documentation.
Does not look like I can change the labels to mark this a feature.
Create a new issue using the feature template and fill in the details.
Moved to #65359
Ignoring half the template was not helpful.
Description
Not sure this is a bug in the docs of if this is deficiency of the augeas plugin.
The docs say https://docs.saltproject.io/en/latest/ref/states/all/salt.states.augeas.html
This is not a way to manage the file. The string
zabbix-agent
may be in the file but commented out. There might be a service likezabbix-agent-ng
. When the file is modified by augeas the check that the modification was applied should also be done by augeas.