Faidon Liambotis has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/196175

Change subject: jenkins: transition to ssh::userkey
......................................................................

jenkins: transition to ssh::userkey

Bug: T92475
Change-Id: I240282cb4c065ace16877fdd4124496c46223e03
---
M manifests/role/ci.pp
M modules/jenkins/manifests/slave.pp
2 files changed, 7 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/75/196175/1

diff --git a/manifests/role/ci.pp b/manifests/role/ci.pp
index f53abde..fe0f952 100644
--- a/manifests/role/ci.pp
+++ b/manifests/role/ci.pp
@@ -156,14 +156,11 @@
     }
 
     class { 'jenkins::slave':
-        ssh_authorized_key => 
'AAAAB3NzaC1yc2EAAAABIwAAAQEA4QGc1Zs/S4s7znEYw7RifTuZ4y4iYvXl5jp5tJA9kGUGzzfL0dc4ZEEhpu+4C/TixZJXqv0N6yke67cM8hfdXnLOVJc4n/Z02uYHQpRDeLAJUAlGlbGZNvzsOLw39dGF0u3YmwDm6rj85RSvGqz8ExbvrneCVJSaYlIRvOEKw0e0FYs8Yc7aqFRV60M6fGzWVaC3lQjSnEFMNGdSiLp3Vl/GB4GgvRJpbNENRrTS3Te9BPtPAGhJVPliTflVYvULCjYVtPEbvabkW+vZznlcVHAZJVTTgmqpDZEHqp4bzyO8rBNhMc7BjUVyNVNC5FCk+D2LagmIriYxjirXDNrWlw==',
-        ssh_key_name       => 'jenkins@gallium',
-        # Lamely restrict to master which is gallium
-        ssh_key_options    => [ 'from="208.80.154.135"' ],
-        user               => 'jenkins-slave',
-        workdir            => '/srv/ssd/jenkins-slave',
+        ssh_key => 'ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAQEA4QGc1Zs/S4s7znEYw7RifTuZ4y4iYvXl5jp5tJA9kGUGzzfL0dc4ZEEhpu+4C/TixZJXqv0N6yke67cM8hfdXnLOVJc4n/Z02uYHQpRDeLAJUAlGlbGZNvzsOLw39dGF0u3YmwDm6rj85RSvGqz8ExbvrneCVJSaYlIRvOEKw0e0FYs8Yc7aqFRV60M6fGzWVaC3lQjSnEFMNGdSiLp3Vl/GB4GgvRJpbNENRrTS3Te9BPtPAGhJVPliTflVYvULCjYVtPEbvabkW+vZznlcVHAZJVTTgmqpDZEHqp4bzyO8rBNhMc7BjUVyNVNC5FCk+D2LagmIriYxjirXDNrWlw==
 jenkins@gallium from="208.80.154.135"',
+        user    => 'jenkins-slave',
+        workdir => '/srv/ssd/jenkins-slave',
         # Mount is handled on the node definition
-        require            => Mount['/srv/ssd'],
+        require => Mount['/srv/ssd'],
     }
 
     # .gitconfig file required for rare git write operations
diff --git a/modules/jenkins/manifests/slave.pp 
b/modules/jenkins/manifests/slave.pp
index e1ff9b8..71aea25 100644
--- a/modules/jenkins/manifests/slave.pp
+++ b/modules/jenkins/manifests/slave.pp
@@ -1,9 +1,7 @@
 # == Class: jenkins::slave
 #
 class jenkins::slave(
-    $ssh_authorized_key,
-    $ssh_key_name,
-    $ssh_key_options = [],
+    $ssh_key,
     $user = 'jenkins-slave',
     $workdir = '/var/lib/jenkins-slave',
 ) {
@@ -31,12 +29,8 @@
     }
 
     # Finally publish the Jenkins master authorized key
-    ssh_authorized_key { $ssh_key_name:
+    ssh::userkey { $user:
         ensure  => present,
-        user    => $user,
-        type    => 'ssh-rsa',
-        key     => $ssh_authorized_key,
-        options => $ssh_key_options,
+        content => $ssh_key,
     }
-
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/196175
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I240282cb4c065ace16877fdd4124496c46223e03
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to