slskit


Nameslskit JSON
Version 2023.7.0 PyPI version JSON
download
home_pagehttps://github.com/gediminasz/slskit
SummaryTools for checking Salt state validity
upload_time2023-07-01 12:41:45
maintainer
docs_urlNone
authorGediminas Zlatkus
requires_python>=3.8,<4.0
license
keywords salt saltstack sls
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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
- Supported Salt versions: 3005, 3006

---

## Workaround for libcrypto.dylib failing to load on macOS

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:

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

More info:

- https://github.com/saltstack/salt/issues/55084
- https://github.com/Homebrew/homebrew-core/pull/45895/files#diff-5bdebf3b9146d50b15f9a0dc7e7def27R131-R133

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

```yaml
# 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:

```yaml
# slskit.yaml

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

For more advanced cases use YAML anchors:

```yaml
# 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](https://docs.saltstack.com/en/latest/ref/configuration/master.html#output), e.g.:

```yaml
# slskit.yaml

salt:
  output: yaml

slskit:
  ...
```

---


## External links

- https://docs.saltproject.io/salt/install-guide/en/latest/topics/salt-version-support-lifecycle.html
- https://docs.saltproject.io/salt/install-guide/en/latest/topics/salt-python-version-support.html

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gediminasz/slskit",
    "name": "slskit",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "salt,saltstack,sls",
    "author": "Gediminas Zlatkus",
    "author_email": "gediminas.zlatkus@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/30/12/99e99b1289822a28e6117175139d63b23fd3f639721c80512a76a3627640/slskit-2023.7.0.tar.gz",
    "platform": null,
    "description": "# slskit\n\n```\nUsage: slskit [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n  --version                       Show the version and exit.\n  -c, --config TEXT               path to slskit configuration file (default:\n                                  slskit.yaml or slskit.yml)\n  -l, --log-level [CRITICAL|FATAL|ERROR|WARN|WARNING|INFO|DEBUG|NOTSET|VERBOSE|QUIET|PROFILE|TRACE|GARBAGE]\n  --salt-output TEXT              Alternative Salt outputter, e.g. nested,\n                                  json, yaml, etc.\n  --help                          Show this message and exit.\n\nCommands:\n  highstate  render highstate for specified minions\n  pillars    render pillar items for specified minions\n  refresh    invoke saltutil.sync_all runner\n  sls        render a given sls for specified minions\n  template   render a file template for specified minions\n```\n\n- Supported Python versions: 3.8, 3.9, 3.10\n- Supported Salt versions: 3005, 3006\n\n---\n\n## Workaround for libcrypto.dylib failing to load on macOS\n\nIf `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:\n\n```diff\n-lib = find_library('crypto')\n+lib = \"/usr/local/opt/openssl@1.1/lib/libcrypto.dylib\"\n```\n\nMore info:\n\n- https://github.com/saltstack/salt/issues/55084\n- https://github.com/Homebrew/homebrew-core/pull/45895/files#diff-5bdebf3b9146d50b15f9a0dc7e7def27R131-R133\n\n## Workaround for exception raised when processing __virtual__ function\n\nWhen seeing errors like these:\n\n```\nERROR:salt.loader:Exception raised when processing __virtual__ function for salt.loaded.int.module.freebsdkmod. Module will not be loaded: 'kernel'\nWARNING: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.\n```\n\nYou may need to add a corresponding grain to `slskit.yaml` file, e.g.:\n\n```yaml\n# slskit.yaml\n\nslskit:\n  roster:\n    foo:\n      grains:\n        kernel: Linux\n```\n\nYou can find values for grains by inspecting `grains.items` on your real minions.\n\n## How to keep your grains DRY\n\nUse `default_grains` option to avoid duplicating the same grains over all minions:\n\n```yaml\n# slskit.yaml\n\nslskit:\n  roster:\n    foo:\n    bar:\n    baz:\n  default_grains:\n    os: Ubuntu\n```\n\nFor more advanced cases use YAML anchors:\n\n```yaml\n# slskit.yaml\n\n_grains:\n  ubuntu: &ubuntu\n    os: Ubuntu\n  fedora: &fedora\n    os: Fedora\n\nslskit:\n  roster:\n    u1:\n      grains:\n        <<: *ubuntu\n    u2:\n      grains:\n        <<: *ubuntu\n    f1:\n      grains:\n        <<: *fedora\n    f2:\n      grains:\n        <<: *fedora\n```\n\n## How to reduce output verbosity\n\nUse Salt's [`output` configuration option](https://docs.saltstack.com/en/latest/ref/configuration/master.html#output), e.g.:\n\n```yaml\n# slskit.yaml\n\nsalt:\n  output: yaml\n\nslskit:\n  ...\n```\n\n---\n\n\n## External links\n\n- https://docs.saltproject.io/salt/install-guide/en/latest/topics/salt-version-support-lifecycle.html\n- https://docs.saltproject.io/salt/install-guide/en/latest/topics/salt-python-version-support.html\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Tools for checking Salt state validity",
    "version": "2023.7.0",
    "project_urls": {
        "Homepage": "https://github.com/gediminasz/slskit",
        "Repository": "https://github.com/gediminasz/slskit"
    },
    "split_keywords": [
        "salt",
        "saltstack",
        "sls"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "82ac8543658797e5f1dc40fe0357195657a04e6e556fafd7e71efb53a96825cf",
                "md5": "6e7f24c607af9dd3a546e0aff226499e",
                "sha256": "864409aa4fb3ec089a7c3c88d6a3914a71a2af722b9b4c651f7a3a7e60a58634"
            },
            "downloads": -1,
            "filename": "slskit-2023.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6e7f24c607af9dd3a546e0aff226499e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 8516,
            "upload_time": "2023-07-01T12:41:43",
            "upload_time_iso_8601": "2023-07-01T12:41:43.609676Z",
            "url": "https://files.pythonhosted.org/packages/82/ac/8543658797e5f1dc40fe0357195657a04e6e556fafd7e71efb53a96825cf/slskit-2023.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "301299e99b1289822a28e6117175139d63b23fd3f639721c80512a76a3627640",
                "md5": "0d297f59a62d7eeda8f00f328d161f2f",
                "sha256": "4d6e76bab6cef150f814eaa50531c94c0aeb6bbc9fbda6ff02c93b2a46f46afc"
            },
            "downloads": -1,
            "filename": "slskit-2023.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0d297f59a62d7eeda8f00f328d161f2f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 7336,
            "upload_time": "2023-07-01T12:41:45",
            "upload_time_iso_8601": "2023-07-01T12:41:45.161963Z",
            "url": "https://files.pythonhosted.org/packages/30/12/99e99b1289822a28e6117175139d63b23fd3f639721c80512a76a3627640/slskit-2023.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-01 12:41:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gediminasz",
    "github_project": "slskit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "slskit"
}
        
Elapsed time: 0.26115s