fuel-library/deployment/puppet/cobbler/manifests/packages.pp
Matthew Mosesohn 641e9e8f2a Add missing cobbler dependencies
Cobbler depends on a number of libs
and utilities to manage node
provisioning.

blueprint fuel-containerization-of-services

Change-Id: Ic438679c5247b72d14938885bb73c39d0dac283a
2014-04-16 17:21:23 +04:00

79 lines
2.2 KiB
Puppet

# Copyright 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
class cobbler::packages {
case $operatingsystem {
/(?i)(centos|redhat)/: {
$cobbler_package = "cobbler"
$cobbler_web_package = "cobbler-web"
$dnsmasq_package = "dnsmasq"
$cobbler_additional_packages = ["xinetd", "tftp-server", "syslinux", "wget", "python-ipaddr","fence-agents", "bind-utils"]
$django_package = "python-django"
$openssh_package = "openssh-clients"
$pexpect_package = "pexpect"
}
/(?i)(debian|ubuntu)/: {
$cobbler_package = "cobbler"
$cobbler_web_package = "cobbler-web"
$dnsmasq_package = "dnsmasq"
$cobbler_additional_packages = ["tftpd-hpa", "syslinux", "wget","python-ipaddr", "fence-agents", "dnsutils", "bind9-host"]
$django_package = "python-django"
$django_version = "1.3.1-4ubuntu1"
$openssh_package = "openssh-client"
$pexpect_package = "python-pexpect"
}
}
define cobbler_safe_package(){
if ! defined(Package[$name]){
@package { $name : }
}
}
cobbler_safe_package { $cobbler_additional_packages : }
package { $django_package :
ensure => present
}
package { $cobbler_package :
require => [
Package[$dnsmasq_package],
Package[$cobbler_additional_packages],
Package[$django_package],
],
}
package { $cobbler_web_package :
require => Package[$cobbler_package]
}
package { $dnsmasq_package:
ensure => installed
}
package { $openssh_package:
ensure => installed
}
package { $pexpect_package:
ensure => installed
}
Package<||>
}