Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

paris:

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

Summary

Succeeded: 0

Failed: 1

Total: 1

share|improve this question
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 at 8:05
    
let me know where to add this line? –  krs Feb 3 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 at 8:22
    
can you provide a package file for above and how it needs to be installed (command)? –  krs Feb 3 at 9:28

1 Answer 1

First create a mypackages.sls file with your packages

vim:
  pkg.installed

postgres:
  pkg.installed

examplewithexplicitname:
  pkg.installed:
    - 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
share|improve this answer
    
what is examplewithexplicitname? do let me know –  krs Feb 3 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 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 at 10:56
    
kindly take note of it. this is my result pastebin.com/ZGsHmfGP –  krs Feb 3 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 at 12:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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