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

using grain data in a custom salt stack grain

I would like to write what is effectively a "virtual grain" that determines some value based on the value of other grains, using a custom grain. Specifically, I want to provide a grain values, env, that tells me which virtual environment the host is…
Nigel
  • 103
  • 3
0
votes
1 answer

How would one restart a service only if it is already running, using SaltStack?

Say I have a service on several servers, controled in a cluster way (heartbeat), disable (on startup) because I want it to run only on the active node: haproxy: service.disabled: [] I want to be able to update its configuration…
Christophe Drevet
  • 1,962
  • 2
  • 17
  • 25
0
votes
2 answers

Salt-cloud docker state, handle volumes

I'm using dockerio salt state to startup docker containers on a salt minion. Trying to mount volumes into my container is failing. Container is starting but volumes are not bound. What am I missing? Aiming for this: sudo docker run \ …
jacksoncage
  • 185
  • 1
  • 1
  • 11
0
votes
2 answers

SaltStack minions require restart after replacing master

I'm using SaltStack to manage several servers on EC2, including both Linux and MS-Windows installations. The master server is deployable in its entirety (using cloud-init) and when I change the configuration of the master I just trash the old master…
Guss
  • 2,520
  • 5
  • 32
  • 55
0
votes
1 answer

why does my use of the saltstack apache-formula fail to set the 'id' variable

why does my use of the saltstack apache-formula fail to set the 'id' variable ? my code is as fallows ? apache: sites: changed.com: template_file: salt://salt/formulas/salt/apache-formula/apache/vhosts/standard.tmpl …
0
votes
1 answer

Outputting salt-mine data into template

Can anyone spot my error here. I have the following in the minion config: mine_functions: network.interfaces: [] I expect the following to return the IP of all minions: {% for ip in salt['mine.get']('*', 'network.interfaces', ['eth0']).items()…
Joseph Gardner
  • 41
  • 1
  • 1
  • 7
0
votes
1 answer

Saltstack grains error in template file

Using {{ grains['host'] }} in a managed file returns the following error: Function: file.managed Result: False Comment: Unable to manage file: Jinja variable dict object has no element Undefined; line 54 name = {{…
Joseph Gardner
  • 41
  • 1
  • 1
  • 7
0
votes
0 answers

Rollback Salt-stack version

I've been using salt-stack version 0.17.4 for a while on a CentOS server. I installed salt on a new server by going to the saltstack website, adding the rpm and using a yum install salt-minion and was brought to version 2012.1.0. Is there a way to…
secure212
  • 228
  • 1
  • 3
  • 10
0
votes
1 answer

Ensuring data consistency in s3 with multiple users writing/reading

I need advice/ ideas about how can I ensure data consistency in my s3 bucket. I have 2-3 users pushing and reading resources from s3. As one can easily see this leads to data inconsistency( User A is downloading that resource from S3 while User B is…
APZ
  • 954
  • 2
  • 12
  • 24
0
votes
1 answer

How to install pip and other specific python modules onto a CentOS server that is air-gapped from the internet?

Ultimately, I'm trying to install SaltStack on a super computer that has no internet connection. And I'm not allowed to hook it to the internet. So far, I have installed an entire yum repo on the server and a CPAN. But the yum repo can't find…
Lynn
  • 299
  • 6
  • 16
0
votes
1 answer

Start a sub provision in Salt

I need to have two project. One is to set up the server. The other is the web app. I'm trying to use SaltStack to do this via Vagrant. What I want to happen is that after the server is provisioned, I want to be able to call to the folder where…
Quantum
  • 75
  • 1
  • 12
0
votes
2 answers

Saltstack master has dynamic ip address

What is the best way to manage a minions master location when the master within SaltStack has a dynamic IP address? Is there a way to automatically update the minions (master) IP address?
user204088
  • 147
  • 4
0
votes
1 answer

How would I template an SLS using saltstack

I'm trying to do proof of concept with Mongodb(sharding) and Id like to run a command every time I spin up a new cluster without having to add lines in all my sls files. My current init is as follows: mongo Replica4:27000…
secure212
  • 228
  • 1
  • 3
  • 10
0
votes
1 answer

Saltstack: is it possible to forbid certain commands when using cmd.run?

Let's say I have a salt-master and decide to run some arbitrary command in all my minions. But because I had a bad night, I was robbed on my way to work, my boss yelled at me for being late and my co-workers decided to play on me that nasty joke…
rsuarez
  • 374
  • 5
  • 11
0
votes
1 answer

Requisite of file.append

Is it possible to make salt require that a particular file was appended to as opposed to the file merely existing? It seems like I can only require a file state. The source looks like it strips out any method names from a require attribute. In the…
Jeff Strunk
  • 2,107
  • 1
  • 24
  • 29