Questions tagged [saltstack]

The Salt Project, previously known as SaltStack, is a Python-based open-source configuration management software and remote execution engine.

Salt is an open source tool to manage your infrastructure. Easy enough to get running in minutes and fast enough to manage tens of thousands of servers and still get a response back in seconds.

Execute arbitrary shell commands or choose from dozens of pre-built modules of common (or complex) commands. Target individual servers or groups of servers based on name, defined roles, or a variety of system information such as hardware, software, operating system, current version, current environment, and many more.

Bring your servers up to a known configured state by writing simple lists of items and defining attributes on those lists.

Links

See also the salt-stack tag on Stack Overflow.

281 questions
7
votes
3 answers

Salt State Testing via Jenkins

All, We're trying to have automated tests in our Jenkins setup to run "smoke" and "lint" type of tests in our salt state files (.sls). All google-foo so far has yielded very little information. There is a way to test via test=True in the command…
7
votes
1 answer

How do I check output of salt command that runs in background?

I've got a salt script written by someone else that is executing a bunch of commands. It runs for a very long time. My connection to the machine that runs it broke, but it is still running. How do I get back to it to see what it does? I did not…
simbabque
  • 207
  • 1
  • 4
  • 9
6
votes
3 answers

Find if linux machine is domain joined

We're joining our Linux machines to our Active Directory using adcli join. Now we start doing this as part of our saltstack setup, but we cannot figure out how to determine if the machine is already joined to the domain? It seems nothing breaks by…
carlpett
  • 926
  • 8
  • 18
  • 30
6
votes
4 answers

How to enable swap with salt stack?

How can I create and enable permanent 1GB swap file with salt stack that will work after reboot? salt.states.mount.swap does not allow to define swap size. Furthermore I need to define swappiness. Currently I do it with echo vm.swappiness = 10 |…
igo
  • 393
  • 4
  • 9
6
votes
3 answers

View file contents on a Salt Stack minion

How do I output the contents of a file on all my minions using Salt Stack? The only 'pull' functionality I can find is in this minion push commit, but this requires configuration changes on the master.
Petrus Theron
  • 1,601
  • 5
  • 17
  • 24
6
votes
2 answers

How to use Salt Stack with minions all behind NAT (not publicly accessible, default salt ports not open)?

Can Salt Stack minions communicate with the salt master from behind NAT/Firewalls, etc., using standard ports that would be open be default in all consumer NAT routers (and without the minions having a public DNS record or static IP)? I'm working my…
MountainX
  • 701
  • 3
  • 12
  • 25
5
votes
2 answers

How to copy file from master to minions on salt-stack?

I want to copy a file from salt stack master server to minion servers. I found a script from https://stackoverflow.com/questions/27687886/copy-a-file-from-salt-master-to-minions. But I got an error. copy_my_files: file.recurse: - source:…
Janith
  • 223
  • 2
  • 4
  • 8
5
votes
2 answers

Salt top.sls does not update on `salt-run fileserver.update` with gitfs

I have a single salt minion connected to the salt master. I recently renamed a large .sls from 'webserver.sls' to 'jetty.sls'. I use a gitfs backend with pygit2 and ssh. I have only enabled the gitfs backend. /etc/salt/master: fileserver_backend: #…
Groomblecom
  • 104
  • 7
5
votes
2 answers

How to use saltstack to manage different config file for different minions?

I have two minions with httpd server managed under saltstack. VirtualHost based on ports need to be configured for them separately. So /etc/httpd/conf.d/httpd-vhost.conf is watched like this: httpd: pkg.installed: [] service.running: -…
seanlook
  • 559
  • 2
  • 10
  • 18
5
votes
3 answers

salt-stack : No Top file or external nodes data matches found

To test salt-stack I would like to copy a config file to another distant one (I am testing master and minion in localhost) /etc/salt/minion : master: 127.0.0.1 file_roots: base: - /srv/salt/base /etc/salt/master: interface: 0.0.0.0 The…
4m1nh4j1
  • 167
  • 1
  • 2
  • 8
5
votes
1 answer

How to Install RVM and RUBY to the specific user in the salt-minion

I am using Ubuntu 12.04 for salt-master and salt-minion.When i try to install a package in the salt-minion using salt, it installs only in the system specific. But i need to install in the user specific. How to Install RVM and RUBY to the specific…
krs
  • 223
  • 1
  • 5
5
votes
1 answer

Adding Single Line to File with SaltStack

I would like to add the following lines to all /etc/sudoers files across my environment: # Administrators LDAP Group %Administrators ALL=(ALL) ALL However, each server has a different /etc/sudoers file, and sourcing them all from one…
Soviero
  • 4,366
  • 8
  • 36
  • 60
5
votes
1 answer

How to create salt from pillar using saltstack?

Lets take an example of what I have today: https://gist.github.com/Natim/6548009 I use the pillar to create a database and a user. It works fine on server with one of the roles but if I need both roles on the same server only the last pillar is…
Natim
  • 626
  • 1
  • 6
  • 16
5
votes
1 answer

Reloading Salt grains

I'd like to download a grains file from external source during the state.highstate is run. The file is not supposed to change usually - I'm only using this mainly for the initial provisioning. So it seems like I just want a file.managed state that…
viraptor
  • 1,296
  • 6
  • 21
  • 41
5
votes
1 answer

Should I keep my deployment settings in a separate repository?

I'm learning Salt Stack to deploy my Python application to various stages of production on AWS. Right now I have all my source code and salt states in one big repository. Are there any practical or security considerations in keeping minion state…
Petrus Theron
  • 1,601
  • 5
  • 17
  • 24
1
2
3
18 19