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
5
votes
2 answers

How do you execute a cmd.script once the pre-requisite files have been downloaded?

I have a very simple use case that I'm trying to get going: I need to download and install a few tar.gz source packages from the master and then run a script to compile and install all of them. I realize this is probably a basic question, but any…
Carl
  • 211
  • 1
  • 2
  • 7
4
votes
1 answer

How to reposync saltstack? reposync failing with error message `Removing [...], due to missing GPG key.`

On a RHEL 7.4 system, I add the salt-latest repo as follows: yum -y install https://repo.saltstack.com/yum/redhat/salt-repo-latest-2.el7.noarch.rpm Notice, amongst other things, this creates the following two GPG key…
Edward Ned Harvey
  • 482
  • 3
  • 6
  • 14
4
votes
2 answers

SaltStack: How to work around "file.recurse doesn't preserve permissions"?

How to work around Recursive directory management doesn't preserve permissions? I want to copy all files in (local) /monitoring/files/etc to /etc on the minion. copy_files_in_etc: file.recurse: - source: - salt://monitoring/files/etc …
guettli
  • 3,113
  • 14
  • 59
  • 110
4
votes
1 answer

Moving Salt Master to a new server

So I am tasked with migrating some servers into AWS. One of the servers is a Salt Master. Upon investigation, all Salt Minions connect to the Master using DNS name instead of IP Address, so from connectivity standpoint I only need to change the A…
pepoluan
  • 4,918
  • 3
  • 43
  • 71
4
votes
1 answer

SaltStack: schedule highstate in batch

I would like to schedule a highstate to run every night but not in parallel. Is there a way to add batch option to the scheduling system? Example: schedule: highstate: enabled: True function: state.highstate maxrunning: 1 when:…
HTF
  • 3,050
  • 14
  • 49
  • 78
4
votes
1 answer

Salt-Stack copy directory from salt master to minion

Background: I have been working on setting up a salt-environment, and reached the point where I want to distribute not only files, but also directories. I've found that the most sensible way to do this is to place the directory I want copied in…
simonra
  • 143
  • 1
  • 1
  • 3
4
votes
1 answer

Salt - What's the difference between Rejected and Denied?

So I have the salt master running on a server in my infrastructure and a few keys sitting there either accepted or unaccepted or... Either rejected or denied. My question is: What's the difference between rejected or denied keys?: Denied…
Ethan Brouwer
  • 225
  • 2
  • 9
4
votes
1 answer

Salt minions keep losing connection to master

I'm testing Salt. I have a simple test setup of 3 VirtualBox VM's -- with salt-master running on one of the machines and salt-minions running on the other 2 VM's. I can start either of the salt minion VM's and they will connect to the master and…
Brendan Abel
  • 270
  • 3
  • 13
4
votes
1 answer

Saltstack iterate through second level pillar data

I might be missing something or this might just be the wrong way to layout pillar data. I want to iterate through the second level of pillar data. Pillar example: repo: Option1: version1: display_name: "abcde" …
Joseph Gardner
  • 41
  • 1
  • 1
  • 7
4
votes
1 answer

Delay execution of command until after something else has run

I am trying to write a deploy script with salt. It mostly works. I have to run highstate a couple of times for it work all the way. My biggest issue is working through how to execute commands one after another based on specific first one, and them…
Buddy Lindsey
  • 259
  • 3
  • 9
4
votes
1 answer

Verifying Salt states before committing

I'm storing my salt sls files in a git repository, but I have the perennial problem that I can't verify my YAML represents a valid set of states that could be applied (I've also had difficulty validating my YAML -- that's much easier, though). …
Andrew Aylett
  • 599
  • 3
  • 14
3
votes
0 answers

GitFS Salt Environments with a single top.sls

The documentation states that if you use salt_top_saltenv: base in the master config, that I can force all Minions to only use the base saltenv for the top file, ignoring all other top files, is that correct? With state_top_saltenv set to base,…
MAHDTech
  • 131
  • 4
3
votes
1 answer

Storing saltstack server configs in version control

I currently have a few servers that are managed by saltstack, every now and then saltstack fails to deploy the new configs because of an issue somewhere and it can take a while to work out what changed that caused the issue. It seems like having…
3
votes
1 answer

SaltStack: NamespacedDictWrapper object has no attribute

I get this message, and I have no clue why salt:/srv # salt-ssh foo-archiv state.sls monitoring [ERROR ] Rendering exception occurred: Jinja variable 'salt.utils.context.NamespacedDictWrapper object' has no attribute 'monitoring' [CRITICAL]…
guettli
  • 3,113
  • 14
  • 59
  • 110
3
votes
1 answer

Apply states on minions after they come online

Imagine you want to apply some states on a group of minions, such as all ubuntu clients. It's possible by the time we apply that states some of the minions are offline. How long do states remain in the message bus to be pushed on minions? What…
AKJ88
  • 143
  • 1
  • 7
1 2
3
18 19