mirror of
https://github.com/m8tin/cis.git
synced 2025-12-06 07:48:26 +01:00
Compare commits
2 Commits
e3f3be3725
...
d0eb35441f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0eb35441f | ||
|
|
ca4914c63c |
@@ -115,7 +115,7 @@ and register the SSH public key of root as __deploy key__ to allow readonly acce
|
||||
|| (ssh-keygen \
|
||||
-t ed25519 \
|
||||
-f "/root/.ssh/id_ed25519" -q -N "" \
|
||||
-C "$(date +%Y%m%d):root@$(hostname -b)" \
|
||||
-C "$(date +%Y%m%d)-root@$(hostname -b)" \
|
||||
&& cat "/root/.ssh/id_ed25519.pub")
|
||||
```
|
||||
|
||||
@@ -145,7 +145,7 @@ cat "${JENKINS_HOME}/.ssh/id_ed25519.pub" \
|
||||
|| (ssh-keygen \
|
||||
-t ed25519 \
|
||||
-f "${JENKINS_HOME}/.ssh/id_ed25519" -q -N "" \
|
||||
-C "$(date +%Y%m%d):$(whoami)@$(echo ${JENKINS_URL} | cut -d/ -f3)" \
|
||||
-C "$(date +%Y%m%d)-$(whoami)@$(echo ${JENKINS_URL} | cut -d/ -f3)" \
|
||||
&& cat "${JENKINS_HOME}/.ssh/id_ed25519.pub")
|
||||
|
||||
# add your host here, note the tailing '&' to run it in parallel
|
||||
|
||||
@@ -33,7 +33,7 @@ function prepareThisHost() {
|
||||
ssh-keygen \
|
||||
-t ed25519 \
|
||||
-f "/root/.ssh/id_ed25519" -q -N "" \
|
||||
-C "$(date +%Y%m%d):root@$(hostname -b)"
|
||||
-C "$(date +%Y%m%d)-root@$(hostname -b)"
|
||||
|
||||
cat "/root/.ssh/id_ed25519.pub" \
|
||||
&& return 0
|
||||
|
||||
@@ -75,8 +75,8 @@ function checkSync() {
|
||||
for _COMPOSITION_PATH in ${_COMPOSITIONS}*; do
|
||||
|
||||
# If remote host is found than it is responsible for this container-composition, otherwise skip
|
||||
# (grep -E "^something" means. Line has to start with "something".)
|
||||
grep -E "^${_REMOTE_HOSTNAME_SHORT}" "${_COMPOSITION_PATH}/zfssync-hosts" &> /dev/null \
|
||||
# (grep -E "^[[:blank:]]*something" means. Line has to start with "something", leading blank chars are ok.)
|
||||
grep -E "^[[:blank:]]*${_REMOTE_HOSTNAME_SHORT}" "${_COMPOSITION_PATH}/zfssync-hosts" &> /dev/null \
|
||||
|| continue;
|
||||
|
||||
_COMPOSITION_NAME="${_COMPOSITION_PATH##*/}" #Removes longest matching pattern '*/' from the begin
|
||||
|
||||
Reference in New Issue
Block a user