Puppet Class: dhcp::disable

Inherits:
dhcp::params
Defined in:
manifests/disable.pp

Summary

Remove and Disable the DHCP server

Overview

Parameters:

  • packagename (String[1]) (defaults to: $dhcp::params::packagename)
  • servicename (String[1]) (defaults to: $dhcp::params::servicename)


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'manifests/disable.pp', line 2

class dhcp::disable (
  String[1] $packagename = $dhcp::params::packagename,
  String[1] $servicename = $dhcp::params::servicename,
) inherits dhcp::params {
  package { $packagename:
    ensure => absent,
  }

  service { $servicename:
    ensure    => stopped,
    enable    => false,
    hasstatus => true,
    require   => Package[$packagename],
  }
}