When searching for a functionality of SaltStack, often a state and a module turn up (when searching for "saltstack user" for example, one gets salt.states.user and salt.modules.user).
Reading the documentation, I get the impression that states somehow call modules or rather functions in modules, to achieve having the states set. But it's not very clear to me. Hence the following question:
What is the difference between a module and a state in SaltStack?
First of all:
If you now look closer into the python source code of the states, you see, that the states use their associated modules most of the time. But they have some inspection before they execute them and they only execute them if the inspection says that the desired state doesn`t already exist.
I hope, this will make the difference a bit more clear
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With