I have installed Salt-master in my ubuntu 12.04 machine and salt minion in ubuntu 12.04. I want to install package containing like svn,mongodb,postgres,maven,python in the salt-minion. how to create package to install all these in salt minion?.Please do let me know.

when i run "sudo salt '*' state.highstate test=True"

@rome:~$ sudo salt '*' state.highstate test=True

i am getting the following error


State: - no
Name:      states
Function:  None
    Result:    False
    Comment:   No Top file or external nodes data matches found


Succeeded: 0

Failed: 1

Total: 1

  • 1
    Do you mean just install these packages from the package repository? Then just add pkg: svn, pkg.installed (with proper newlines etc), as the docs say. I think I don't understand your specific question.
    – Halfgaar
    Feb 3, 2014 at 8:05
  • let me know where to add this line?
    – krs
    Feb 3, 2014 at 8:11
  • 1
    you have to create a top.sls and then a salt state like mypackages.sls, references by top.sls. This is plainly documented.
    – Halfgaar
    Feb 3, 2014 at 8:22
  • can you provide a package file for above and how it needs to be installed (command)?
    – krs
    Feb 3, 2014 at 9:28

1 Answer 1


First create a mypackages.sls file with your packages



    - name: mongodb

You need to put that in your top for selected hosts ('*'):

# cat top.sls
  - mypackages

Then test it:

salt '*' state.highstate test=True
  • what is examplewithexplicitname? do let me know
    – krs
    Feb 3, 2014 at 10:51
  • do explain this step You need to put that in your top for selected hosts (''): # cat top.sls '': - mypackages
    – krs
    Feb 3, 2014 at 10:54
  • That was to let you know to create a state that is not named after the package your installing. Normally, name is inferred from the state name, but you can specify it by hand with - name:
    – Halfgaar
    Feb 3, 2014 at 10:56
  • kindly take note of it. this is my result pastebin.com/ZGsHmfGP
    – krs
    Feb 3, 2014 at 11:04
  • With the salt docs, you should have enough information to add that to your top and apply it to your minions.
    – Halfgaar
    Feb 3, 2014 at 12:09

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.