Andrew Bogott has uploaded a new change for review.
https://gerrit.wikimedia.org/r/184287
Change subject: Remove the install_sudo script.
......................................................................
Remove the install_sudo script.
We can accomplish this in-line, and that also avoids a race.
Change-Id: I9148f700681df447e582e5b16aea0ce2f3693b9f
---
D modules/labs_bootstrapvz/files/install_sudo.sh
M modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml
M modules/labs_bootstrapvz/manifests/init.pp
3 files changed, 5 insertions(+), 17 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/87/184287/1
diff --git a/modules/labs_bootstrapvz/files/install_sudo.sh
b/modules/labs_bootstrapvz/files/install_sudo.sh
deleted file mode 100644
index 138fe7d..0000000
--- a/modules/labs_bootstrapvz/files/install_sudo.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-export SUDO_FORCE_REMOVE=yes
-apt-get --force-yes --assume-yes install sudo-ldap
diff --git a/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml
b/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml
index 8c59ee3..40c44a6 100644
--- a/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml
+++ b/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml
@@ -98,11 +98,6 @@
permissions: 755
owner: root
-
- src: /etc/bootstrap-vz/install_sudo.sh
- dst: /root/install_sudo.sh
- permissions: 755
- owner: root
- -
src: /etc/bootstrap-vz/access.conf
dst: /etc/security/access.conf
-
@@ -178,10 +173,13 @@
src: /etc/ssl/certs/GlobalSign_CA.pem
dst: /etc/ssl/certs/GlobalSign_CA.pem
image_commands:
+ # Current implementation does not specify an order between image_commands
and
+ # file_copy. This section should not depend on anything existing from
+ # file_copy; hence the touch below.
commands:
- ['chroot', '{root}', 'passwd', '-ld', 'root']
- - ['chroot', '{root}', '/root/install_sudo.sh']
- - ['chroot', '{root}', 'rm', '/root/install_sudo.sh']
+ - ['chroot', '{root}', '/bin/sh', '-c', 'echo "#" >> /etc/sudoers']
+ - ['chroot', '{root}', '/bin/sh', '-c', 'touch /etc/sudoers &&
SUDO_FORCE_REMOVE=yes apt-get --force-yes --assume-yes install sudo-ldap']
- ['chroot', '{root}', 'rm', '-f', '/etc/ssh/ssh_host*key*']
- ['chroot', '{root}', 'rm', '-f', '/etc/sudo-ldap.conf']
- ['chroot', '{root}', 'ln', '-s', '/etc/ldap/ldap.conf',
'/etc/sudo-ldap.conf']
diff --git a/modules/labs_bootstrapvz/manifests/init.pp
b/modules/labs_bootstrapvz/manifests/init.pp
index 9cbd900..5427cad 100644
--- a/modules/labs_bootstrapvz/manifests/init.pp
+++ b/modules/labs_bootstrapvz/manifests/init.pp
@@ -46,12 +46,6 @@
require => File["${bootstrap_filepath}/firstscripts"],
}
- file { "${bootstrap_filepath}/install_sudo.sh":
- mode => '0555',
- source => 'puppet:///modules/labs_bootstrapvz/install_sudo.sh',
- require => File[$bootstrap_filepath],
- }
-
$projectregex = "s/${instanceproject}/_PROJECT_/g"
$fqdnregex = "s/${::ec2_instance_id}.${::domain}/_FQDN_/g"
$masterregex = "s/${servername}/_MASTER_/g"
--
To view, visit https://gerrit.wikimedia.org/r/184287
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9148f700681df447e582e5b16aea0ce2f3693b9f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits