Questions tagged [salt-stack]

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 saltstack tag on Server Fault.

1444 questions
4
votes
1 answer

AWS IAM Policy to give to salt-cloud user

When creating a IAM user for salt-cloud, what are the minimum rights to give it so that it can do its job following the principle of least privilege? I just need to create EC2 instances, using a map file: however I don't know enough salt-cloud to be…
Iacopo
  • 4,224
  • 1
  • 23
  • 25
4
votes
2 answers

Minion ID configuration/detection

I am really curious about when the minion id loads? http://docs.saltstack.com/en/latest/ref/configuration/minion.html#std:conf_minion-id Here, it says that the minion id is the system's default hostname. When does this value get loaded up? Everytime…
tudoricc
  • 709
  • 1
  • 12
  • 31
4
votes
2 answers

Improved way of scaling in saltstack

I have a problem about the Jinja2 template and that problem is breaking a one line string over multiple lines when it comes to writing a state or anything in salt [my exact case refers to trying to write a list of machines one after the other,in a…
tudoricc
  • 709
  • 1
  • 12
  • 31
4
votes
1 answer

targeting salt minions using multiple grains

In our infrastructure, we set multiple grains on the minion including an 'environment' and 'component' grain. Based on this, there can be multiple minions with the same component name, each in a different environment. I want to be able to select…
4
votes
4 answers

Automation of releases of microservices-based application

We are working on the application that consists of many standalone services. It has advantages over the single monolithic application, but not when we do releases. We do weekly release cycles. Each service/component located in the separate git…
4
votes
2 answers

SaltStack cmd.run with curl and json body

I have a trivial task that I am stuck to write salt state for. I need to call REST endpoint using curl with json body. This is curl localhost/endpoint -d '{"some" : "data"}' My idea was to simply take this and put it into salt state by using…
Martin
  • 708
  • 2
  • 10
  • 20
4
votes
3 answers

How to force pkgrepo refresh only one time per highstate?

I have a bunch of packages in a private debian repository. Following salt documentation (http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkgrepo.html), in a salt state I defined a pkgerepo entry like this: my-private-repo: …
Oberix
  • 1,131
  • 7
  • 13
4
votes
1 answer

Salt fails to execute commands with pipes or redirects

When I run any command with a pipe or redirect in it, it fails. Both master and minion are running on fresh Ubuntu 14.04 boxes on Digital Ocean created to test out Salt. Both were installed using the bootstrap script pulling the latest branch from…
Stuart Johnston
  • 113
  • 2
  • 7
4
votes
1 answer

regular expression match in salt-stack

I'm rewriting some modules from puppet to saltstack. In puppet we can use node to specific this part is for this machine, for example: node /william\d+.aws.dev/ { # some codes here.. } But in saltstack, it's not that much elegant: {% if…
Ethan Xu
  • 143
  • 1
  • 7
4
votes
3 answers

State in SLS file is not formed as a list

I've got an sls file; the contents of which follow: apache: pkg.installed: -name: apache2 service.running: -enable: True - require: - pkg: apache And I'm getting the error when trying to provision an Ubuntu Vagrant box with salt…
David Boshton
  • 2,555
  • 5
  • 30
  • 51
4
votes
1 answer

Salt custom grains

I am trying to write custom grains. I put this code in /etc/salt/grains #!/usr/bin/env python def function(): grains = {} grains['test'] = "test" return grains and to test it I created this script: import salt.config import…
4m1nh4j1
  • 4,289
  • 16
  • 62
  • 104
4
votes
3 answers

Saltstack create user : password is not set

I am trying to automate the creation of my users with Saltstack. I created a pillar conf: users: homer: fullname: Homer Simpson uid: 1007 gid: 1007 groups: - sudo - adm crypt: $6H7kNJefhBeY pub_ssh_keys: -…
Alex Grs
  • 3,231
  • 5
  • 39
  • 58
4
votes
1 answer

Saltstack set variables after a state

I have a question about SaltStack variables. I want to set a folder name, something like: {% set exim4_folder = salt['cmd.run']('ls /tmp | grep exim4') %} but the folder I am trying to get is not available till the state I ran before that…
Adamba4
  • 181
  • 1
  • 2
  • 9
4
votes
3 answers

How to perform an unattended installation of Sitecore?

My team is attempting to perform an automated installation of Sitecore via Salt using the Sitecore executable. We prefer to use the .exe over a manual installation of the zip package because the installation wizard handles registering Sitecore as an…
Derek Hunziker
  • 12,996
  • 4
  • 57
  • 105
4
votes
1 answer

Setting up a python virtual environment with Salt's virtualenv.managed or pip.installed?

I'm trying to use either a pip.installed or a virtualenv.managed state to set up a virtualenv using a requirements file that lives on the minion (installed by an earlier git.latest state). Here's the version using pip.installed: mysite-env: …
David Eyk
  • 12,171
  • 11
  • 63
  • 103