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

Saltstack - need to get some info from a minion scheduled event

I've got a minion scheduled event (/etc/salt/minion.d/_schedule.conf) which runs a particular state file using the state.sls function. I've got jid_include and return_job set to "true". I know the event runs based on the effect the state file has on…
Michael Martinez
  • 2,543
  • 3
  • 20
  • 31
1
vote
0 answers

Any way to run a vim session over salt-ssh?

Anyone know of a way to interact with the console/terminal over a salt-ssh command? I'm trying to run vim to change the subnet and FQDN for about 70 hosts. I could use sed and company but wondering if we can leverage salt-ssh for this task. Below,…
Server Fault
  • 3,454
  • 7
  • 48
  • 88
1
vote
1 answer

How can I get salt-ssh to run a local script on a remote node?

.::UPDATE-SOLVED::. With must assistance form @wirap, it is now working. I've symlinked the script directory into /etc/salt/states/scripts and using this test.sls configuration it is now working. /root/bin/updater/scripts/pam-setup-access: …
Server Fault
  • 3,454
  • 7
  • 48
  • 88
1
vote
2 answers

Managing IPtables efficiently with Saltstack

I'm trying to configure a flexible iptables management solution with SaltStack, but I find it harder than I thought it would be. My main requirement: to be able to have a pillar where I keep a list of IPs, which should be whitelisted for SSH access…
Tony
  • 269
  • 4
  • 15
1
vote
2 answers

SaltStack: Push single change, not all

I have a server which was managed by hand before. We want to manage this server with saltstack in the future. I run this to see what you current salt formular would do: salt-ssh remote-host state.sls webserver test=True There are several changes. I…
guettli
  • 3,113
  • 14
  • 59
  • 110
1
vote
1 answer

SaltStack: Change linux ACLs for /home/*/input/

There are roughly 30 users and 30 directories with this structure on a SaltStack minion: /home/user1/input/ /home/user2/input/ /home/user3/input/ /home/user4/input/ ... I know how to change the linux ACLs for a single file via salt. In this example…
guettli
  • 3,113
  • 14
  • 59
  • 110
1
vote
2 answers

Count the number of Salt minions matched

Is there a simple way to count the number of minions returned by a match, for example: salt -C 'G@ec2_roles:test' match.count
c4urself
  • 5,270
  • 3
  • 25
  • 39
1
vote
2 answers

Can salt-call grains.get display only the value of the key?

salt-call grains.get cluster local: up102 Is there a way for salt-call to display only the value (eg. up102) without the rest of the output, or must I resort to using awk or jq etc to extract it? I don't see any command line options to do…
Michael Martinez
  • 2,543
  • 3
  • 20
  • 31
1
vote
1 answer

Select a Salt top file when using saltenv with a gitfs backend

Background I have a Salt instance configured with a gitfs backend. By default, this specifies the master branch to be the base environment. So, when I execute: salt state.apply the top.sls file is executed by default. Situation I'd…
Mike
  • 250
  • 2
  • 10
1
vote
1 answer

Force rebuild of a minion's state?

TL;DR I have begun controlling all my virtual machines using Saltstack. I have set up two separate environments, init and base, for installing the minion on a freshly deployed VM and ongoing configuration management, respectively. Having…
user1129682
  • 223
  • 2
  • 9
1
vote
0 answers

Disabling ECN: Netsh: incorrect paramater when executing via SaltStack cmd.run

I'm attempting to mass disable Explicit Network Congestion Notification on a group of Windows Server 2012r2 servers hosted in AWS EC2. I'm using the Salt Stack configuration management tool. When I execute the command to disable ECN locally, on a…
1
vote
1 answer

Passing jinja variable to script from salt pillar

Using salt to provision and I want to be able to run cmd.script. The script works if i list all packages i intend to install within the script. But i will prefer to have the list of packages in salt formula and refer to it from the script. Below…
1
vote
1 answer

Which SaltStack returners work properly with master_job_cache?

I've been working to set up an external returner on the master side for my Saltstack deployment -- a 'master_job_cache', as specified in the documentation. I started with Slack and mongo_return. I quickly discovered that neither of these work…
Mr.Budris
  • 205
  • 1
  • 2
  • 10
1
vote
1 answer

Saltstack: How can I control the output of cmd.run?

I am only using Saltstack to run commands on multiple servers, e.g. to check if a specific TYPO3 extension exists on any server. I want to suppress empty output of minions (i.e. the hostname) and want to see if a minion could not be reached. Sample…
Larsen
  • 305
  • 2
  • 14
1
vote
2 answers

Fedora Server 25 firewall issue. Ports 22, 80, 443 blocked at each boot, have to stop firewalld

I setup Fedora Server 25 in a VM and used SaltStack to install NextCloud via this walk-thru. The issue I am having is the firewall is too restrictive and is blocking ports 22, 80 and 443. Per the walk-thru creator's suggestion, I edited the…
KidACrimson
  • 320
  • 1
  • 10
  • 24