Search code examples
salt-project

Can top.sls be changed using any salt commands/modules


or it can only be edited manually using text editor?


Solution

  • There are no internal functions to modify your top.sls

    The top file is yaml, so you could dynamically create a data structure in python or your favorite programming language and output that structure to your top.sls.

    There is also the master tops system, which allows you to dynamically create your top data.

    http://docs.saltstack.com/en/latest/topics/master_tops/index.html