The goal of this tool is provide a flexible, yet powerful tool to manage Salt formulas. It aims to support many different configurations in an intuitive manner, such as, but not limited to:
* Downloading formulas from multiple sources
* Keeping formula management to one single configuration file
* Avoiding needing to modify the Salt master config file to add new formula sources
Indeed, SaltStack are working on a tool, Salt Package Manager, that aims to do similar things. However, that tool feels a little "hacky", in my opinion, and doesn't use some of the tools that are already available to us, such as git/GitHub, and it requires the use of hosting packages out of a separate repository. Granted, that approach does have its positives, but I felt that I needed something a little lighter than that solution. To each their own :)
As it currently stands, you should only need to run a simple `salt-formula-manager.py` in a directory containing your SFM configuration. There are plans to 1) add a "system-wide" or "default" configuration path, so you do not need to be in a specific directory to run this, and 2) to add a `-c /path/to/config.yaml` parameter to override the default path to the configuration file.
Here's an explanation of the current list of configuration parameters...
#### `formulas_url`
Defines the default remote URL to use for Salt formulas. The default here is a common repository (https://github.com/SaltStack-Formulas) that, theoretically, most of your formulas will share.
#### `formulas_dir`
This defines where your formulas are going to be stored. This can be the same directory as your locally-written Salt states, or this can be an entirely separate directory altogether (Note: you WILL need to have permission to write to this directory).
#### `purge_formulas`
If true, SFM will attempt to remove all of the "unmanaged" Salt formulas that are present in the directory defined by `formulas_dir` (noted above).
#### `formulas`
This is just a simple hash/list of formulas to download/manage. Simply giving an array entry (e.g. `- munin` - note there is no colon), or an empty hash (e.g. `- munin: {}`) will let SFM attempt to guess the URL and destination directory.
#### Formula definitions
Each formula listed (as noted above) has specific options that may be set to change the default.
#### `url`
The remote URL to use - theoretically, this should work with SSH URLs if you have permission to clone over SSH, otherwise, HTTPS URLs will work just fine if you have permission to access the repository.
#### `git_branch`
This defines a specific Git branch to track for changes, if the formula is not on said branch, SFM will attempt to checkout the desired branch.
#### `name`
This option is not very important - if the URL isn't specified for a formula, then SFM will attempt to guess the formula's repository URL based off of the default repository URL and the name/title of the formula. If the name isn't specified, SFM will use the title of the title of the entry appended with "-formula" as its name. Thus, a name of "munin-form" with the default URL "https://github.com/SaltStack-Formulas" when end up with "https://github.com/SaltStack-Formula/munin-form"
**Note:** I'm debating removing this in a future release, as I don't see the use beyond saving a few characters here and there.
This program is licensed under the Mozilla Public License, version 2.0 (I'm not a license guru, if this needs to be changed to comply with other licenses, I'll gladly change it)