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
2 answers

SaltStack: Do "etckeeper init" if /etc/.git is not there

I want to deploy the tool etckeeper via SaltStack. Installating the RPM/DPKG is easy. Next step is to call etckeeper init after the installation. My current idea is this pseudo-code: execute etckeeper init if /etc/.git does not exist I read the…
guettli
  • 3,113
  • 14
  • 59
  • 110
0
votes
1 answer

How do I use debconf in salt with pillars?

I have the following: newrelic-debconf: debconf.set: - name: newrelic-php5 - data: 'newrelic-php5/application-name': { 'type': 'string', 'value': '{{ salt['pillar.get']('newrelic:applicationName', '') }}' } …
0
votes
0 answers

SaltStack: Reason why postgres_user.absent fails?

The Salt state postgres_user.absent fails: ID: remove_foobar_vums_dci__database_user Function: postgres_user.absent Name: foobar_vums_dci Result: False Comment: User foobar_vums_dci failed to be removed Started:…
guettli
  • 3,113
  • 14
  • 59
  • 110
0
votes
1 answer

Using salt-ssh for Ubuntu/Debian patching (dialog frontend is not usable)

I'm looking into replacing a Linux based home-grown patch management solution with salt-ssh. The current system uses a shell script to iterate through a list of hosts and copies a script named apt-update to the remote. After copying the script, the…
Server Fault
  • 3,454
  • 7
  • 48
  • 88
0
votes
2 answers

Automate PostgreSQL Upgrade

Our manual recipe to do a PostgreSQL version upgrade (example from 9.6 to 10.1) looks like this at the moment: stop DB (via systemctl) start DB on a different port pg_dumpall using the different port mv old data directory to a different…
guettli
  • 3,113
  • 14
  • 59
  • 110
0
votes
2 answers

SaltStack: Do x if /var/log/backup exists

I want to execute this state: backup_log_readable: acl.present: - name: /var/log/backup - acl_type: user - acl_name: monitor - perms: rx - recurse: True But this should happen only if /var/log/backup exists. How to do…
guettli
  • 3,113
  • 14
  • 59
  • 110
0
votes
2 answers

How can I make salt-api return more useful data?

salt-master: 2016.11.5 (Carbon) salt-api: 2016.11.5 (Carbon) salt-minion 2016.11.5 (Carbon) cherrypy: 10.2.2 After setting up salt-api using this tutorial I've been able to successfully use the API via curl. For example, I can move files. …
trueCamelType
  • 1,016
  • 5
  • 19
  • 41
0
votes
1 answer

How to create mysql user with REQUIRE SSL using SaltStack?

I have create mysql user using SaltStack but it does not include SSL. My salt code: {{ pillar['mysql_user'] }}: mysql_user.present: - host: "{{ mysql_bind_address }}" - password: "{{ pillar['db_password'] }}" - connection_user: root …
iWizard
  • 398
  • 2
  • 10
  • 26
0
votes
1 answer

Salt-Cloud and local development

I want to create basic aws infrastructure(vpc,subnets,route tables/routes,ec2 boxes) using saltstack. I am using a centos vagrant box as my salt master and minion as well to create vpc, subnets and routes using salt states. But the problem occurs…
Ankita13
  • 101
  • 1
0
votes
1 answer

Move $HOME of user postgres from /var/lib to /home via SaltStack

I want to move $HOME of user postgres from /var/lib to /home via SaltStack. Here are the steps which happen before: postgres RPM gets installed $HOME is /var/lib Database gets initialized In this case a imperative way (tell tool to do X) would be…
guettli
  • 3,113
  • 14
  • 59
  • 110
0
votes
1 answer

Salt-Stack : Pillar passed in state files

I have a slight confusion in relation to passing pillar across state files. I am using an Orchestrator to orchestrate running states on two vms (example vm1 and vm2). These states have no dependency on each other To each vm, I pass a pillar with the…
Aditya Sehgal
  • 127
  • 1
  • 5
0
votes
2 answers

Validate configuration changes via salt

Background: recently I discovered an issue on our servers where zookeeper wouldn't start on one of them. It was caused by the myid file being empty (it requires a number). Executing salt didn't fix it. It turns out that the issue was cause by a…
blockcipher
  • 121
  • 4
0
votes
1 answer

SaltStack: from 1 blockreplace to N blockreplace

Introduction Up to now we created one block in the /etc/sudoers file with N entries. This is not a good solution, since sometimes we only want to update one system and give explicit pillar data. Then pillar.systems is a list with only one entry. Old…
guettli
  • 3,113
  • 14
  • 59
  • 110
0
votes
1 answer

Why can't I use Digital Ocean private IPs for reverse proxying with this Salt Cloud setup?

I'm following along with this DigitalOcean tutorial that lays out how Salt Cloud works, with two app servers and a reverse proxy. The expected result near the end is that you should have a pure JS app running on two machines behind a reverse proxy,…
bright-star
  • 131
  • 6
0
votes
1 answer

Salt virt - how to add additional volume

I have read about disk profiles for salt-virt. I have created a disk profile accordingly. virt.disk: default: - system: size: 8192 kmaster: - system: size: 40000 knode: - system: size: 40000 - data: …
rtmie
  • 151
  • 3