Skip to main content

Tools for checking Salt state validity

Project description

slskit

Usage: slskit [OPTIONS] COMMAND [ARGS]...

Options:
  --version                       Show the version and exit.
  -c, --config TEXT               path to slskit configuration file (default:
                                  slskit.yaml or slskit.yml)
  -l, --log-level [CRITICAL|FATAL|ERROR|WARN|WARNING|INFO|DEBUG|NOTSET|VERBOSE|QUIET|PROFILE|TRACE|GARBAGE]
  --salt-output TEXT              Alternative Salt outputter, e.g. nested,
                                  json, yaml, etc.
  --help                          Show this message and exit.

Commands:
  highstate  render highstate for specified minions
  pillars    render pillar items for specified minions
  refresh    invoke saltutil.sync_all runner
  sls        render a given sls for specified minions
  template   render a file template for specified minions
  • Supported Python versions: 3.8, 3.9, 3.10, 3.11, 3.12.5
  • Supported Salt versions: 3006, 3007

Known issues:


Workaround for OpenSSL issues on macOS

If slskit is failing with an error like this: OSError: Cannot locate OpenSSL libcrypto, try setting the following environment variable:

export HOMEBREW_PREFIX=/usr/local

Below is an old hackaround:

If slskit fails with zsh: abort or Abort trap: 6, inspect the error by running the command with PYTHONDEVMODE=1. If the issue is with _load_libcrypto call in rsax931.py, edit salt/utils/rsax931.py line 38:

-lib = find_library('crypto')
+lib = "/usr/local/opt/openssl@1.1/lib/libcrypto.dylib"

More info:

Workaround for exception raised when processing virtual function

When seeing errors like these:

ERROR:salt.loader:Exception raised when processing __virtual__ function for salt.loaded.int.module.freebsdkmod. Module will not be loaded: 'kernel'
WARNING:salt.loader:salt.loaded.int.module.freebsdkmod.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'freebsdkmod', please fix this.

You may need to add a corresponding grain to slskit.yaml file, e.g.:

# slskit.yaml

slskit:
  roster:
    foo:
      grains:
        kernel: Linux

You can find values for grains by inspecting grains.items on your real minions.

How to keep your grains DRY

Use default_grains option to avoid duplicating the same grains over all minions:

# slskit.yaml

slskit:
  roster:
    foo:
    bar:
    baz:
  default_grains:
    os: Ubuntu

For more advanced cases use YAML anchors:

# slskit.yaml

_grains:
  ubuntu: &ubuntu
    os: Ubuntu
  fedora: &fedora
    os: Fedora

slskit:
  roster:
    u1:
      grains:
        <<: *ubuntu
    u2:
      grains:
        <<: *ubuntu
    f1:
      grains:
        <<: *fedora
    f2:
      grains:
        <<: *fedora

How to reduce output verbosity

Use Salt's output configuration option, e.g.:

# slskit.yaml

salt:
  output: yaml

slskit:
  ...

External links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slskit-2024.9.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

slskit-2024.9.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file slskit-2024.9.0.tar.gz.

File metadata

  • Download URL: slskit-2024.9.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/23.6.0

File hashes

Hashes for slskit-2024.9.0.tar.gz
Algorithm Hash digest
SHA256 a73d8af92be80bcc8db5ccbf4403674b40d3ef52a76fd197ab2039d74bead8d3
MD5 e72bc9c6d36d1934a23403f345a4c295
BLAKE2b-256 3880dba08e5c4682b8184f24705283e0cb81fcf849557cbf92d968ecb0ca86a7

See more details on using hashes here.

File details

Details for the file slskit-2024.9.0-py3-none-any.whl.

File metadata

  • Download URL: slskit-2024.9.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/23.6.0

File hashes

Hashes for slskit-2024.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 41c360b146720ef7d9738df012da9d4573d6bb5b26911f5f2bedea87140f1211
MD5 d53680c14aae468c62e3da7448634d31
BLAKE2b-256 a12d38d9ee24d4f455fa2ef4954284c0f234dcce1784938ec3ea5bea2713dc5c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page