sys.argspec vs sys.state_argspec

SaltStack Certified Engineer

Lecture: The Salt File Server


sudo salt 'salt' sys.argspec file.managed didn't return anything

then I tried - sudo salt 'salt' sys.argspec file.* | grep managed - which gave me file.get_managed

I then tried - sudo salt 'salt' sys.argspec file.get_managed -

but I saw you mentioned to use sys.state_argspec

sudo salt 'salt' sys.state_argspec file.managed

so what's the differance between file.managed and file.get_managed

and when should I use sys.argspec and sys.state_argspec ?

  • post-author-pic
    Elle K
    12-03-2018


    sys.argspec is for execution modules, sys.state_argspec is for state modules. You don't get any return for sys.argspec file.managed, because file.managed is a state module, not an execution module.

    Similarly, file.get_managed is an execution module, while file.managed is the state module built off the file execution module.

Looking For Team Training?

Learn More