summaryrefslogtreecommitdiff
path: root/topics/octopus
diff options
context:
space:
mode:
authorArun Isaac2024-10-18 15:33:24 +0100
committerArun Isaac2024-10-18 15:33:24 +0100
commit68afefe92229091467f31e74c9722a35e52fe82e (patch)
tree6ea3c7f060ede1aa7b6b2436f2a852382d11c8a6 /topics/octopus
parent32c370fa0e1793bc91395a8c4ad30c9c723fca10 (diff)
downloadgn-gemtext-68afefe92229091467f31e74c9722a35e52fe82e.tar.gz
Include tux05 in octopus cluster for loop.
Diffstat (limited to 'topics/octopus')
-rw-r--r--topics/octopus/slurm-upgrade.gmi4
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