Last active
August 29, 2015 14:03
-
-
Save btorch/7d880c661fa8ac54bc8a to your computer and use it in GitHub Desktop.
Revisions
-
btorch revised this gist
Aug 29, 2014 . 1 changed file with 10 additions and 1 deletion.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 @@ -32,4 +32,13 @@ $ salt -t 15 -G 'stype:data' --out=txt grains.item roles ======================================== - Compound with grains (G) =============================================== $ salt -t 10 -C "G@roles:account and G@stype:synnex" ============================================== - Move roles grain from minion to grains file ============================================== sudo salt '*' --out=txt grains.append roles nada sudo salt '*' cmd.run "sed -i -e '/roles/,+10d' /etc/salt/minion" sudo salt '*' --out=txt grains.remove roles nada -
btorch revised this gist
Jul 3, 2014 . 1 changed file with 4 additions and 4 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 @@ -22,14 +22,14 @@ Useful salt CLI Flags * Depending what I'm retrieving from several minions I sometimes use --out=txt so I can get one liners back that can be compared =============================================== - Using Grain target & grains execution module =============================================== $ salt -t 15 -G 'stype:data' --out=txt grains.item roles ======================================== - Compound with grains (G) =============================================== $ salt -t 10 -C "G@roles:account and G@stype:synnex" < -
btorch revised this gist
Jul 3, 2014 . 1 changed file with 8 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 @@ -21,6 +21,14 @@ Useful salt CLI Flags * Depending what I'm retrieving from several minions I sometimes use --out=txt so I can get one liners back that can be compared ======================================== - Using Grain target & grains execution module sudo salt -t 15 -G 'stype:data' --out=txt grains.item roles ======================================== - Compound with grains (G) -
btorch revised this gist
Jul 3, 2014 . 1 changed file with 9 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 @@ -12,6 +12,15 @@ builtin state modules: Those are normally used when writing/creating a state file ======================================== Useful salt CLI Flags ======================================== -t TIMEOUT, --timeout= -b BATCH, --batch=BATCH, --batch-size=BATCH --out=OUTPUT, --output=OUTPUT * Depending what I'm retrieving from several minions I sometimes use --out=txt so I can get one liners back that can be compared ======================================== - Compound with grains (G) -
btorch revised this gist
Jul 3, 2014 . 1 changed file with 16 additions and 1 deletion.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 @@ -1,3 +1,18 @@ Helpful Referecens that I use all the time - http://salt.readthedocs.org/en/v0.17.5/ref/modules/all/ (builtin execution modules) - http://salt.readthedocs.org/en/v0.17.5/ref/states/all/ (builtin state modules) Note: Change the version above on the URL accordingly builtin execution modules: Those I normally used when executing a salt cli command such as the examples below builtin state modules: Those are normally used when writing/creating a state file ======================================== - Compound with grains (G) $ salt -t 10 -C "G@roles:account and G@stype:synnex" < -
btorch created this gist
Jul 3, 2014 .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,3 @@ - Using Compound with grains (G) $ salt -t 10 -C "G@roles:account and G@stype:synnex" <