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

Commenting multiple lines in SaltStack?

I'm using the following state to try to comment out two lines in a file: /etc/cloud/cloud.cfg: file.comment: - regex: ^ - set_hostname - regex: ^ - update_hostname Unfortunately, as expected it's only using the latter regex line, and…
Soviero
  • 4,306
  • 7
  • 34
  • 59
0
votes
1 answer

SaltStack virt module and LVMs

This is just a quick question because I can't find the answer in the documentation. Is it possible to use Logical Volumes with Salt Virt for disk profiles?
HTF
  • 3,050
  • 14
  • 49
  • 78
0
votes
3 answers

EC2ResponseError: 401 Unauthorized using Saltstack boto_vpc module

I'm trying to create a vpc using Saltstack and boto_vpc module. This is my state: vpc_create: module.run: - name: boto_vpc.create - cidr_block: '10.0.0.0/24' - vpc_name: 'myVpc' - region: 'us-east-1' - key:…
0
votes
1 answer

Saltstack - Error - No Top file or external nodes data matches found

I'm trying to configure my Saltstack Architecture. I followed all the steps, but It seems not working and I'm not able to find the problem. /etc/salt/master file_roots: base: - /srv/salt dev: - /srv/salt/dev/states prod: -…
Echoes_86
  • 163
  • 7
0
votes
1 answer

salt-manage bootstrap -- Could not resolve hostname

I run my salt-minion and salt-stack on a single machine with its hostname as HOSTNAME. When salt-minion's key get accepted by the salt-master service, it appends localdomain to the minion's hostname. So, it looks like this, Accepted…
Madhavan
  • 123
  • 1
  • 7
0
votes
1 answer

Salt order execution of states

I'm trying to create some nginx files but only after having deleted all the files of the /etc/nginx/sites-enabled before. I have this states: install_nginx: pkg.installed: - name: nginx restart_nginx: service: - name: nginx -…
Julio
  • 1
0
votes
1 answer

SaltStack: pip install only when git checkout changes

I'm working on a salt state to deploy a python app. It's mostly working. One issue I have is that pip install run every time the salt minion runs. I only want it to run when there is a new commit in the git checkout. I tried a both onchange and…
0
votes
1 answer

Order of command execution when using file.append and file.managed with salt states

I am managing the main.cf config file in my postfix sls. If the same minion has also assigned the amavis state, the line content_filter = smtp-amavis:[127.0.0.1]:10024should be appended to the managed main.cf file. My postfix sls looks like this: …
pdu
  • 167
  • 14
0
votes
1 answer

can't get saltstack to work with influxdb module

please bear with me; new to salt. i just want to get influxdb deployed and configured automagically with saltstack. i have: $ cat /srv/salt/influx.sls influxdb: pkg.installed: - sources: - influxdb:…
yee379
  • 191
  • 1
  • 5
0
votes
1 answer

Unable to run salt.highstate

I'm working on configuring a group of 40 servers to be managed by SaltStack. I'm testing with just one minion at the moment, which I have successfully added to the master. For simplicity, I'm using the latest version of salt and salt-minion from the…
David Adrian
  • 123
  • 6
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
  • 7
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
  • 356
  • 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