Search code examples
salt-project

Salt-stack list all available states


I already searched the doc and was not able to find an satisfying answer. Is it possible to get something like salt 'machine' state.list. To get all states that could be potentially applied?

I know there is the high state / top / lowstate, but if i want to search for a particular state i always need to go through the folder structure manually.


Solution

  • I use this...

    Is a little one liner command you can set as an alias

    cd /srv/salt; tree -fC -P '*.sls' --noreport * | sed 's/.sls//g' | sed 's|\/|.|g'