Added ability to purge unmanaged salt formulas
This commit is contained in:
parent
614758e4b0
commit
672be1929d
@ -57,6 +57,14 @@ def get_formulas(conf):
|
||||
# clone git repo
|
||||
Repo.clone_from(git_url, local_path)
|
||||
|
||||
# purge un-managed formulas
|
||||
def clean_formulas(conf):
|
||||
if conf['purge_formulas']:
|
||||
print('Cleaning out unmanaged formulas')
|
||||
|
||||
else:
|
||||
print('Not cleaning out unmanaged formulas')
|
||||
|
||||
# main program
|
||||
def main():
|
||||
# read configuration settings
|
||||
@ -68,5 +76,8 @@ def main():
|
||||
# do the formula stuff
|
||||
get_formulas(conf)
|
||||
|
||||
# clean unmanaged formulas
|
||||
clean_formulas(conf)
|
||||
|
||||
# run main
|
||||
main()
|
||||
|
@ -6,6 +6,9 @@ formulas_url: https://github.com/saltstack-formulas/
|
||||
# where to store the new formulas (relative to current directory)
|
||||
formulas_dir: formulas
|
||||
|
||||
# remove unmanaged formulas
|
||||
purge_formulas: true
|
||||
|
||||
# list of formulas to import
|
||||
formulas:
|
||||
- vim
|
||||
|
Loading…
Reference in New Issue
Block a user