Get rid of cloud-init on single-use-slaves
nova metadata service is too flaky. Instead of using it for anything, bake the ssh key into the images. Change-Id: I7c02da1ed6f5c5c3f5a2437f606fc0aab3d3dd3f
This commit is contained in:
parent
f22e31a366
commit
325ec8d572
@ -53,4 +53,38 @@ class openstack_project::single_use_slave (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
package { 'cloud-init':
|
||||||
|
ensure => 'absent',
|
||||||
|
}
|
||||||
|
|
||||||
|
case $::operatingsystem {
|
||||||
|
'Fedora': {
|
||||||
|
$ssh_user = 'fedora'
|
||||||
|
$ssh_dir = '/home/fedora/.ssh'
|
||||||
|
}
|
||||||
|
'Ubuntu': {
|
||||||
|
$ssh_user = 'ubuntu'
|
||||||
|
$ssh_dir = '/home/ubuntu/.ssh'
|
||||||
|
}
|
||||||
|
'CentOS': {
|
||||||
|
$ssh_user = 'root'
|
||||||
|
$ssh_dir = '/root/.ssh'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ! defined(File[$ssh_dir]) {
|
||||||
|
file { $ssh_dir:
|
||||||
|
ensure => directory,
|
||||||
|
mode => '0700',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ssh_authorized_key { 'nodepool-static-2015-03-19':
|
||||||
|
ensure => present,
|
||||||
|
user => $ssh_user,
|
||||||
|
type => 'ssh-rsa',
|
||||||
|
key => 'AAAAB3NzaC1yc2EAAAADAQABAAABAQC6WutNHfM+YdnjeNFeaIpvxqt+9aDn95Ykpmc+fASSjlDZJtOrueH3ch/v08wkE4WQKg03i+t8VonqEwMGmApYA3VzFsURUQbxzlSz5kHlBQSqgz5JTwUmnt1RH5sePL5pkuJ6JgqJ8PxJod6fiD7YDjaKJW/wBzXGnGg2EkgqrkBQXYL4hyaPuSwsQF0Gdwg3QFqXl+R/GrM6FscUkkJzbjqGKI2GhLT8mf2BIMEAiMFhF5Wl4FFrbvhTfPfW+9VdcsiMxCXaxp00n1x1+Y7OqR5AZ/id0Lkz9ZoFVGS901OB/L4xXrvUtI2y+kIYeF6hxfmAl/zhY0eWzwo9lDPz',
|
||||||
|
require => File[$ssh_dir],
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user