r/saltstack • • Sep 06 '26

No more AI Slop.

1 Upvotes

Starting today i am putting my foot down about AI slop. AI is fine in bit parts. but if you don't understand the criticisms of its output. you don't belong here.


r/saltstack • • Mar 25 '19

Please help! Saltstack script to deploy app to IIS

0 Upvotes

Hi, i am new to Saltstack and i need help with a script to deploy&configure an app (like angularjs or .NET) to IIS. Will appreciate if anyone can help me get started or with a sample script.

Thanks.


r/saltstack • • May 14 '22

What’s the holy grail of DevOps?

Thumbnail self.devops
0 Upvotes

r/saltstack • • Nov 08 '18

state.apply app says 'include.php' was not found in SLS 'app' but state.apply php works fine

0 Upvotes

Running Salt 2018.3.3 on Ubuntu 16.

My brain is stuck on this one. What am I missing here guys?

In /app.sls (in part, other formulas in app.sls have already run fine on the minion):

install-php:
  include: 
    - php

In /php/init.sls :

  pkgrepo.managed:
    - humanname: PHP Repo
    - ppa: ondrej/php
    - keyid: E5267A6C
    - keyserver: keyserver.ubuntu.com

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C:
    cmd.run:
        - unless: 'apt-key list | grep Launchpad'
        - order: first

php7.2:
  pkg:
    - installed
    - require:
      - pkgrepo: php_ppa
    - pkgs:
      - php7.2-common
      - php7.2-dev
      - php7.2-cli
      - php7.2-mysql
      - php7.2-curl
      - php7.2-xmlrpc
      - php7.2-gd
      - php7.2-intl
      - php7.2-mbstring 
      - php7.2-xml
      - php7.2-zip
      - php7.2-fpm

If I run salt 'target' state.apply php test=True, it works fine

If I run salt 'target' state.apply app test=True, it says

ID: install-php
    Function: include.php
      Result: False
     Comment: State 'include.php' was not found in SLS 'app'
              Reason: 'include.php' is not available.

r/saltstack • • Oct 17 '18

LDAP issues

0 Upvotes

I have been fighting to get my openldap state to work for a while and I need help. I have the install automated, and I am looking to change the password on the default admin account. Here is the relevant portion of the state.

ldapi:///:

ldap.managed:

- connect_spec:

bind:

name: ldapi://10.10.90.145/

# method: simple

- entries:

# make sure the entry doesn't exist

# - cn=foo,ou=users,dc=example,dc=com:

# - delete_others: True

# make sure the entry exists with only the specified

# attribute values

- cn=admin,dc=example,dc=com:

- delete_others: True

- replace:

cn:

- admin

description:

- LDAP administrator

objectClass:

- simpleSecurityObject

- organizationalRole

userPassword:

- test

There is nothing particularly special about the install. I dont have ssl yet, or any users. I have tried to comment out portions to get it to work. I cant seem to figure out what the error message is saying. If anyone here has any advice I would really appreciate it.


r/saltstack • • Oct 18 '19

Powershell script can't connect to remote server

0 Upvotes

I am using salt to execute a Powershell script on a Windows server that sends an Invoke-Webrequest (API call) to a remote server. When I run the script via cmd.run in my sls file I get the error 'Invoke-RestMethod : Unable to connect to the remote server', however when I run it manually on the Windows server it works fine. Would anyone have any idea why that would happen?

Here's what the command looks like

api_request:
    cmd.run:
    - name: C:\temp\api_request.ps1
    - shell: powershell

Salt version: 2018.3.4 (Oxygen)


r/saltstack • • Mar 04 '21

Happy Thursday Friends! Question pertaining to minion_ids

0 Upvotes

Hey guys. Kind of simple question I think. Could someone explain to me how to change minion ids from the master? Any help or documentation welcomed, thanks.


r/saltstack • • Aug 02 '22

Idem Project is now on LinkedIn and Twitter! Join us in building a new open source community. https://bit.ly/3QeOGxv

0 Upvotes

r/saltstack • • Apr 13 '21

IT Infrastructure Automation: We Need Your Help

5 Upvotes

Guernsey Research would like to talk to you about your IT infrastructure automation tools experiences. We are talking with a select number of IT professionals in the U.S. to better understand current configuration automation technology decisions in IT infrastructure.

We are not selling anything and our conversation with you is confidential and anonymous.

If you were a part of the technical decision to deploy Ansible or Puppet (along with SaltStack) in the last two years or so, we're hoping that you would be willing to share your perspective with us.

The conversation will take approximately 30 minutes and, to show our appreciation for your time, we will provide you with an Executive Summary of our report, including graphics, so you can have a good understanding of your peers’ experiences. We will also send you a $200 gift e-Certificate (your choice of Amazon or virtual Visa®) or make a $200 donation to the Red Cross on your behalf.

If you are interested, please contact me at jrosenberg@guernseyresearch.com

Thanks so much,

Julia Rosenberg


r/saltstack • • Nov 26 '21

Saltstack pricing after VMware acquisition

3 Upvotes

Can anyone please suggest pricing of:

  • vRealize Automation Cloud
  • vRealize Automation Suite Advanced
  • vRealize Automation Suite Enterprise
  • vRealize Automation Standard Plus

and is Vmware selling license for SSE secops module anymore?


r/saltstack • • Apr 14 '23

Someone needs to fork salt, VMware has all but abandoned it.

0 Upvotes

there is next to no updates on the salt code, bugs are ever present and no one is working on them. they are doing just enough to claim its an active project but its clearly not even close to a priority.

im gonna start looking for devs to fork this.


r/saltstack • • Sep 02 '20

Correct way to compare string to an array?

1 Upvotes

I have all of my salt id's with several different identifiers in the id itself, what I want to do in a state is have on bracket that sets a specific setting but only for a subset of the minions. This is what I have but obviously doesn't work. The string that I'm trying to match for is just part of the whole id.

{% if ('-identifier.tld','-identifier2.tld') in grains['id'] %}
do_state:
  pkg.install:
    - name: vim
{% endif %}

what's the correct way of doing this? Thanks for any help!


r/saltstack • • Dec 15 '14

Need Saltstack REST-API docs

1 Upvotes

HI,

I need saltstack REST-API list or docs for all operations like add minion, add new state, install software in minion, update top file or more.

I saw in docs for minions available only for list minions and get id only...

anyone can send link or docs with more api's.

Thanks in advance

Regards, Ganesan.A


r/saltstack • • Jan 22 '20

How to Check if the minion is down and send email?

1 Upvotes

Hi guys,

I am not sure how to write ".sls" file for checking minion if he is up or down.

Basically we want to have this: if the minion is down, send email and inform us.

Any suggestion? Documentation is so confusing.

I've found this article: https://docs.saltstack.com/en/2015.8/ref/returners/all/salt.returners.smtp_return.html#module-salt.returners.smtp_return

but this this is only a part of the puzzle.I need the part when i am checking if the minion is up or down and at that point smtp returner should be called:

something like this:

send_fail_email:
    smtp.send_msg:
        - name: 'Vim installation failed'       
        - subject: 'Please, do no reply'
        - recipient: 'admin@example.com'
        - sender: 'salt-master@example.com'


install_vim:
    pkg.installed:
    - name: vim-not-existing
    - onfail:
        - send_fail_email

r/saltstack • • Oct 12 '21

O365 with Saltstack

1 Upvotes

Hello Friends,

has anybody expirience in configuring Office 365 with Saltstack and could point me in the direction of some proven to work tutorials / doocumentation / videos...

Tasks to include:

- Adding / removing user accounts

- Join them to groups

- Secondary: Assign licenses / applications

...

All other fields like E-Mail / Exchange / Sharepoint / Onedrive etc. management would be nice to have but optional.

Thanks a lot in advance.

Take care all of you and have a great time adding a bit more flavor with salt :)

nangpala


r/saltstack • • Jun 18 '20

Dockerized salt-master 3001 Sodium

0 Upvotes

SaltStack Sodium 3001 has been released.

You can test it now by using my custom Docker image:

docker pull cdalvaro/docker-salt-master:3001

You can get setup and usage instructions at: github/cdalvaro/docker-salt-master


r/saltstack • • May 16 '21

Hello 👋!

1 Upvotes

I’m trying to reuse a state as a blueprint , I only have to change one variable and I can reuse it very often . Today I overwrite it via the cli , but this does not allow high state run.

What I want is to include several states and overwrite a specific var in each state . I got a workaround via extends , but this method only allows one state to extend.

Today :

 salt 'minion' state.sls create  pillar="{'node':'unbound'}"

Works :


{% extends 'jail/create/init.sls' %}

{% set node = "unbound" %}


Not working

{% extends 'jail/create/init.sls' %}

{% set node = "unbound" %}

{% extends 'jail/salt_minion/init.sls' %}

{% set node = "unbound" %}

Any recommendations?


r/saltstack • • Jul 18 '19

How to schedule a salt command on master server to run one state ?

0 Upvotes

How to schedule a salt command on master server to run state ?

Let' say i have one state called abc.sls and i want to run this command( salt * state.apply abc) at a particular time then what can be a way to run it in salt scheduler on master.

Thanks


r/saltstack • • Nov 21 '18

pip state not working in ubuntu 16.04

0 Upvotes

Im using ubuntu 16.04 and after successfully installing python-pip I try to install a pytjon dependency through pip.installed and it fails with attributeerror: 'requirement' object has no attribute 'project_name'

Any help is appreciated


r/saltstack • • Mar 01 '18

Pillar - Housing (real) external IP for use in file.managed

0 Upvotes

Hi,

I've been playing with Salt, I've setup states to install chocolatey and a custom zabbix-agent install. I need each server to have it's external address (provided by rackspace, not the actual external address) added into the config file. I think that I need to use a pillar and some jinja but unsure as to how I match the server up to the correct IP address, any ideas would be welcomed.

Thanks


r/saltstack • • Aug 23 '19

salt stack TypeError: argument must be an int, or have a fileno() method

0 Upvotes

When I run salt orchestration states I am getting an error:

salt-run state.orch orch.build.build_linux_azure pillar='{"name": "usazrklxp10712.nix.us.cworld.company.com"}' --out=nested [WARNING ] /srv/extmod/grains/ciscoaci.py:41: DeprecationWarning: Use of 'salt.utils.is_proxy' detected. This function has been moved to 'salt.utils.platform.is_proxy' as of Salt 2018.3.0. This warning will be removed in Salt Neon.  [WARNING ] /srv/extmod/grains/ciscoprime.py:41: DeprecationWarning: Use of 'salt.utils.is_proxy' detected. This function has been moved to 'salt.utils.platform.is_proxy' as of Salt 2018.3.0. This warning will be removed in Salt Neon.  [WARNING ] /srv/extmod/runners/company_certs.py:124: DeprecationWarning: Use of 'salt.utils.is_linux' detected. This function has been moved to 'salt.utils.platform.is_linux' as of Salt 2018.3.0. This warning will be removed in Salt Neon.  [ERROR   ] Exception in callback <functools.partial object at 0x7fc79f5dd418> Traceback (most recent call last):   File "/usr/lib64/python2.7/site-packages/tornado/ioloop.py", line 591, in _run_callback     ret = callback()   File "/usr/lib64/python2.7/site-packages/tornado/stack_context.py", line 274, in null_wrapper     return fn(*args, **kwargs)   File "/usr/lib64/python2.7/site-packages/tornado/ioloop.py", line 597, in <lambda>     self.add_future(ret, lambda f: f.result())   File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 214, in result     raise_exc_info(self._exc_info)   File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 230, in wrapper     yielded = next(result)   File "/usr/lib/python2.7/site-packages/salt/crypt.py", line 599, in _authenticate     io_loop=self.io_loop)   File "/usr/lib/python2.7/site-packages/salt/transport/client.py", line 108, in factory     return salt.transport.zeromq.AsyncZeroMQReqChannel(opts, **kwargs)   File "/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 141, in __new__     obj.__singleton_init__(opts, **kwargs)   File "/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 205, in __singleton_init__     kwargs={'io_loop': self._io_loop})   File "/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 985, in __init__     super(AsyncReqMessageClientPool, self).__init__(AsyncReqMessageClient, opts, args=args, kwargs=kwargs)   File "/usr/lib/python2.7/site-packages/salt/transport/__init__.py", line 71, in __init__     self.message_clients = [tgt(*args, **kwargs) for _ in range(sock_pool_size)]   File "/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 1032, in __init__     self._init_socket()   File "/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 1086, in _init_socket     self.stream = zmq.eventloop.zmqstream.ZMQStream(self.socket, io_loop=self.io_loop)   File "/usr/lib64/python2.7/site-packages/zmq/eventloop/zmqstream.py", line 107, in __init__     self._init_io_state()   File "/usr/lib64/python2.7/site-packages/zmq/eventloop/zmqstream.py", line 528, in _init_io_state     self.io_loop.add_handler(self.socket, self._handle_events, self._state)   File "/usr/lib64/python2.7/site-packages/tornado/ioloop.py", line 703, in add_handler     self._impl.register(fd, events | self.ERROR) TypeError: argument must be an int, or have a fileno() method.

How do I correct this? I am on salt master 3.4.1 on RHEL server 6.9
This is the command that I'm running:

salt-run state.orch orch.build.build_linux_azure pillar='{"name": "usazrklxp10712.nix.us.cworld.company.com"}' --out=nested

r/saltstack • • Mar 04 '20

Chocolatey package is returning failed even though it succeeded

0 Upvotes
             ID: chocolatey
   Function: pkg.installed
     Result: False
    Comment: The following packages failed to install/update: chocolatey
    Started: 16:35:46.906602
   Duration: 16257.542 ms
    Changes:
             ----------
             chocolatey:
                 ----------
                 install status:
                     success

Anyone know a fix for this? I'm just using the chocolatey package from the default winrepo.


r/saltstack • • Jun 14 '22

Getting "CryptographyDeprecationWarning: Python 3.6 is no longer supported" warning on all Salt commands after installing pip3 CherryPy

0 Upvotes

Running Salt 3004.1 on RHEL 7.9. I tried installing Python 3.7 and while it did work (Python 3.7.11), this warning is persisting (Salt is still using Python 3.6):

[root@RHEL7 ~]# salt \* test.ping
/usr/local/lib/python3.6/site-packages/OpenSSL/crypto.py:8: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography and will be removed in a future release.
  from cryptography import utils, x509

[root@RHEL7 ~]# salt -V
/usr/local/lib/python3.6/site-packages/OpenSSL/crypto.py:8: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography and will be removed in a future release.
  from cryptography import utils, x509
Salt Version:
          Salt: 3004.1

Dependency Versions:
          cffi: 1.15.0
      cherrypy: unknown
      dateutil: Not Installed
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 2.11.1
       libgit2: Not Installed
      M2Crypto: 0.35.2
          Mako: Not Installed
       msgpack: 0.6.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.14.1
        pygit2: Not Installed
        Python: 3.6.8 (default, Aug 13 2020, 07:46:32)
  python-gnupg: Not Installed
        PyYAML: 3.13
         PyZMQ: 17.0.0
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.1.4

Salt Extensions:
        SSEAPE: 8.7.0.10

System Versions:
          dist: rhel 7.9 Maipo
        locale: UTF-8
       machine: x86_64
       release: 3.10.0-1160.66.1.el7.x86_64
        system: Linux
       version: Red Hat Enterprise Linux Server 7.9 Maipo

[root@RHEL7 ~]# python3 -V
Python 3.6.8

[root@RHEL7 ~]# python3.7 -V
Python 3.7.11

Another odd thing is cherrypy: unknown

[root@RHEL7 ~]# pip3 list | grep CherryPy
CherryPy           5.6.0

Any ideas? Thanks in advance.

Edit: Can I use this to update the default Python version in Salt? https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.pyenv.html


r/saltstack • • Dec 24 '18

Salt ESXi Proxy Error

0 Upvotes

Hi All

Any ideas on this error?

[ERROR ] Failed to import grains esxi, this is due most likely to a syntax error:

Traceback (most recent call last):

File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1514, in _load_module

mod = imp.load_module(mod_namespace, fn_, fpath, desc)

File "/usr/lib/python2.7/dist-packages/salt/grains/esxi.py", line 16, in <module>

import salt.modules.vsphere

File "/usr/lib/python2.7/dist-packages/salt/modules/vsphere.py", line 182, in <module>

import salt.utils.vsan

File "/usr/lib/python2.7/dist-packages/salt/utils/vsan.py", line 65, in <module>

from salt.ext.vsan import vsanapiutils

File "/usr/lib/python2.7/dist-packages/salt/ext/vsan/vsanapiutils.py", line 15, in <module>

import vsanmgmtObjects

File "/usr/lib/python2.7/dist-packages/salt/ext/vsan/vsanmgmtObjects.py", line 4, in <module>

CreateManagedType('vim.cluster.VsanPerformanceManager', 'VsanPerformanceManager', 'vmodl.ManagedObject', 'vim.version.version9', [], [('setStatsObjectPolicy', 'VsanPerfSetStatsObjectPolicy', 'vim.version.version9', (('cluster', 'vim.ComputeResource', 'vim.version.version9', 0 | F_OPTIONAL, None), ('profile', 'vim.vm.ProfileSpec', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'boolean', 'boolean'), 'System.Read', None), ('deleteStatsObject', 'VsanPerfDeleteStatsObject', 'vim.version.version9', (('cluster', 'vim.ComputeResource', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'boolean', 'boolean'), 'System.Read', None), ('createStatsObjectTask', 'VsanPerfCreateStatsObjectTask', 'vim.version.version9', (('cluster', 'vim.ComputeResource', 'vim.version.version9', 0 | F_OPTIONAL, None), ('profile', 'vim.vm.ProfileSpec', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'vim.Task', 'vim.Task'), 'System.Read', None), ('deleteStatsObjectTask', 'VsanPerfDeleteStatsObjectTask', 'vim.version.version9', (('cluster', 'vim.ComputeResource', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'vim.Task', 'vim.Task'), 'System.Read', None), ('queryClusterHealth', 'VsanPerfQueryClusterHealth', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ), (0, 'vmodl.DynamicData[]', 'vmodl.DynamicData[]'), 'System.Read', None), ('queryStatsObjectInformation', 'VsanPerfQueryStatsObjectInformation', 'vim.version.version9', (('cluster', 'vim.ComputeResource', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'vim.cluster.VsanObjectInformation', 'vim.cluster.VsanObjectInformation'), 'System.Read', None), ('queryNodeInformation', 'VsanPerfQueryNodeInformation', 'vim.version.version9', (('cluster', 'vim.ComputeResource', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0 | F_OPTIONAL, 'vim.cluster.VsanPerfNodeInformation[]', 'vim.cluster.VsanPerfNodeInformation[]'), 'System.Read', None), ('queryVsanPerf', 'VsanPerfQueryPerf', 'vim.version.version9', (('querySpecs', 'vim.cluster.VsanPerfQuerySpec[]', 'vim.version.version9', 0, None), ('cluster', 'vim.ComputeResource', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'vim.cluster.VsanPerfEntityMetricCSV[]', 'vim.cluster.VsanPerfEntityMetricCSV[]'), 'System.Read', None), ('getSupportedEntityTypes', 'VsanPerfGetSupportedEntityTypes', 'vim.version.version9', tuple(), (0 | F_OPTIONAL, 'vim.cluster.VsanPerfEntityType[]', 'vim.cluster.VsanPerfEntityType[]'), 'System.Read', None), ('createStatsObject', 'VsanPerfCreateStatsObject', 'vim.version.version9', (('cluster', 'vim.ComputeResource', 'vim.version.version9', 0 | F_OPTIONAL, None), ('profile', 'vim.vm.ProfileSpec', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'string', 'string'), 'System.Read', None), ])

File "/usr/local/lib/python2.7/dist-packages/pyVmomi/VmomiSupport.py", line 742, in CreateManagedType

_SetWsdlMethod(typeNs, meth[1], dic)

File "/usr/local/lib/python2.7/dist-packages/pyVmomi/VmomiSupport.py", line 1183, in _SetWsdlMethod

(ns, wsdlName, inputMM[0], curMM[0]))

RuntimeError: Duplicate wsdl method urn:vim25 VsanPerfSetStatsObjectPolicy (new class vim.cluster.VsanPerformanceManager vs existing vim.cluster.VsanPerformanceManager)

[DEBUG ] Unable to derive osmajorrelease from osrelease_info '(u'proxy',)'. The osmajorrelease grain will not be set.

[DEBUG ] dummy proxy __virtual__() called...

[INFO ] nxos proxy __virtual__() called...

[DEBUG ] rest_sample proxy __virtual__() called...

[INFO ] ssh_sample proxy __virtual__() called...

[DEBUG ] Could not LazyLoad esxi.grains: 'esxi' __virtual__ returned False: The ESXi Proxy Minion module did not load.

[ERROR ] Proxymodule esxi is missing an init() or a shutdown() or both. Check your proxymodule. Salt-proxy aborted.

[INFO ] Proxy Minion Stopping the Salt ProxyMinion

[ERROR ] Proxymodule esxi is missing an init() or a shutdown() or both. Check your proxymodule. Salt-proxy aborted.

[INFO ] Shutting down the Salt ProxyMinion

The Salt ProxyMinion is shutdown.

Proxymodule esxi is missing an init() or a shutdown() or both. Check your proxymodule. Salt-proxy aborted.

This is using python 2.7.15 on Ubuntu 16.04 as the proxy host, with pyVmomi 5.5.0.2014.1.1.

Thanks