Make oscc_file_contents optional
The openstack infra team is moving the managmeent of clouds.yaml files from puppet to ansible. To keep puppet and ansible from fighting with each other over the contents of this file make the contents optional here. If provided puppet will manage them otherwise puppet doesn't touch the clouds.yaml file. Change-Id: I037abf2fb64a63af160ea6e25ce300197f7f513f
This commit is contained in:
parent
173d2cf49d
commit
f5ac2b3944
@ -16,7 +16,7 @@
|
||||
# == Class: openstackci::nodepool_builder
|
||||
#
|
||||
class openstackci::nodepool_builder (
|
||||
$oscc_file_contents,
|
||||
$oscc_file_contents = undef,
|
||||
$mysql_root_password = '',
|
||||
$mysql_password = '',
|
||||
$nodepool_ssh_public_key = undef,
|
||||
@ -114,16 +114,18 @@ class openstackci::nodepool_builder (
|
||||
],
|
||||
}
|
||||
|
||||
file { '/home/nodepool/.config/openstack/clouds.yaml':
|
||||
ensure => present,
|
||||
owner => 'nodepool',
|
||||
group => 'nodepool',
|
||||
mode => '0400',
|
||||
content => $oscc_file_contents,
|
||||
require => [
|
||||
File['/home/nodepool/.config/openstack'],
|
||||
User['nodepool'],
|
||||
],
|
||||
if $oscc_file_contents {
|
||||
file { '/home/nodepool/.config/openstack/clouds.yaml':
|
||||
ensure => present,
|
||||
owner => 'nodepool',
|
||||
group => 'nodepool',
|
||||
mode => '0400',
|
||||
content => $oscc_file_contents,
|
||||
require => [
|
||||
File['/home/nodepool/.config/openstack'],
|
||||
User['nodepool'],
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
# == Class: openstackci::nodepool_launcher
|
||||
#
|
||||
class openstackci::nodepool_launcher (
|
||||
$oscc_file_contents,
|
||||
$oscc_file_contents = undef,
|
||||
$nodepool_ssh_private_key = undef,
|
||||
$mysql_root_password = '',
|
||||
$mysql_password = '',
|
||||
@ -90,15 +90,17 @@ class openstackci::nodepool_launcher (
|
||||
],
|
||||
}
|
||||
|
||||
file { '/home/nodepool/.config/openstack/clouds.yaml':
|
||||
ensure => present,
|
||||
owner => 'nodepool',
|
||||
group => 'nodepool',
|
||||
mode => '0400',
|
||||
content => $oscc_file_contents,
|
||||
require => [
|
||||
File['/home/nodepool/.config/openstack'],
|
||||
User['nodepool'],
|
||||
],
|
||||
if $oscc_file_contents {
|
||||
file { '/home/nodepool/.config/openstack/clouds.yaml':
|
||||
ensure => present,
|
||||
owner => 'nodepool',
|
||||
group => 'nodepool',
|
||||
mode => '0400',
|
||||
content => $oscc_file_contents,
|
||||
require => [
|
||||
File['/home/nodepool/.config/openstack'],
|
||||
User['nodepool'],
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user