1

I have a state called service.sls within an "elasticsearch" directory. I could call the entire state via salt-call state.sls elasticsearch.service but I'd only like to trigger one rule within that state.

Context: the config is file.managed and has been changed but I'd like to manually do the restart that the state would trigger.

1

You can do salt-call state.high and specify the individual rule that you want from the file directly on the command line.

| improve this answer | |
1

Although there is an exclude parameter to most state functions, there isn't an inclue. You could however exclude all other state ids to only execute the "rule" you want:

salt-call state.sls elasticsearch.service exclude="[{'id': 'id_to_exclude'}, {'id': 'id_to_also_exclude'}]"

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.