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.

277 questions
83
votes
6 answers

How do I list all connected Salt Stack minions?

Sometimes my saltmaster hangs for a while on salt '*' test.ping waiting for downed minions to reply. Is there a way so see a list of connected minions, regardless of whether they respond to test.ping?
Petrus Theron
  • 1,541
  • 5
  • 16
  • 24
40
votes
0 answers

What advantages/features does Puppet or Chef offer over Salt (or vice versa)?

I am looking at rolling out a new configuration management tool to replace our home-grown solution. The defacto standards are Chef and Puppet, both of which are Ruby-centric (though can be used to deploy non-Ruby environment, obviously). The vast…
jamieb
  • 3,387
  • 4
  • 24
  • 36
24
votes
3 answers

Configuration management: push versus pull based topology

The more established configuration management (CM) systems like Puppet and Chef use a pull-based approach: clients poll a centralized master periodically for updates. Some of them offer a masterless approach as well (so, push-based), but state that…
Willem
  • 2,712
  • 3
  • 27
  • 34
17
votes
5 answers

When is it appropriate to use a configuration manager (eg Puppet / Chef / Ansible)?

At my current workplace, I look after two VMware host machines, an OpenBSD physical machine, three Debian VM's, and six Windows Server VM's (2008/2012). I'm considering implementing a configuration management tool such as Puppet or Chef. Is this…
Rhyven
  • 183
  • 8
15
votes
3 answers

SaltStack: Call a single state of a sls file

I fail to call a single state of an sls file. Whole sls file works This works: salt-ssh w123 state.sls monitoring This works: salt-ssh w123 state.show_sls monitoring One item of above output: monitoring_packages: ---------- __env__: …
guettli
  • 3,113
  • 14
  • 59
  • 110
13
votes
3 answers

SaltStack: Execute `systemctl --system daemon-reload` if service file was changed

We deploy and change system service files via SaltStack. For example, if file /etc/systemd/system/superfoo.service gets changed, then systemd emits this warning: Warning: Unit file of superfoo.service changed on disk, 'systemctl --system…
guettli
  • 3,113
  • 14
  • 59
  • 110
12
votes
3 answers

Clear Directory with Salt State File

How do I clear a directory on a salt-minion using a state file? I want to delete all *.conf files in /etc/supervisord/conf.d/ before I set up other supervisor services. The following top.sls configuration has no effect: /etc/supervisor/conf.d/*: …
Petrus Theron
  • 1,541
  • 5
  • 16
  • 24
11
votes
2 answers

deploy ssh key from master to minion via salt pillars

I have two ssh keys that I'm trying to deploy to one of my minions. But I can't seem to get it to deploy. It errors out. Here is the init.sls in pillars: /xxx/yyy/zzz/id_rsa: file.managed: - source:…
secure212
  • 228
  • 1
  • 3
  • 10
11
votes
5 answers

Can Salt (Saltstack) gather and relay data for Graphite, Ganglia, or Zenoss?

I'm starting a new project and considering using Ansible or Salt for deployment automation and, perhaps, more sophisticated orchestration (server management and federation). With Salt I'm wondering if there's any integration between it and Graphite…
Jim Dennis
  • 807
  • 1
  • 10
  • 22
10
votes
3 answers

SaltStack: Is there a way to only display failed and warnings in output?

Running state.apply or state.highstate on minions can result in hundreds of lines in output. Sometimes only one minion can be enough. ... Summary for my_minion -------------- Succeeded: 112 (changed=78) Failed: 6 Warnings: …
gogan
  • 115
  • 1
  • 6
10
votes
2 answers

SaltStack: How one can execute a state only once?

I have to execute a state only once. I couldn't find a simple way to do this. Now, the context I install two MySQL servers through salt. I want to make one a slave of the other. In order to setup the slave, I need to get the master status…
Christophe Drevet
  • 1,962
  • 2
  • 17
  • 25
9
votes
1 answer

salt stack: use state jinja variables in template

What I'd like to do is generate multiple configuration files for each openvpn user. I have the IP address and additional configuration in pillar. For example: openvpn: - user1: ip: 1.2.3.4 config: - line1 - line2 In the SLS…
Herrberg
  • 93
  • 1
  • 1
  • 3
7
votes
1 answer

Unable to generate GPG keys without passphrase on Ubuntu 18.04

Has anyone tried creating GPG keys for encrypted pillars on Ubuntu 18.04? I'm using the following command to attempt to generate the keys: gpg --gen-key --homedir /etc/salt/gpgkeys When I run that I get the usual set of questions, full name, email,…
Soviero
  • 4,306
  • 7
  • 34
  • 59
7
votes
1 answer

SaltStack | How to assign the shell output from cmd.run to Jinja variable?

Problem Unable to assign the output from cmd.run in my Salt State. The condition always return true even if the load_avg in the minion is not really equal or beyond the threshold. I also included in the configuration the things I have…
devxvda1
  • 185
  • 1
  • 1
  • 7
7
votes
1 answer

Salt: Minion did not return but salt-call is working

I am working with SaltStack on Windows minions (Linux master). I have written a simple .sls file which copies a hello-world.txt at C:/hello_world.txt. I have also written my top.sls and configure my file_roots. Minions keys have been accepted (and…
MarAja
  • 203
  • 3
  • 6
1
2 3
18 19