diff --git a/README.md b/README.md index a1e15b4..afefc10 100644 --- a/README.md +++ b/README.md @@ -23,11 +23,45 @@ Indeed, SaltStack are working on a tool, Salt Package Manager, that aims to do s ## Usage -TODO - this needs to be done sometime... +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. ## Configuration -TODO - this needs to be done sometime... +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. ## To Do @@ -52,6 +86,6 @@ Email me at: brotherballantine@gmail.com Or you can find me on: * [Mastodon](https://mastodon.rocks/@brotherballan) -* [Wire](@brotherballan) +* Wire (@brotherballan) * [Google+](https://plus.google.com/+GregoryBallantine1)