Puppet Class: pdns_server

Defined in:
modules/pdns_server/manifests/init.pp

Overview

Parameters:

  • dns_auth_ipaddress (Any)
  • dns_auth_soa_name (Any)
  • pdns_db_host (Any)
  • pdns_db_password (Any)
  • dns_auth_query_address (Any) (defaults to: '')


10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'modules/pdns_server/manifests/init.pp', line 10

class pdns_server(
    $dns_auth_ipaddress,
    $dns_auth_soa_name,
    $pdns_db_host,
    $pdns_db_password,
    $dns_auth_query_address = ''
) {

    package { [ 'pdns-server',
                'pdns-backend-mysql' ]:
        ensure => 'present',
    }

    file { '/etc/powerdns/pdns.conf':
        ensure  => 'present',
        owner   => 'root',
        group   => 'root',
        mode    => '0440',
        content => template('pdns_server/pdns.conf.erb'),
        require => Package['pdns-server'],
    }

    # Clean up any example configs that the pdns packages might have installed;
    #  We don't want them accidentally used or merged into our puppetized config.
    file { '/etc/powerdns/pdns.d/':
        ensure  => 'directory',
        purge   => true,
        recurse => true,
    }

    service { 'pdns':
        ensure     => 'running',
        require    => [ Package['pdns-server'],
                        File['/etc/powerdns/pdns.conf']
        ],
        subscribe  => File['/etc/powerdns/pdns.conf'],
        hasrestart => false,
    }
}