Closed noelmcloughlin closed 5 years ago
vagrant@ubuntu1804:~$ sudo salter show mystuff
profile mystuff not found
vagrant@ubuntu1804:~$ sudo salter edit mystuff
Now run: sudo salter add mystuff
vagrant@ubuntu1804:~$ sudo salter show mystuff
# This is a profile template which you must customize
# The format is a YAML list; indention is important
# See https://github.com/saltstack-formulas for valid entries
base:
'*':
- git
- golang
- kubernetes
Result:
vagrant@ubuntu1804:~$ sudo salter add mystuff
==> This script will add: salter
press return to continue or control-c to abort
cloning git-formula from saltstack-formulas ...
cloning golang-formula from saltstack-formulas ...
... using fork: noelmcloughlin, branch: fixes
Branch 'fixes' set up to track remote branch 'fixes' from 'origin'.
Switched to a new branch 'fixes'
cloning kubernetes-formula from saltstack-formulas ...
run salt: this takes a while, please be patient ...
-------------
Succeeded: 29 (changed=19)
Failed: 0
-------------
See full log in [ /tmp/saltstack-formulas-salter/log.201908280835 ]
/////////////////////////////////////////////////////////////////
mystuff for salter has completed
////////////////////////////////////////////////////////////////
vagrant@ubuntu1804:~$ which go
/usr/bin/go
vagrant@ubuntu1804:~$ which kubectl
/usr/bin/kubectl
vagrant@ubuntu1804:~$ which git
/usr/bin/git
Ideally a remove profile is auto-generated when an add profile is created. That would require better standardization in saltstack-formulas to ensure every init
has associated clean
- if we could guarantee that then this WILL work well.
Looks good
Use Case: I want to create new profile
Now edit the template
Now show the new profile
Now run the new profile