FAQ
Hi Gary,

you would need to keep the previous values of your list/dict. On the same minion it could be a custom grain you set, across minions you could use the salt mine.
Then you just get the old list, filter for the stuff you don't want anymore and throw it in a "remove_all_this_clutter: { pkg.removed: [names: {{ obsolete_pkgs }} ] }" state.

Regards, Florian

Am 16. November 2015 00:48:56 MEZ, schrieb Gary Tang <ninja@alinux.ninja>:
Hi,

I'm looking for a way to handle changes in dicts and lists.
For example, if I have the following list:
packages:
-apt
-nano
-vim

The list corresponds to what packages are installed on the minion by
apt-get.
If I remove "vim" from the list, is there any way for it to be
uninstalled?

Or if I have a pillar that manages VMs:
vmmgm:
vm1:
setting1:value
setting2:value
vm2:
setting1:value
setting2:value

I now remove vm1 from the pillar, and there should be a way to tell
what
has been removed (vm1), and run something to remove the VM.

Thanks!
Gary
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupsalt-users @
postedNov 15, '15 at 11:48p
activeNov 16, '15 at 8:46a
posts2
users2

2 users in discussion

Gary Tang: 1 post Florian Ermisch: 1 post

People

Translate

site design / logo © 2021 Grokbase