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

Error when launching salt-master

I have this error when I execute salt-master: # salt-master [ERROR ] Failed to read the virtual function for module: apt Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 861, in gen_functions …
4m1nh4j1
  • 167
  • 1
  • 2
  • 8
0
votes
1 answer

How can I specify an environment for salt's top.sls file from Vagrant?

I want to use Vagrant to deploy a range of boxes with salt. I've looked through all the available Vagrant salt options available in salty-vagrant (now built in) and I can't see any that would let me specify which "environment" to use, as referenced…
0
votes
2 answers

Salt-Stack copy file python API from salt master to specific minion

I am using CentOS6.5. I can successfully copy a file from master to a minion with id=minionId by running the following command on the master: salt minionId cp.get_file salt://fileInMaster.txt /home/johnDoe/fileNowInMinion.txt ##run on master If I…
The Governor
  • 153
  • 1
  • 8
0
votes
1 answer

Can we add post commands with the salt network module?

I'd like to add post-up and post-down commands to my network interfaces. Can salt.states.network do that ? If not what would be the best way to add them using salt knowing that I can't simply add them at the end of the file since there is other…
Nicolas BADIA
  • 366
  • 1
  • 6
  • 15
0
votes
1 answer

How to access data from mysql-formula pillar?

I'm trying to use mysql-formula, using it's pillar to set up a database and a user. But, I'd like to use the configured password elsewhere, and I haven't figured out how to do that. Any help appreciated. Here's the example…
viq
  • 1
  • 1
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
  • 2,012
  • 2
  • 18
  • 26
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
  • 195
  • 1
  • 1
  • 12
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,670
  • 5
  • 34
  • 59
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
  • 25
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