diff options
author | Arun Isaac | 2024-10-18 15:33:24 +0100 |
---|---|---|
committer | Arun Isaac | 2024-10-18 15:33:24 +0100 |
commit | 68afefe92229091467f31e74c9722a35e52fe82e (patch) | |
tree | 6ea3c7f060ede1aa7b6b2436f2a852382d11c8a6 /topics/octopus | |
parent | 32c370fa0e1793bc91395a8c4ad30c9c723fca10 (diff) | |
download | gn-gemtext-68afefe92229091467f31e74c9722a35e52fe82e.tar.gz |
Include tux05 in octopus cluster for loop.
Diffstat (limited to 'topics/octopus')
-rw-r--r-- | topics/octopus/slurm-upgrade.gmi | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/topics/octopus/slurm-upgrade.gmi b/topics/octopus/slurm-upgrade.gmi index 6a7b802..822f68e 100644 --- a/topics/octopus/slurm-upgrade.gmi +++ b/topics/octopus/slurm-upgrade.gmi @@ -75,14 +75,14 @@ Copy over any configuration file changes from octopus01. Then, reload the new sy It is a lot of typing to run the same command on all worker nodes. You could make this a little less cumbersome with the following bash for loop. ``` -for node in octopus02 octopus03 octopus05 octopus06 octopus07 octopus08 octopus09 octopus10 octopus11 tux06 tux07 tux08 tux09; +for node in octopus02 octopus03 octopus05 octopus06 octopus07 octopus08 octopus09 octopus10 octopus11 tux05 tux06 tux07 tux08 tux09; do ssh $node your command done ``` You can even do this for sudo commands using the -S flag of sudo that makes it read the password from stdin. Assuming your password is in the pass password manager, the bash for loop would then look like: ``` -for node in octopus02 octopus03 octopus05 octopus06 octopus07 octopus08 octopus09 octopus10 octopus11 tux06 tux07 tux08 tux09; +for node in octopus02 octopus03 octopus05 octopus06 octopus07 octopus08 octopus09 octopus10 octopus11 tux05 tux06 tux07 tux08 tux09; do pass octopus | ssh $node sudo -S your command done |