Questions tagged [saltstack]
The Salt Project, previously known as SaltStack, is a Python-based open-source configuration management software and remote execution engine.
72
questions with no upvoted or accepted answers
4
votes
1
answer
4k
views
Securely copy file from one Salt minion to another
How do I use Salt to securely copy a sensitive file (a cryptographic key) from one specific minion to another specific minion? I don't want any other minion to be able to read the file.
Salt Mine?
...
3
votes
0
answers
2k
views
GitFS Salt Environments with a single top.sls
The documentation states that if you use
salt_top_saltenv: base
in the master config, that I can force all Minions to only use the base
saltenv for the top file, ignoring all other top files, is ...
3
votes
1
answer
942
views
How to set hostname with salt-cloud command
I am using salt-cloud to create new aws instances:
salt-cloud -p base_ec2_micro test.mydomain.com
However, the instance gets its ip as hostname. What can I do to set the fqdn as hostname?
Thanks
2
votes
0
answers
424
views
How can I set user/group ownership on a SaltStack git clone?
I have a hand-maintained Bugzilla installation that I'm trying to move to being managed with SaltStack. Currently I have the following .sls file to set up the clone:
https://github.com/bugzilla/...
2
votes
0
answers
282
views
Saltstack: how to configure a state that need a service running then restart this service
I try to configure a software, by sending a command to its running service. However, to apply the new configuration, the service needs to be restarted.
How can I do that?
I tried:
appsrv:
service....
2
votes
0
answers
267
views
salt pkg.upgrade misses some updates
If I execute apt upgrade several packages will be found:
# apt upgrade
The following NEW packages will be installed:
linux-headers-4.4.0-109 linux-headers-4.4.0-109-generic linux-image-4.4.0-109-...
2
votes
0
answers
196
views
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 ...
2
votes
0
answers
95
views
Run haproxy.disable_server when haproxy runs as multiple processes
We have few application server and 2 load-balanders (HAProxy). Cloud in implemented with SaltStack. When there is need to disable certain app server, we log into salt master and run:
for i in {1..20};...
2
votes
0
answers
611
views
Install New Relic using SaltStack on Windows Minion
How can I install New Relic on my Windows minions via SaltStack without having to RDP into each Windows minion?
I found some New Relic documentation for installing via the command-line on Windows, ...
2
votes
1
answer
946
views
How to create packages in SaltStack
I have installed Salt-master in my ubuntu 12.04 machine and salt minion in ubuntu 12.04. I want to install package containing like svn,mongodb,postgres,maven,python in the salt-minion. how to create ...
1
vote
0
answers
217
views
Can't register the minion on salt-master
I'm trying to connect salt-minion to the Salt master. But it doesn't work. Where is the mistake
what is wrong?
ping from Master server to minion server works and vice versa too
here are the logs:
**
...
1
vote
1
answer
75
views
Is it possible to store custom runner output to pillar data in SALTSTACK?
I have a Salt formula that runs on my minions, and it runs a custom module that reaches out to the web for some JSON data for the latest version of chrome. It works great, but I thought it would be ...
1
vote
1
answer
168
views
Saltstack set java alternative using command instead of path
I am trying to apply a salt.states.alternatives to set my default java to java 11. However, I need to put in the full path for the openjdk, which includes the version number that changes every time ...
1
vote
1
answer
36
views
Set Firmware Option for Vsphere VM created by salt-cloud
I am trying to create a VM hosted in Vsphere using salt-cloud and need to set the boot options for this VM.
From what I can tell there isn't an actual option for this so I guessing it needs to be part ...
1
vote
1
answer
143
views
Auditd - Don't log events from salt-minion
I'm updating our Auditd rules (Red Hat Linux) to log all tty/interactive commands from all users. That part works no problem.
What I'm trying to do now is to exclude commands issued by our salt-...
1
vote
1
answer
394
views
Deliver unique file for each Salt minion
There is some directory path, like /etc/opt/mysoft which contents should be different for each minion.
So for minion A it contains config.ini with come contents and for minion B it contains config....
1
vote
1
answer
355
views
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 ...
1
vote
1
answer
213
views
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 ...
1
vote
0
answers
390
views
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 ...
1
vote
1
answer
52
views
Saltstack: deploy EC2 instances in several availability zones
Just started learning Saltstack to control the infrastructure at AWS. We are developing an application to which time is really important, so we need to deploy from the beginning, a distributed ...
1
vote
0
answers
830
views
Service monitoring through salt reactor and beacon
I try to monitor the service through salt reactor and beacon. If event happens (eg: nginx service stop on one minion), need to write it to a file in salt master.
I have no idea how to call the event ...
1
vote
1
answer
230
views
Saltstack Cannot Find Bundle
Maybe I don't understand how cmd is working, but here is some of the config I am using. This used to be a jruby install but we are moving to MRI, hence the jruby username:
/home/jruby/tmp/rvm-install....
1
vote
1
answer
2k
views
How to provision dashboards into kibana?
I am giving my developers the gift of kibana using the elasticsearch that is bundled with logstash. They will have kibana in their vagrant boxes.
Goal: Install and configure kibana dashboards via ...
1
vote
1
answer
82
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(...
1
vote
1
answer
2k
views
Saltstack: Jinja error: How to get SLS file name and line number that contains the error?
I get this error message after refactoring my sls files.
I created new sls files and use the include directive to have more modular formulars.
salt:/srv # salt-ssh w123 -v state.sls monitoring
...
0
votes
0
answers
91
views
Salt Jinja Template concatenate strings with Looping
I am having issues concatenating strings in Salt, I want to grab a salt grain called "accesslist" which holds an array of groups to append to an access list.
{% set access_filter = '(...
0
votes
0
answers
45
views
How to avoid specific folders in recursive for salt files
Need to skip a folder in salt file and have never worked with these before. Have the following folder structure on my system
/Test
/A
/B
/C
Salt state file shows the instructions as:
...
0
votes
0
answers
54
views
Configuring salt stack on virtualbox manually
First time using salt stack.
I configured salt stack on three virtual box machines. All three machines are set up as bridged networks. Centos7(Master), Centos7(minion), Ubuntu(minion). On the master, ...
0
votes
0
answers
55
views
Long-running async salt job seems to timeout
I have a long-running async job that doesn't produce output for a long time at one point of the job ... It is terminating early - during the part where there is no output for a while - but the master ...
0
votes
1
answer
125
views
How to Pre-seed Salt Minion's Archives
So I am creating a state file to install MatterMost on a minion. So far it looks like this:
mattermost-usergroup:
user.present:
- name: mattermost
- shell: /bin/sh
- createhome: False
...
0
votes
1
answer
932
views
Salt state file doesn't load info from pillar
I'm getting this error when I'm trying to apply my statefile to my minion:
client.school.test:
Data failed to compile:
Rendering SLS 'base:nextcloud2' failed: Jinja variable 'list object' has no ...
0
votes
1
answer
1k
views
No matching sls found for 'state.sls' in env 'web'
i am trying to execute a specific sls file on specific machine using
salt "remote-host" state.apply state.sls
but i am getting error which i dont understant why i am getting this error.
...
0
votes
1
answer
102
views
Salt Cloud Map File to Map Data
I'm trying to deploy a server using Salt cloud and the VMWare provider and I have developed a profile and a map file that works fine. I see however that there is a salt cloud module that might fit my ...
0
votes
0
answers
197
views
Process getting different environment variables to system settings
I have an issue where a tomcat process started through salt stack is getting different environment variables than the ones set on the system. This is on a centos 7 server.
Below is the locale -v ...
0
votes
1
answer
180
views
SaltStack: install packages behind proxy
Getting through a Saltstack tutorial and ran into a problem how to install packages on a linux host if it's behind a proxy. For example, I have a file nettools.sls:
install_network_packages:
pkg....
0
votes
2
answers
761
views
Open SSL throwing unknown option '-n' in Amazon Linux2 instance
My code throws error when it reaches this line:
{% set encrypted_password = salt['cmd.run']('openssl enc -aes-128-cbc -a -salt -md md5 -in <(echo -n "' + ssm_plaintext_password +'") -pass pass:'+...
0
votes
1
answer
663
views
Saltstack: Select data from database using salt
I want to select data from a database table (here mysql) with saltstack.
In my test scenario I have a linux host called salt-master. On this host the database, the master and the minion are running.
...
0
votes
1
answer
411
views
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 (https://docs....
0
votes
1
answer
543
views
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:
...
0
votes
1
answer
261
views
Saltstack: How to install a new zypper RPM Repo?
How to add a new rpm package repo via saltstack?
I checked the docs, and only see method to list, modify or delete repos:
https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.zypper....
0
votes
1
answer
544
views
Salt: Raise Error if file.replace did not find anything to replace
Maybe I am blind, but I could not find a way to let the salt-ssh call fail, if file.replace did not replace a single line.
If the pattern I provide did not match, then I want to get noticed.
Example:...
0
votes
1
answer
1k
views
Jinja "for loop" statement with multiple lines (saltstack)
When using salt for specifying user creation, it is unorganized to have the for statement in a single line. Example:
{% for USR in 'hewey','dewey','loui' %}
Is it possible to break this into ...
0
votes
1
answer
759
views
How to instal vim using salt stack?
I have salt-stack maser and minion servers which running on centos7. I want to install vim package in minion server. For that I have created srv directory and vim.sls file under etc.
My vim.sls file ...
0
votes
1
answer
132
views
.mount a folder from the salt:// share onto a minion?
I'm trying to write a state that will mount the folder currently in the "salt://" directory with the sophos installer, run the installer.sh, then unmount it. I'm hoping to avoid copying the whole ...
0
votes
0
answers
121
views
SaltStack: --failhard for salt-ssh
I would like the execution of salt-ssh to cancel on the first error.
I read this: https://docs.saltstack.com/en/latest/ref/states/failhard.html
But I am using salt master-less with salt-ssh.
Is ...
0
votes
1
answer
260
views
Salt modules in state file
salt.modules.iptables is great to use from command line but how can I use this in a state file.
First I want to check if iptables is running:
check_process:
cmd.run:
- name: ps aux | grep '...
0
votes
0
answers
75
views
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 ...
0
votes
1
answer
518
views
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: "{{ ...
0
votes
1
answer
63
views
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 ...
0
votes
1
answer
276
views
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. ...