TSL
TSL - The State Library Module
Maintenance
Developed and maintained by TurtleTraction.
Overview
The State Library aims to provide a way to document state files in a consistant manner, similar to sys.doc.
By adding the DOC section below to the top of the states file the following feature are enabled.
- State file overview
- Searchable state file estate
- Automated Variable extraction
- Pillar
- Grains
- Include
#START-DOC
# File_name: state.sls
# Author: XXXXXX
# Description:
# Grains (if applicable):
# Pillars (if applicable):
# Syntax: XXXXXX
#END-DOC
Quickstart
To get started with TSL:
Install the extention on the minion
For Salt onedir package (3006 and up):
sudo salt '<minion>' pip.install saltext.tsl
or
sudo salt-pip install saltext.tsl
For classic Salt package (pre 3006):
sudo pip install saltext.tsl
Test (Listing states for a specific minion included in highstate)
sudo salt '<minion>' tsl.list
Use sys.doc to list all tsl functions
sudo salt '<minion>' sys.doc tsl
For any queries please send an email to info@turtletraction.com
Doc header generator
TSL contains an additional standalone script that is not installed with the extension: tsl-add-header.py. You can use it to automatically add the doc header to any number of sls files:
python tsl-add-header.py path/to/sls-file-or-directory
For usage details, run the following command:
python tsl-add-header.py --help
Development
To get started with your new project:
# Create a new venv
python3 -m venv env --prompt saltext-tsl
source env/bin/activate
# On mac, you may need to upgrade pip
python -m pip install --upgrade pip
# On WSL or some flavors of linux you may need to install the `enchant`
# library in order to build the docs
sudo apt-get install -y enchant
# Install extension + test/dev/doc dependencies into your environment
python -m pip install -e '.[tests,dev,docs]'
pre-commit install --install-hooks
# Run tests!
python -m nox -e tests-3
# skip requirements install for next time
export SKIP_REQUIREMENTS_INSTALL=1
# Build the docs, serve, and view in your web browser:
python -m nox -e docs && (cd docs/_build/html; python -m webbrowser localhost:8000; python -m http.server; cd -)
# Run the example function
salt-call --local tsl.hello
Metadata
Release files for saltext.tsl 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| saltext_tsl-1.4.0.tar.gz | 17.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| saltext.tsl-1.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.6 kB
Release files / saltext_tsl-1.4.0.tar.gz
| Download URL | saltext_tsl-1.4.0.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77660c3fb0f5ba1da41f25c679b7234bbaec5bcbb3c5a268ab371ff45d211ed2
|
|
BLAKE2b-256 checksum How to use checksums |
507eb3b37b8e4e7f6935bdd24843e2f350e628138716f51ec48b30428493fdeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.14
|
Release files / saltext.tsl-1.4.0-py3-none-any.whl
| Download URL | saltext.tsl-1.4.0-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
298e875b7cbfbc56811838e05b9441c91e42b0a1b659dc21df42a37cbc30ed46
|
|
BLAKE2b-256 checksum How to use checksums |
b53b942aef9555298e3bbe41e2d8519f393208a1e189d2c8763a565ff441a1fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.14
|
Security for saltext.tsl 1.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.