Refactor osnailyfacter/modular/tools

Refactor osnailyfacter/modular/tools to be compatible with Puppet Master

Blueprint: fuel-refactor-osnailyfacter-for-puppet-master-compatibility

Change-Id: I1836d35134dc56a4e1bf3e43f453e589c11a5bfa
This commit is contained in:
Alexander Noskov 2016-03-09 16:15:36 +03:00
parent fc2878419c
commit b0c89aa6c6
2 changed files with 67 additions and 62 deletions

View File

@ -0,0 +1,66 @@
class osnailyfacter::tools::tools {
notice('MODULAR: tools/tools.pp')
$custom_acct_file = hiera('custom_accounting_file', undef)
class { '::osnailyfacter::atop':
custom_acct_file => $custom_acct_file,
}
class { '::osnailyfacter::ssh': }
if $::virtual != 'physical' {
class { '::osnailyfacter::acpid': }
}
$tools = [
'screen',
'tmux',
'htop',
'tcpdump',
'strace',
'fuel-misc',
'man-db',
]
$cloud_init_services = [
'cloud-config',
'cloud-final',
'cloud-init',
'cloud-init-container',
'cloud-init-local',
'cloud-init-nonet',
'cloud-log-shutdown',
]
if ($::operatingsystem == 'Ubuntu') {
service { $cloud_init_services:
enable => false,
}
}
package { $tools :
ensure => 'present',
}
package { 'cloud-init':
ensure => 'absent',
}
if $::osfamily == 'Debian' {
apt::conf { 'notranslations':
ensure => 'present',
content => 'Acquire::Languages "none";',
notify_update => false,
}
}
$puppet = hiera('puppet')
class { '::osnailyfacter::puppet_pull':
modules_source => $puppet['modules'],
manifests_source => $puppet['manifests'],
}
$deployment_mode = hiera('deployment_mode')
}

View File

@ -1,62 +1 @@
notice('MODULAR: tools.pp')
$custom_acct_file = hiera('custom_accounting_file', undef)
class { 'osnailyfacter::atop':
custom_acct_file => $custom_acct_file,
}
class { 'osnailyfacter::ssh': }
if $::virtual != 'physical' {
class { 'osnailyfacter::acpid': }
}
$tools = [
'screen',
'tmux',
'htop',
'tcpdump',
'strace',
'fuel-misc',
'man-db',
]
$cloud_init_services = [
'cloud-config',
'cloud-final',
'cloud-init',
'cloud-init-container',
'cloud-init-local',
'cloud-init-nonet',
'cloud-log-shutdown',
]
if ($::operatingsystem == 'Ubuntu') {
service { $cloud_init_services:
enable => false,
}
}
package { $tools :
ensure => 'present',
}
package { 'cloud-init':
ensure => 'absent',
}
if $::osfamily == 'Debian' {
apt::conf { 'notranslations':
ensure => 'present',
content => 'Acquire::Languages "none";',
notify_update => false,
}
}
$puppet = hiera('puppet')
class { 'osnailyfacter::puppet_pull':
modules_source => $puppet['modules'],
manifests_source => $puppet['manifests'],
}
$deployment_mode = hiera('deployment_mode')
include ::osnailyfacter::tools::tools