top | item 41177956

(no title)

malikNF | 1 year ago

This looks very useful. I did not know this. Thank you!

discuss

order

adolph|1 year ago

Hope it helps. I use the configs as a source of truth and have a dozen or so different included files. This way the servers are grouped logically similar to ansible enventories (which I generate using the different configs). Running a command against all servers in one or more configs is simple this way:

  $ grep '^Host' .ssh/<config file> | awk '{print $2}' | while read hst; do ssh $hst '<remote command>' 2> /dev/null < /dev/null; done