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

Deploying latest .NET Framework with Saltstack

Is there an "apt-get install .NET-Framework" for Windows Server 2008+? Some way I can update to the latest .NET Framework 4+, preferably using Saltstack?
Petrus Theron
  • 1,541
  • 5
  • 16
  • 24
2
votes
0 answers

Install New Relic using SaltStack on Windows Minion

How can I install New Relic on my Windows minions via SaltStack without having to RDP into each Windows minion? I found some New Relic documentation for installing via the command-line on Windows, but would it be possible to use the Windows-based…
Petrus Theron
  • 1,541
  • 5
  • 16
  • 24
2
votes
1 answer

How to create packages in SaltStack

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…
krs
  • 223
  • 1
  • 5
2
votes
1 answer

How to configure SaltStack to work on other machines

I have installed SaltStack in my system (Ubuntu 12.04). for example If i want to run sudo apt-get update or wget to other machines like 4 to 5 machines using Salt. How should i want to configure my SaltStack to work on this machines.
krs
  • 223
  • 1
  • 5
1
vote
1 answer

Salt configuration for nftables prerouting

I'm trying to configure a nftables-rule for forwarding traffic from my server to a LXC container, however, the way that the salt states module for dport renders the given value is not accepted by nftables. How should I proceed? Salt…
jbakker
  • 121
  • 3
1
vote
1 answer

SaltStack: Delete directory, if it is empty

How can I delete a directory with SaltStack, if it is empty? First I remove a file in this directory, and then I would like to delete the directory. But if there is one or several files in the directory, then the directory should not be removed. I…
guettli
  • 3,113
  • 14
  • 59
  • 110
1
vote
1 answer

Automatic pillars by host name

I have problem where managing multiple domains in one top.sls file is getting difficult. How could I write top.sls so that it only takes those pillars that match my minion name/hostname. For example: There is deplo1.domain1.app minion It loads…
1
vote
2 answers

Saltstack state.apply determine whether it is being run in test=True mode ?

We are using serverdensity (BETA MODULE - https://docs.saltstack.com/en/latest/ref/states/all/salt.states.serverdensity_device.html) with salt and have hit the (bug?) where if you try a : salt '*SERVER-01*' --state-output=mixed state.apply…
M Haswell
  • 31
  • 5
1
vote
1 answer

Deliver unique file for each Salt minion

There is some directory path, like /etc/opt/mysoft which contents should be different for each minion. So for minion A it contains config.ini with come contents and for minion B it contains config.ini with different contents and additionally file…
adontz
  • 337
  • 4
  • 12
1
vote
2 answers

Executing arbitrary sls file with salt

I'm learning about salt. I understand that the way things work, state files must be put under a root directory specified statically in the master/minion config. So my question is, is there a way to execute an arbitrary sls file on the filesystem,…
1
vote
1 answer

SaltStack: How to create user and a directory in his HOME directory?

I want to create a user and a directory in his HOME directory. Unfortunately the HOME directory is not allways directly under /home. On some minions it is under /localhome and some use /users/.
guettli
  • 3,113
  • 14
  • 59
  • 110
1
vote
1 answer

Saltstack and Python3 issue

I'm having a bit of an issue with the following recipe: setup-compose: file.managed: - source: https://github.com/docker/compose/releases/download/1.21.1/docker-compose-Linux-{{ grains['cpuarch'] }} - name: /usr/local/bin/docker-compose …
user472387
1
vote
1 answer

salt-ssh Do changes which spans several hosts

I need to change two hosts: A new web-server gets configured A tunnel between tunnel-host and the new web-server should get created We implemented both, and both steps work: root@s# salt-ssh webserver-new state.sls webserver root@s# salt-ssh…
guettli
  • 3,113
  • 14
  • 59
  • 110
1
vote
1 answer

SaltStack: Stop on first error

I have a sls file for SaltStack which looks like this: etckeeper: pkg.installed etckeeper_extra_packages: pkg.installed: - pkgs: - hwinfo {%- if not salt['file.directory_exists' ]('/etc/.git') %} init_etckeeper: cmd.run: -…
guettli
  • 3,113
  • 14
  • 59
  • 110
1
vote
1 answer

SaltStack: How to remove a block which was created with file.blockreplace?

I use file.blockreplace like this: etc_sudoers_{{ system_name }}: file.blockreplace: - name: /etc/sudoers - marker_start: "# START etc_sudoers_{{ system_name }} -DO-NOT-EDIT-" - marker_end: "# END etc_sudoers_{{ system_name }} --" …
guettli
  • 3,113
  • 14
  • 59
  • 110