ArielGlenn has uploaded a new change for review.
https://gerrit.wikimedia.org/r/274101
Change subject: puppetize the install_console script
......................................................................
puppetize the install_console script
Change-Id: I51595dff8668cb6a1aa1057a08f343516ce8ed76
---
A files/misc/scripts/install_console
M manifests/role/access_new_install.pp
2 files changed, 27 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/01/274101/1
diff --git a/files/misc/scripts/install_console
b/files/misc/scripts/install_console
new file mode 100644
index 0000000..57471ae
--- /dev/null
+++ b/files/misc/scripts/install_console
@@ -0,0 +1,20 @@
+#!/bin/sh
+# log using new_install key, useful when debugging during installation or
+# before the first puppet run
+
+set -e
+set -u
+
+if [ "$(id -u)" -ne 0 ]; then
+ echo "run $0 as root"
+ exit 1
+fi
+
+if [ "$#" -le 0 ]; then
+ echo "usage: $0 host"
+ exit 1
+fi
+
+exec ssh -i /root/.ssh/new_install \
+ -o UserKnownHostsFile=/dev/null \
+ -o StrictHostKeyChecking=no $@
diff --git a/manifests/role/access_new_install.pp
b/manifests/role/access_new_install.pp
index f0dcc75..ec48fde 100644
--- a/manifests/role/access_new_install.pp
+++ b/manifests/role/access_new_install.pp
@@ -1,6 +1,7 @@
# install the private key needed to contact newly-installed servers
# to set up the initial puppet run.
# This key is dangerous, do not deploy widely!
+# Also install a convenience script to ssh in using this key
class role::access_new_install {
file { '/root/.ssh/new_install':
owner => 'root',
@@ -14,4 +15,10 @@
mode => '0444',
content => secret('ssh/new_install/new_install.pub'),
}
+ file { '/usr/local/bin/install_console':
+ owner => 'root',
+ group => 'root',
+ mode => '0555',
+ source => 'puppet:///files/misc/scripts/install_console',
+ }
}
--
To view, visit https://gerrit.wikimedia.org/r/274101
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I51595dff8668cb6a1aa1057a08f343516ce8ed76
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits