Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [saltstack]

SaltStack is an open source configuration management and remote execution application.

0
votes
1answer
135 views

Why I am getting multiple responses from salt-minions?

I got the first response of all minions in valid json string but then I am getting three another different responses from same minions which are invalid json strings. root@localhost:/home/i-kod/...
1
vote
2answers
6k views

How to get the public ip address of salt-minion from master?

root@I-Kod:/home/i-kod/Desktop/ass1# salt '*' network.ip_addrs { "I-Kod": [ "10.0.1.215" ] } { "neha-HP-Pavilion-15-Notebook-PC": [ "10.0.0.231" ] } { "Pavilion": [ ...
0
votes
1answer
923 views

Syntax error in SaltStack state file

I am newbie with SaltStack. I have an error in one of my first state files. The state file is: openvpn: pkg.installed: [] /etc/openvpn: file.recurse: - source: salt://myvpn/openvpn-...
3
votes
1answer
1k views

Salt - What's the difference between Rejected and Denied?

So I have the salt master running on a server in my infrastructure and a few keys sitting there either accepted or unaccepted or... Either rejected or denied. My question is: What's the difference ...
4
votes
1answer
1k views

Salt minions keep losing connection to master

I'm testing Salt. I have a simple test setup of 3 VirtualBox VM's -- with salt-master running on one of the machines and salt-minions running on the other 2 VM's. I can start either of the salt ...
1
vote
1answer
3k views

Is there a way to make systemctl start synchronous

I'm developing/have developed a unit file for systemd [Unit] Description=FreeRADIUS multi-protocol policy server After=syslog.target network.target Documentation=man:radiusd(8) man:radiusd.conf(5) ...
0
votes
1answer
643 views

Installing packages inside a docker container using saltstack

Ive have been looking for tutorials to help me understand it but my searches has been unsuccessful. so I was wondering if it is possible for a Saltstack Master to install packages, say apache-mysql-...
1
vote
1answer
464 views

RVM install via SaltStack (Could not install Ruby)

I'm using the saltstack documentation here to install RVM on my salt-minions salt 2015.5.2 (Lithium) On an Ubuntu 14.04 system Here is my init.sls file for ruby. gpg-import-D39DC0E3: cmd.run: ...
2
votes
1answer
758 views

Is there a reason to store a SSH private key in a Salt Pillar instead of a file as part of a State?

I have a set of systems (in AWS) that all need passwordless SSH access to one another. I've written a Salt state that copies a keypair (public/private SSH-RSA keys that I previously generated) and ...
0
votes
2answers
577 views

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 ...
0
votes
1answer
100 views

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?
1
vote
1answer
276 views

Is there a more idiomatic way to switch Salt state based on host OS?

At the top of my State file, I have: {% if grains['os'] == 'Ubuntu' %} {% set ubuntu = True %} {% set arch = False %} {% elif grains['os'] == 'Arch' %} {% set ubuntu = False %} {% set arch = ...
1
vote
1answer
172 views

Is there a Salt-equivalent to Puppet's Resource Default Statements?

With Puppet you can set Resource Default Statments: File { backup => '.puppet-bak', ensure => present, group => 'root', mode => '644', owner => 'root', } and if I later ...
1
vote
1answer
2k views

SaltStack: Requisite not found for watch

I'm just starting to deploy SaltStack to my servers. So, I have the following file /srv/salt/postfix/init.sls: # Ensure postfix installed and set to autostart on boot postfix: pkg.installed: [] ...
3
votes
2answers
19k views

Find if linux machine is domain joined

We're joining our Linux machines to our Active Directory using adcli join. Now we start doing this as part of our saltstack setup, but we cannot figure out how to determine if the machine is already ...
0
votes
1answer
642 views

Saltstack: different versions for Master and Minion

I've a little-big problem. I've an architecture with dozens of servers, everyone having a different OS. My Master is on an Ubuntu Server 14.04 and its version is 0.17.5. My Minions are of different ...
1
vote
1answer
299 views

salt config.get doesn't return the package installation status

I have installed nodejs on my salt-minion (Centos 6.6) using init.sls as, manager-requirements: pkg.latest: - pkgs: - nodejs On minion, nodejs is installed and i am able to use it. ...
0
votes
3answers
1k views

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' - ...
0
votes
2answers
159 views

display a salt minion's master server(s)

I'm starting to play with Saltstack and I haven't found a way to display any runtime details of a salt minion. Specifically I wanted to display the salt master server(s) that a salt minion is ...
2
votes
1answer
793 views

Using SaltStack to create VPC on AWS

I am not sure if this is even possible as I have not found any documentation or information otherwise regarding how to do this: can SaltStack be used to configure and create new VPCs into a given ...
1
vote
1answer
75 views

Stormpath and saltstack

Does anyone use stormpath to authenticate against user/password with saltstack? Instead of creating new users and/or getting it from db, I was wondering if someone is using stormpath to get the data(...
0
votes
1answer
1k views

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: - /...
2
votes
1answer
683 views

Migration from ansible to saltstack

We have a large AWS infrastructure which we manage and configure using ansible. I want to try and move our configuration management to saltstack. I've setup a server to be the salt-master and salt-...
3
votes
1answer
701 views

How should I backup pillar data for SaltStack?

It makes sense to backup the salt state to a git repo since there shouldn't be any sensitive data in there. But what about the pillar data? Should I just create a separate git repo for that, or put ...
1
vote
1answer
1k views

How can I call a SaltStack module with a list of arguments

Given the following function in a SaltStack module called salty, how do I sent a sequence to the event function for the tags argument, that is tags should be a Python list: def event(name, desc, ...
0
votes
1answer
339 views

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. ...
7
votes
3answers
2k views

Salt State Testing via Jenkins

All, We're trying to have automated tests in our Jenkins setup to run "smoke" and "lint" type of tests in our salt state files (.sls). All google-foo so far has yielded very little information. There ...
0
votes
1answer
199 views

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 ...
1
vote
2answers
553 views

Is there any way to call only one rule within a SaltStack state?

I have a state called service.sls within an "elasticsearch" directory. I could call the entire state via salt-call state.sls elasticsearch.service but I'd only like to trigger one rule within that ...
17
votes
5answers
2k views

When is it appropriate to use a configuration manager (eg Puppet / Chef / Ansible)?

At my current workplace, I look after two VMware host machines, an OpenBSD physical machine, three Debian VM's, and six Windows Server VM's (2008/2012). I'm considering implementing a configuration ...
4
votes
2answers
3k views

How to use saltstack to manage different config file for different minions?

I have two minions with httpd server managed under saltstack. VirtualHost based on ports need to be configured for them separately. So /etc/httpd/conf.d/httpd-vhost.conf is watched like this: httpd: ...
0
votes
1answer
385 views

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 ...
0
votes
1answer
544 views

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 ...
3
votes
1answer
4k views

How do I make cmd.run answer a prompt in salt-stack?

I've got a salt script that is being executed with state.sls like this: salt '*' state.sls foo.bar In my script I've got this: foo-bar: cmd.run: - php foo.php bar --delete - cwd: /srv/foo ...
0
votes
1answer
420 views

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: -...
2
votes
1answer
4k views

generating ssh-keys for a non root user with salt

I need to generate ssh-keys(public/private pair) for a user say helen. This user is already in all my salt minions. How do I generate ssh keys for this user from my salt master? For root user I ...
0
votes
1answer
2k views

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 ...
2
votes
1answer
1k views

Authentication of saltmaster against salt minions

I am just getting started with salt and I am wondering how the saltmaster is being authenticated against the clients. I know that when connecting a minion the master has to accept the public key of ...
1
vote
1answer
2k views

saltstack configuration “No Top file or external nodes data matches found”

A very similar version of this question is asked here , but it's completely different since the person had their top file in the wrong directory. I have 3 projects, that I'll call project1, ...
1
vote
1answer
3k views

Saltstack load pillar in a for loop

I'm developing a automatic proftpd installation whit Salt. I won't to get the ftp users from a template but I can't get work the pillar. I initialized the pillar whit the users data and call it into a ...
5
votes
3answers
11k views

salt-stack : No Top file or external nodes data matches found

To test salt-stack I would like to copy a config file to another distant one (I am testing master and minion in localhost) /etc/salt/minion : master: 127.0.0.1 file_roots: base: - /srv/salt/...
0
votes
1answer
337 views

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/...
7
votes
1answer
8k views

How do I check output of salt command that runs in background?

I've got a salt script written by someone else that is executing a bunch of commands. It runs for a very long time. My connection to the machine that runs it broke, but it is still running. How do I ...
1
vote
1answer
581 views

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    ├── ...
0
votes
1answer
2k views

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 ...
0
votes
2answers
2k views

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/...
2
votes
1answer
3k views

Deploying Virtual Machines Using Salt and Salt-Virt on Ubuntu Server

I am using Salt to provision machines, both physical and virtual, for my company. It would be really nice if I could also use Salt (Salt-Virt) to manage the various virtual machines running on my ...
1
vote
1answer
1k views

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 ...
0
votes
1answer
369 views

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 ...
0
votes
1answer
765 views

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 ...