Questions tagged [salt-stack]

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 saltstack tag on Server Fault.

1444 questions
5
votes
1 answer

How to compare version strings in salt sls files

Does saltstack have an equivalent to puppets versioncmp() function? Or alternatively, is there a way to get the distutils.version or packaging.version.parse methods (as mentioned on Compare version strings in Python) available in a jinja+yaml…
Geoff Crompton
  • 440
  • 1
  • 5
  • 15
5
votes
1 answer

what's the big difference between execution modules and state modules

Recently, I'm learning salt from its doc. However, I'm quite confused about execution modules and state modules. Why there are two types of module? Why they can't unify? If we have just one type of module that can be used both on command line and in…
ldjhust
  • 401
  • 3
  • 13
5
votes
1 answer

SaltStack: Reverse engineering where a file comes from

If you look at a host which was set up be SaltStack, then it is sometimes like looking at a binary file with vi. You have no clue how the config/file was created. This makes trouble shooting errors hard. Reverse engineering where a file comes from…
guettli
  • 25,042
  • 81
  • 346
  • 663
5
votes
0 answers

Minion did not return. [Not connected] when execute: salt 'minion1' test.ping

The question for the similar issue may have been asked for many times in stackoverflow. However after searching, I found no answer solve my problem. So I post it here to seek for your help. My system is Ubuntu 14.04. After setup master and minion…
ROBOT AI
  • 1,217
  • 3
  • 16
  • 27
5
votes
3 answers

Passing variables with include in salt-stack

I have several states that are almost the same. All of them deploy project, create virtualenv and configure supervisor. Difference is only in repo, project name and some additional actions. A lot of code is duplicated. Is it possible to put the same…
Raz
  • 7,508
  • 4
  • 27
  • 25
5
votes
1 answer

SaltStack: $HOME of users which does not exist yet

I create a user foo on a minion. The minion evalutes /etc/default/useradd. This means the salt master does not know whether the new $HOME will be /home/foo or in our case /localhome/foo. How can I get the $HOME of user foo as jinia variable? I need…
guettli
  • 25,042
  • 81
  • 346
  • 663
5
votes
1 answer

How can I check if AWS S3 sync has any changes?

I have some files in an Amazon S3 bucket, and I'm using SaltStack to copy all of those files to a directory on a minion. Unfortunately, SaltStack doesn't have the abilty to copy an entire directory from S3 (yet), so I've resorted to using the…
Wayne Werner
  • 49,299
  • 29
  • 200
  • 290
5
votes
1 answer

A quick guide on Salt-based install of Spark cluster

I tried asking this on the official Salt user forum, but for some reason I did not get any assistance there. I am hoping I might get help here. I am a new user of Salt. I am still evaluating the framework as a candidate for our SCM tool (as opposed…
Edmon
  • 4,752
  • 4
  • 32
  • 42
5
votes
1 answer

Salt: use script output as "source string"

I want to create a cron tab with salt. I found this method: salt.states.cron.file(name, source_hash='', user='root', template=None, context=None, replace=True, defaults=None, env=None, backup='', **kwargs) Provides file.managed-like functionality…
guettli
  • 25,042
  • 81
  • 346
  • 663
5
votes
1 answer

How do I get the path to the directory containing the current sls file or template?

A specific case leading to a more general question: I have a salt formula that looks like this: formula/ init.sls some_other_state.sls defaults.yaml As part of both sls's behavior I want them to load defaults.yaml into a dict. I can do…
Andrew
  • 4,058
  • 4
  • 25
  • 37
5
votes
1 answer

What open ports are required on firewall to allow for salt-stack remote execution?

The documentation on saltstack appears to be unclear regarding what ports are required from the salt-master -> salt-minion (apparently none are required). It suggests that ports only need to be opened from the salt-minion -> salt-master. (See:…
lintal
  • 339
  • 3
  • 15
5
votes
1 answer

salt-stack highstate - find slow states

Running an initial install takes about 20 minutes, running a salt-call state.highstate takes about 6 minutes. That's not unreasonable, but I'd like to speed it up, but I'm not sure how to find the slowest states. Is there any way to find how long…
Redzarf
  • 2,578
  • 4
  • 30
  • 40
5
votes
2 answers

salt-stack : adding grains to minion or to top file

It is said in saltstack documentation that adding : {% set node_type = salt['grains.get']('node_type', '') %} {% if node_type %} 'node_type:{{ self }}': - match: grain - {{ self }} {% endif %} to /srv/salt/top.sls will create a grain…
4m1nh4j1
  • 4,289
  • 16
  • 62
  • 104
5
votes
7 answers

Monitoring SaltStack

Is there anything out there to monitor SaltStack installations besides halite? I have it installed but it's not really what we are looking for. It would be nice if we could have a web gui or even a daily email that showed the status of all the…
Steven
  • 57
  • 2
  • 5
5
votes
1 answer

Vagrant with salt provisioner doesn't show any output

When creating vm I don't get totally any response from salt unless you're in verbose mode, where you have tone of crap flickering on your screen, it doesn't represent nice information as salt-call does. Here's what you get after vagrant up…
holms
  • 9,112
  • 14
  • 65
  • 95