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
0
votes
1 answer

Can ext_pillar be configured depending on pillarenv or saltenv?

I'm looking for a way to select the external pillar depending on saltenv or pillarenv variable. From saltstack documentation, ext_pillar does not support the same syntax as pillar_roots…
skizo
  • 145
  • 1
  • 6
0
votes
2 answers

How to install salt for python3?

When I check my salt-minion version, I get the following message: [root@localhost ~]# salt-minion --version /usr/lib/python2.7/site-packages/salt/scripts.py:198: DeprecationWarning: Python 2.7 will reach the end of its life on January 1st, 2020.…
0
votes
1 answer

SaltStack: No usable error message if dpkg fails

I get this message from salt-ssh ID: apache Function: pkg.installed Result: False Comment: Problem encountered installing package(s). Additional info follows: errors: - Running scope as unit:…
guettli
  • 3,591
  • 17
  • 72
  • 123
0
votes
1 answer

Call state directly via salt-ssh

Is it possible to call this state via salt-ssh directly? vim: pkg.installed I mean without creating an sls file?
guettli
  • 3,591
  • 17
  • 72
  • 123
0
votes
1 answer

Loop through salt pillar to create file without knowing keys

Background: I need to make an XML file like this:
static
  • 141
  • 7
0
votes
1 answer

Salt-Stack init process after package is installed

Installing AIDE needs to follow by a init proces. aide: pkg: - installed Now the following commands need to run only once: /usr/sbin/aide --config=/etc/aide.conf --init mv -f /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz How to manage this…
BdK
  • 1
  • 1
0
votes
1 answer

SaltStack: normalize Package name

I would like to have less conditions in my saltstack sls files. Up to now it looks like this: foo_package: pkg.installed: - pkgs: {% if grains.os_family == 'Debian' %} - foo_BAR {% else %} - foo-bar {% endif %} I would…
guettli
  • 3,591
  • 17
  • 72
  • 123
0
votes
2 answers

saltstack equivalent of puppet last_run_summary.yaml

Does Salt have the equivalent of Puppet's last_run_summary.yaml? If not, what's the suggested way to monitor the success or failure of executions on individual salt minions?
user162988
  • 13
  • 5
0
votes
1 answer

Saltstack: How to install a new zypper RPM Repo?

How to add a new rpm package repo via saltstack? I checked the docs, and only see method to list, modify or delete repos: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.zypper.html I would like to do this: root@server# zypper ar…
guettli
  • 3,591
  • 17
  • 72
  • 123
0
votes
1 answer

Saltstack formulas (starter)

Is any saltstack formula 'skeleton' available so it can create a structure as described here? In chef you have knife cookbook create or in ansible ansible-galaxy init.
silviud
  • 2,687
  • 2
  • 18
  • 19
0
votes
1 answer

Salt: Raise Error if file.replace did not find anything to replace

Maybe I am blind, but I could not find a way to let the salt-ssh call fail, if file.replace did not replace a single line. If the pattern I provide did not match, then I want to get noticed. Example: enable_foo: file.replace: - name:…
guettli
  • 3,591
  • 17
  • 72
  • 123
0
votes
1 answer

Jinja "for loop" statement with multiple lines (saltstack)

When using salt for specifying user creation, it is unorganized to have the for statement in a single line. Example: {% for USR in 'hewey','dewey','loui' %} Is it possible to break this into separate lines like: {% for USR in %} {% 'hewey', %} {%…
David
  • 1
  • 1
0
votes
2 answers

Salt: file.replace on a list of files (globbing)

I use file.replace and would like to use this not on a single file, but on a list of files. The list of files comes from globbing. Example: I want to modify /etc/ImageMagick*/policy.xml. The file can be /etc/ImageMagick-6/policy.xml or…
guettli
  • 3,591
  • 17
  • 72
  • 123
0
votes
1 answer

Salt: file.replace: ignore_if_missing gets ignored?

I want to enable logging of an fstp server like this: https://serverfault.com/a/74234/90324 But salt does nothing. I reduced it to this: enable_logging_of_sftp: file.replace: - name: /etc/ssh/sshd_config - pattern: Sxxxxubsystem -…
guettli
  • 3,591
  • 17
  • 72
  • 123
0
votes
1 answer

How to instal vim using salt stack?

I have salt-stack maser and minion servers which running on centos7. I want to install vim package in minion server. For that I have created srv directory and vim.sls file under etc. My vim.sls file looks like this. vim: pkg: -…
Janith
  • 223
  • 2
  • 4
  • 8