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
1
vote
1 answer

salt-stack : Using multiple grain files

How can I use multiple grain files and organise them in directories : # pwd /etc/salt This is just an example: etc └── salt └── minion    ├── minion     ├── grains_1    ├── app_name       └── grains_2 Or I am…
4m1nh4j1
  • 167
  • 1
  • 2
  • 8
1
vote
1 answer

SaltStack returning too much detail

Whenever I run salt '*' state.highstate, Salt outputs each module using the following format: service_|-zabbix_server_|-zabbix-server-mysql_|-running: ---------- __run_num__: 17 changes: ---------- comment: …
Soviero
  • 4,306
  • 7
  • 34
  • 59
1
vote
1 answer

how to query postgresql database via salt

I need to run a query on a postgresql database in a module I'm writing for Salt. It won't do much, just query a table for a value to determine what version of the software is installed. The docs have a psql_query function but you can't specify the…
lsh
  • 148
  • 1
  • 12
1
vote
1 answer

Basic Salt File server commands not working

I have a salt master and just one salt minion with the Id saltMinion2. I installed the rpm salt-master-2014.1.10-4.el6.noarch on the master and salt-minion-2014.1.10-4.el6.noarch on the minion and both machines are CentOS6.5. Master is able to…
The Governor
  • 153
  • 7
1
vote
2 answers

Cannot run SaltStack master on FreeBSD 10

I want to install SaltStack in a brand new FreeBSD 10 machine. I am following the official documentation: http://docs.saltstack.com/en/latest/topics/installation/freebsd.html But when I try to launch the salt_master daemon it fails with this error…
Vinícius Ferrão
  • 5,400
  • 10
  • 52
  • 91
1
vote
3 answers

SaltStack targeting minions with *

I am using SaltStack on my linux boxes and want to define nodegroups. I know about compound matching and minion lists, etc. This is what I need, and it works this way, but that's hard to maintain with lots of servers nodegroups: group1:…
mohrphium
  • 615
  • 2
  • 9
  • 16
1
vote
4 answers

Can I administer Amazon RDS instances with, Chef? Salt? Puppet? Ansible?

On the face of it, it looks like I need to be able to install some software daemons on the target nodes for these things to work. If I can't do that (e.g. an Amazon RDS instance), what are my options? Similarly, Ansible seems to be based all around…
user14645
  • 1,530
  • 2
  • 12
  • 17
1
vote
1 answer

How to pass kwargs from a state file to my custom module?

I'm writing a custom module to create a local mirror on Ubuntu using debmirror. Here's my code: ''' Build a local mirror with debmirror. ''' import logging import os import salt.utils from salt.exceptions import CommandExecutionError def…
quanta
  • 50,327
  • 19
  • 152
  • 213
1
vote
1 answer

saltstack: Pass jinja variable from a salt state file to an included salt state

I have the case where I have 3 salt states A.sls, B.sls and C.sls of which only one will be applied on a host. All 3 of them sets a jinja variable x to a specific value and then I want all 3 to call a mutual salt state D.sls which makes use of…
gavenant
  • 123
  • 5
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,113
  • 14
  • 59
  • 110
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,113
  • 14
  • 59
  • 110
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