1

I have a formula in my salt tree that I believe is dead code; that is, not actually being used anywhere. I'd like to get rid of it. How can I verify that no minions are receiving a given .sls as part of their highstate?

Assume that I don't trust manual inspection of the top file; I want to know where salt is really applying the state, not where I think it's applying the state.

Andrew
  • 1,084
  • 2
  • 10
  • 16

1 Answers1

2

The commands salt '*' state.show_top and salt '*' state.show_highstate will render the effective top file and the effective highstate information for all minions.

If you don't find your state in this list, you can be pretty sure that it is currently not used (unless it renders to an empty file).

After you have removed the state you can use the same commands to check if the state is not referenced any more and if the state files still render.

ahus1
  • 557
  • 4
  • 12