Updates jenkinsuser so skel config is Ubuntu only.
Exclude a couple of file resources from running on non-Ubuntu distributions (Red Hat for example) which don't always have bash config files (.bashrc, .profile, etc) in /etc/skel. Change-Id: Id67b16e1a80617c3bc98fce130b5fe2f343f5d6e Reviewed-on: https://review.openstack.org/18998 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
c5e4631a6b
commit
2ba9ef9b27
@ -82,34 +82,39 @@ class jenkins::jenkinsuser(
|
||||
require => File['/home/jenkins/.ssh'],
|
||||
}
|
||||
|
||||
file { '/home/jenkins/.bashrc':
|
||||
ensure => present,
|
||||
owner => 'jenkins',
|
||||
group => 'jenkins',
|
||||
mode => '0640',
|
||||
source => '/etc/skel/.bashrc',
|
||||
replace => false,
|
||||
require => File['/home/jenkins'],
|
||||
}
|
||||
#NOTE: not all distributions have default bash files in /etc/skel
|
||||
if ($::operatingsystem == 'Ubuntu') {
|
||||
|
||||
file { '/home/jenkins/.bash_logout':
|
||||
ensure => present,
|
||||
source => '/etc/skel/.bash_logout',
|
||||
owner => 'jenkins',
|
||||
group => 'jenkins',
|
||||
mode => '0640',
|
||||
replace => false,
|
||||
require => File['/home/jenkins'],
|
||||
}
|
||||
file { '/home/jenkins/.bashrc':
|
||||
ensure => present,
|
||||
owner => 'jenkins',
|
||||
group => 'jenkins',
|
||||
mode => '0640',
|
||||
source => '/etc/skel/.bashrc',
|
||||
replace => false,
|
||||
require => File['/home/jenkins'],
|
||||
}
|
||||
|
||||
file { '/home/jenkins/.bash_logout':
|
||||
ensure => present,
|
||||
source => '/etc/skel/.bash_logout',
|
||||
owner => 'jenkins',
|
||||
group => 'jenkins',
|
||||
mode => '0640',
|
||||
replace => false,
|
||||
require => File['/home/jenkins'],
|
||||
}
|
||||
|
||||
file { '/home/jenkins/.profile':
|
||||
ensure => present,
|
||||
source => '/etc/skel/.profile',
|
||||
owner => 'jenkins',
|
||||
group => 'jenkins',
|
||||
mode => '0640',
|
||||
replace => false,
|
||||
require => File['/home/jenkins'],
|
||||
}
|
||||
|
||||
file { '/home/jenkins/.profile':
|
||||
ensure => present,
|
||||
source => '/etc/skel/.profile',
|
||||
owner => 'jenkins',
|
||||
group => 'jenkins',
|
||||
mode => '0640',
|
||||
replace => false,
|
||||
require => File['/home/jenkins'],
|
||||
}
|
||||
|
||||
file { '/home/jenkins/.ssh/config':
|
||||
|
Loading…
x
Reference in New Issue
Block a user