saltstack / salt-extension

Tool to simplify the creation of a new salt extension | NOTE: This repository is archived! Community alternative: https://github.com/salt-extensions/salt-extension-copier
https://github.com/salt-extensions/salt-extension-copier
Apache License 2.0
21 stars 20 forks source link

!!Project is Archived!!

Salt Project / VMware has ended active development of this project, this repository will no longer be updated.

salt-extension

Tool to simplify the creation of a new salt extension.

The why

salt-extension is a Python-based CLI tool for generating a project scaffolding to easily extend salt with exec modules, state modules, and more.

Extensions make life easier in several ways:

This approach to development, of the salt ecosystem, could also assist in the powers of Tiamat (resources: SEP26 // tiamat-pip source code).

Converting existing module sets into extensions could begin treating salt as a more "pluggable"/"extensible" ecosystem, and could make it easier to understand what modules haven’t been contributed to in a long time. It is difficult to maintain so many modules within salt that manage and orchestrate an ocean of APIs, operating systems, clouds, etc.

Quickstart

The best way to use this project is with pipx:

$ pipx install salt-extension
$ mkdir my_extension
$ cd my_extension
$ create-salt-extension my_extension -l states -l module
Author: John Example Doe
Author email: jd@example.com
Summary: An example Salt Extension Module
Url: https://example.com/my-saltext
License (apache, other): apache

Then follow the other output instructions.

If all goes well, you should be able to run:

$ salt-call --local my_extension.example_function text="it worked!"
local:
    it worked!

Happy hacking!