From 2a766dfcc132b0a066a88bf16cf463437599038c Mon Sep 17 00:00:00 2001 From: Jeff Peeler Date: Wed, 18 Apr 2012 15:17:51 -0400 Subject: [PATCH] Remove rootpw from tdls and add ec2-user to sudoers file Fixes #72 Fixes #73 Signed-off-by: Jeff Peeler --- bin/heat | 2 ++ heat/jeos/F16-i386-cfntools-jeos.tdl | 3 +-- heat/jeos/F16-i386-gold-jeos.tdl | 1 - heat/jeos/F16-x86_64-cfntools-jeos.tdl | 3 +-- heat/jeos/F16-x86_64-gold-jeos.tdl | 1 - heat/jeos/F17-i386-cfntools-jeos.tdl | 3 +-- heat/jeos/F17-i386-gold-jeos.tdl | 1 - heat/jeos/F17-x86_64-cfntools-jeos.tdl | 3 +-- heat/jeos/F17-x86_64-gold-jeos.tdl | 1 - 9 files changed, 6 insertions(+), 12 deletions(-) diff --git a/bin/heat b/bin/heat index 99033afb..fae612e9 100755 --- a/bin/heat +++ b/bin/heat @@ -281,6 +281,8 @@ def jeos_create(options, arguments): sys.exit(1) tdl_path = '%s%s-%s-%s-jeos.tdl' % (jeos_path, distro, arch, instance_type) + if options.debug: + print "Using tdl: %s" % tdl_path # Load the cfntools into the cfntool image by encoding them in base64 # and injecting them into the TDL at the appropriate place diff --git a/heat/jeos/F16-i386-cfntools-jeos.tdl b/heat/jeos/F16-i386-cfntools-jeos.tdl index 13bd6dcf..0bcc9717 100644 --- a/heat/jeos/F16-i386-cfntools-jeos.tdl +++ b/heat/jeos/F16-i386-cfntools-jeos.tdl @@ -7,12 +7,11 @@ file:/var/lib/libvirt/images/Fedora-16-i386-DVD.iso - password Fedora 16 -yum -y update --skip-broken;yum -y install yum-plugin-fastestmirror;yum -y update;/usr/sbin/useradd ec2-user;yum -y install cloud-init;cat >> /etc/rc.d/rc.local << EOF;chmod +x /etc/rc.d/rc.local;chmod +x /opt/aws/bin/cfg-* +yum -y update --skip-broken;yum -y install yum-plugin-fastestmirror;yum -y update;/usr/sbin/useradd ec2-user;echo -e 'ec2-user\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers;yum -y install cloud-init;cat >> /etc/rc.d/rc.local << EOF;chmod +x /etc/rc.d/rc.local;chmod +x /opt/aws/bin/cfg-* #!/bin/bash setenforce 0 EOF diff --git a/heat/jeos/F16-i386-gold-jeos.tdl b/heat/jeos/F16-i386-gold-jeos.tdl index 18564856..d1a23231 100644 --- a/heat/jeos/F16-i386-gold-jeos.tdl +++ b/heat/jeos/F16-i386-gold-jeos.tdl @@ -7,7 +7,6 @@ file:/var/lib/libvirt/images/Fedora-16-i386-DVD.iso - password Fedora 16 diff --git a/heat/jeos/F16-x86_64-cfntools-jeos.tdl b/heat/jeos/F16-x86_64-cfntools-jeos.tdl index ae44887b..ab12ae0b 100644 --- a/heat/jeos/F16-x86_64-cfntools-jeos.tdl +++ b/heat/jeos/F16-x86_64-cfntools-jeos.tdl @@ -7,12 +7,11 @@ file:/var/lib/libvirt/images/Fedora-16-x86_64-DVD.iso - password Fedora 16 -yum -y update --skip-broken;yum -y install yum-plugin-fastestmirror;yum -y update;/usr/sbin/useradd ec2-user;yum -y install cloud-init;cat >> /etc/rc.d/rc.local << EOF;chmod +x /etc/rc.d/rc.local;chmod +x /opt/aws/bin/cfn-* +yum -y update --skip-broken;yum -y install yum-plugin-fastestmirror;yum -y update;/usr/sbin/useradd ec2-user;echo -e 'ec2-user\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers;yum -y install cloud-init;cat >> /etc/rc.d/rc.local << EOF;chmod +x /etc/rc.d/rc.local;chmod +x /opt/aws/bin/cfn-* #!/bin/bash setenforce 0 EOF diff --git a/heat/jeos/F16-x86_64-gold-jeos.tdl b/heat/jeos/F16-x86_64-gold-jeos.tdl index 6e900f1d..f18f045d 100644 --- a/heat/jeos/F16-x86_64-gold-jeos.tdl +++ b/heat/jeos/F16-x86_64-gold-jeos.tdl @@ -7,7 +7,6 @@ file:/var/lib/libvirt/images/Fedora-16-x86_64-DVD.iso - password Fedora 16 diff --git a/heat/jeos/F17-i386-cfntools-jeos.tdl b/heat/jeos/F17-i386-cfntools-jeos.tdl index 4b1fa327..51c6d7fd 100644 --- a/heat/jeos/F17-i386-cfntools-jeos.tdl +++ b/heat/jeos/F17-i386-cfntools-jeos.tdl @@ -7,12 +7,11 @@ file:/var/lib/libvirt/images/Fedora-17-i386-DVD.iso - password Fedora 17 -yum -y update --skip-broken;yum -y install yum-plugin-fastestmirror;yyum -y update;/usr/sbin/useradd ec2-user;yum -y install cloud-init;cat >> /etc/rc.d/rc.local << EOF;chmod +x /etc/rc.d/rc.local;chmod +x /opt/aws/bin/cfn-* +yum -y update --skip-broken;yum -y install yum-plugin-fastestmirror;yum -y update;/usr/sbin/useradd ec2-user;echo -e 'ec2-user\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers;yum -y install cloud-init;cat >> /etc/rc.d/rc.local << EOF;chmod +x /etc/rc.d/rc.local;chmod +x /opt/aws/bin/cfn-* #!/bin/bash setenforce 0 EOF diff --git a/heat/jeos/F17-i386-gold-jeos.tdl b/heat/jeos/F17-i386-gold-jeos.tdl index 13c14b88..31ba4202 100644 --- a/heat/jeos/F17-i386-gold-jeos.tdl +++ b/heat/jeos/F17-i386-gold-jeos.tdl @@ -7,7 +7,6 @@ file:/var/lib/libvirt/images/Fedora-17-i386-DVD.iso - password Fedora 17 diff --git a/heat/jeos/F17-x86_64-cfntools-jeos.tdl b/heat/jeos/F17-x86_64-cfntools-jeos.tdl index 0ddae495..6c622778 100644 --- a/heat/jeos/F17-x86_64-cfntools-jeos.tdl +++ b/heat/jeos/F17-x86_64-cfntools-jeos.tdl @@ -7,12 +7,11 @@ file:/var/lib/libvirt/images/Fedora-17-x86_64-DVD.iso - password Fedora 17 -yum -y update --skip-broken;yum -y install yum-plugin-fastestmirror;yum -y update;/usr/sbin/useradd ec2-user;yum -y install cloud-init;cat >> /etc/rc.d/rc.local << EOF;chmod +x /etc/rc.d/rc.local;chmod +x /opt/aws/bin/cfn-* +yum -y update --skip-broken;yum -y install yum-plugin-fastestmirror;yum -y update;/usr/sbin/useradd ec2-user;echo -e 'ec2-user\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers;yum -y install cloud-init;cat >> /etc/rc.d/rc.local << EOF;chmod +x /etc/rc.d/rc.local;chmod +x /opt/aws/bin/cfn-* #!/bin/bash setenforce 0 EOF diff --git a/heat/jeos/F17-x86_64-gold-jeos.tdl b/heat/jeos/F17-x86_64-gold-jeos.tdl index 53bc1ebc..c21b2db7 100644 --- a/heat/jeos/F17-x86_64-gold-jeos.tdl +++ b/heat/jeos/F17-x86_64-gold-jeos.tdl @@ -7,7 +7,6 @@ file:/var/lib/libvirt/images/Fedora-17-x86_64-DVD.iso - password Fedora 17 -- 2.45.2