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
3
votes
3 answers

Do any configuration management systems explicitly support config changes made directly on a server?

In general (as far as I can see) the main infrastructure/configuration management systems (Puppet, Chef, Ansible, and SaltStack) are based on the philosophy that your servers are "cattle" and not "pets", and it seems that they can be antagonistic to…
iconoclast
  • 1,800
  • 2
  • 18
  • 30
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,591
  • 17
  • 72
  • 123
3
votes
1 answer

SaltStack: How to implement custom Jinja Filter?

I want to extend the jinja filters which are avaiable in SaltStack I want to create a simple filter called rpm_to_debian_name { package-name | rpm_to_debian_name } I only found docs about the salt specific filters:…
guettli
  • 3,591
  • 17
  • 72
  • 123
3
votes
1 answer

Securely copy file from one Salt minion to another

How do I use Salt to securely copy a sensitive file (a cryptographic key) from one specific minion to another specific minion? I don't want any other minion to be able to read the file. Salt Mine? The Salt Mine seems to be a logical place to start,…
Richard Hansen
  • 3,870
  • 1
  • 19
  • 17
3
votes
1 answer

Running postgres_database.present a second time causes error "has wrong parameters which couldn't be changed on fly"

Running a salt state that looks like the following to create a postgres database for django... django-db: postgres_database.present: - encoding: 'UTF-8' - owner: djangouser - db_user: postgres When I run it the first time, so far, so good: …
3
votes
1 answer

How to set hostname with salt-cloud command

I am using salt-cloud to create new aws instances: salt-cloud -p base_ec2_micro test.mydomain.com However, the instance gets its ip as hostname. What can I do to set the fqdn as hostname? Thanks
Cramix
  • 115
  • 10
3
votes
3 answers

How to get the public ip address of salt-minion from master?

root@I-Kod:/home/i-kod/Desktop/ass1# salt '*' network.ip_addrs { "I-Kod": [ "10.0.1.215" ] } { "neha-HP-Pavilion-15-Notebook-PC": [ "10.0.0.231" ] } { "Pavilion": [ "10.0.1.214" ] } { …
I-Kod
  • 31
  • 1
  • 1
  • 3
3
votes
1 answer

How should I backup pillar data for SaltStack?

It makes sense to backup the salt state to a git repo since there shouldn't be any sensitive data in there. But what about the pillar data? Should I just create a separate git repo for that, or put it in an S3 bucket, or encrypt the data somehow?
syvex
  • 141
  • 4
3
votes
1 answer

How do I make cmd.run answer a prompt in salt-stack?

I've got a salt script that is being executed with state.sls like this: salt '*' state.sls foo.bar In my script I've got this: foo-bar: cmd.run: - php foo.php bar --delete - cwd: /srv/foo The --delete flag will cause the script to…
simbabque
  • 207
  • 1
  • 4
  • 9
3
votes
2 answers

saltstack: how to re-push a key from a salt-minion to a salt-master?

The short version: How to get test.ping to work, after keys are -Added? And how to re-push a key if you -Deleted it from the master? The long version: Steps to reproduce: on two RPIs install the latest Raspbian on an RPI from the…
user246604
  • 131
  • 1
  • 1
  • 5
3
votes
1 answer

Simple web tool for viewing log

I'm developing a server deployment script that installs a bunch of stuff and generates a log in the process. I'd like users of the script to be able to view what's happening, on a web page, in real time (eg, without browser refresh). What's a simple…
Steve Bennett
  • 5,750
  • 12
  • 47
  • 59
3
votes
2 answers

How do I list IP addresses where minions connect from?

Some minions are behind NAT and I'd like to get their public IP address as seen from master (for firewall purposes). There is external_ip grain but AFAIK it depends on third party service and doesn't even work reliably for me.
Juraj
  • 257
  • 3
  • 9
3
votes
1 answer

SaltStack pillar includes under same key

I couldn't find anything in documentation about having multiple includes under the same key, but when I tried it, I ended up with only that last include keys under the root key. For example: /srv/pillar/top.sls base: '*': - ports cat…
LavaScornedOven
  • 253
  • 2
  • 10
3
votes
1 answer

LXC and Saltstack minion_id configuration on Ubuntu

I'm using LXC as a lab platform for testing SaltStack scripts. The lab consists of +5 Ubuntu 12.04 LTS containers, which I create by cloning a template container with salt-minion pre-installed. Once I create the template container and install…
LavaScornedOven
  • 253
  • 2
  • 10
3
votes
1 answer

Structuring Salt State Files for Staged Environments

How should Salt State Files and Pillar configurations be structured to enable smooth deployment of varying minion roles for staged environments like dev, qa and production as well as feature branches? I have arranged my root and pillar state files…
Petrus Theron
  • 1,601
  • 5
  • 17
  • 24