
This is a mechanically generated change to replace openstack.org git:// URLs with https:// equivalents. This is in aid of a planned future move of the git hosting infrastructure to a self-hosted instance of gitea (https://gitea.io), which does not support the git wire protocol at this stage. This update should result in no functional change. For more information see the thread at http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html Change-Id: I874e20de34dc6d37d2abad121288b228ca5278db
47 lines
1.1 KiB
Puppet
47 lines
1.1 KiB
Puppet
exec { 'update apt':
|
|
command => '/usr/bin/apt-get update',
|
|
}
|
|
|
|
# Installing ssl-cert in order to get snakeoil certs
|
|
package { 'ssl-cert':
|
|
ensure => present,
|
|
require => Exec['update apt'],
|
|
}
|
|
|
|
vcsrepo { '/etc/project-config':
|
|
ensure => latest,
|
|
provider => git,
|
|
revision => 'master',
|
|
source => 'https://git.openstack.org/openstack-infra/project-config',
|
|
}
|
|
|
|
# Generates ssh rsa keys
|
|
define ssh_keygen (
|
|
$ssh_directory = undef
|
|
) {
|
|
Exec { path => '/bin:/usr/bin' }
|
|
|
|
$ssh_key_file = "${ssh_directory}/${name}"
|
|
|
|
exec { "ssh-keygen for ${name}":
|
|
command => "ssh-keygen -t rsa -f ${ssh_key_file} -N ''",
|
|
creates => $ssh_key_file,
|
|
}
|
|
}
|
|
|
|
$ssh_key_directory = '/tmp/jenkins-ssh-keys'
|
|
file { $ssh_key_directory:
|
|
ensure => directory,
|
|
}
|
|
ssh_keygen { 'ssh_rsa_key':
|
|
ssh_directory => $ssh_key_directory,
|
|
require => File[$ssh_key_directory],
|
|
}
|
|
|
|
# JJB doesn't have a --insecure or --capath, so add the snakeoil certs to the system trust store
|
|
exec { 'trust snake oil':
|
|
command => '/bin/cp /etc/ssl/certs/ssl-cert-snakeoil.pem /usr/local/share/ca-certificates/ubuntu.crt && /usr/sbin/update-ca-certificates',
|
|
require => Package['ssl-cert'],
|
|
}
|
|
|