--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/95be1627-42b5-4905-be1c-de2cddfce4c9n%40googlegroups.com.
--
Dennis Payne du...@identicalsoftware.com https://mastodon.gamedev.place/@dulsi
file.absent should remove the directory. if it doesn’t please report the error. file.remove is not a state. as for the requisites. they failed because they don’t exist but not because “they were removed” requisites monitor states not the filesystem. so a onchanges: file: /etc/systemd/system/mfeespd.service.d/50-CPUQuota.conf requisite is looking for a state with a file module with a state id or - name of /etc/systemd/system/mfeespd.service.d/50-CPUQuota.conf you do not have one in this list. The closest thing you have is a file.remove with a name of /etc/systemd/system/mcafee.ma.service.d/ which does not match. your onchanges could be file mfetpd.service.d_removeto better show what requisites are monitoring.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/9d3f7507-55b5-46de-afb3-e1f002cc2f1fn%40googlegroups.com.
That works, as long as you are just removing the directories.
this should also do the trick without the jinja
mcafee.ma.service.d_remove:
file.absent:
- name: /etc/systemd/system/mcafee.ma.service.d/
mfeespd.service.d_remove:
file.absent:
- name: /etc/systemd/system/mfeespd.service.d/
mfetpd.service.d_remove:
file.absent:
- name: /etc/systemd/system/mfetpd.service.d/
quota_rm_reload_systemd:
cmd.run:
- name: systemctl daemon-reload
- onchanges_any:
- file: mcafee.ma.service.d_remove
- file: mfetpd.service.d_remove
- file: mfetpd.service.d_remove
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/df034385-fefa-4a07-8313-ad9ac664fb0cn%40googlegroups.com.