Last active
September 5, 2021 00:45
-
-
Save vitalvas/a31e3f9434a6a93862bc1f207c47f3b1 to your computer and use it in GitHub Desktop.
Revisions
-
vitalvas revised this gist
Sep 5, 2021 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,3 +10,6 @@ for env in $(salt-call cp.envs --out=json | jq '.local[]' | tr -d '"'); do fi done done salt-call state.show_states --out=json > salt/state.json salt-call pillar.items --out=json > salt/pillar.json -
vitalvas created this gist
Jun 23, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ #!/bin/bash for env in $(salt-call cp.envs --out=json | jq '.local[]' | tr -d '"'); do mkdir -p salt/${env} for row in $(salt-call cp.list_master saltenv=${env} --out=json | jq '.local[]' | tr -d '"' | tr '/' ' ' | awk '{print $1}' | sort | uniq); do if [[ "${row}" =~ .sls$ ]]; then salt-call cp.get_file saltenv=${env} salt://${row} salt/${env} else salt-call cp.get_dir saltenv=${env} salt://${row} salt/${env} fi done done