Puppet Class: yp::serv

Inherits:
yp::params
Defined in:
manifests/serv.pp

Overview

Class for installing and managing ypserv daemon.

Examples:

Create a master YP server with two additional slaves

include ::portmap

class { '::yp':
  domain => 'example.com',
}

class { '::yp::serv':
  domain => 'example.com',
  maps   => [
    'passwd.byname',
    'passwd.byuid',
    'group.bygid',
    'group.byname',
    'netid.byname',
  ],
  slaves => [
    '192.0.2.2',
    '192.0.2.3',
  ],
}

Class['::portmap'] ~> Class['::yp::serv'] <- Class['::yp']

Create a slave YP server pointing at the above master YP server

include ::portmap

class { '::yp':
  domain => 'example.com',
}

class { '::yp::serv':
  domain => 'example.com',
  maps   => [
    'passwd.byname',
    'passwd.byuid',
    'group.bygid',
    'group.byname',
    'netid.byname',
  ],
  master => '192.0.2.1',
}

class { '::yp::bind':
  domain => 'example.com',
}

Class['::portmap'] ~> Class['::yp::serv'] <- Class['::yp']
Class['::yp::serv'] ~> Class['::yp::bind'] <- Class['::yp']

Parameters:

  • domain (String)

    The YP/NIS domain.

  • has_yppasswdd (Boolean) (defaults to: $::yp::params::serv_has_yppasswdd)

    Does this platform provide yppasswdd daemon for changing passwords.

  • has_ypxfrd (Boolean) (defaults to: $::yp::params::serv_has_ypxfrd)

    Does this platform provide a ypxfrd daemon to help map transfers.

  • manage_package (Boolean) (defaults to: $::yp::params::serv_manage_package)

    Whether to manage a package or not. Some operating systems have ypserv as part of the base system.

  • maps (Array[String, 1]) (defaults to: $::yp::params::serv_maps)

    The YP maps to build. The default is build all supported maps which often includes some esoteric ones.

  • map_extension (Optional[String]) (defaults to: $::yp::params::serv_map_extension)

    The file extension added to compiled maps, often .db.

  • master (Optional[Stdlib::IP::Address::NoSubnet]) (defaults to: undef)

    If this is a slave YP server, the IP address of the master.

  • merge_group (Boolean) (defaults to: $::yp::params::serv_merge_group)

    Whether to merge group passwords into the group maps.

  • merge_passwd (Boolean) (defaults to: $::yp::params::serv_merge_passwd)

    Whether to merge user passwords into the passwd maps, on some platforms this allows a separate shadow.byname map to be created.

  • minimum_gid (Integer[0]) (defaults to: $::yp::params::serv_minimum_gid)

    Any GID lower than this will not be included in the group maps.

  • minimum_uid (Integer[0]) (defaults to: $::yp::params::serv_minimum_uid)

    Any UID lower than this will not be included in the passwd maps.

  • package_name (Optional[String]) (defaults to: $::yp::params::serv_package_name)

    The name of the package to install that provides the ypserv daemon.

  • service_enable (Boolean) (defaults to: $::yp::params::serv_service_enable)
  • service_ensure (Enum['running', 'stopped']) (defaults to: $::yp::params::serv_service_ensure)
  • yppasswdd_service_name (Optional[String]) (defaults to: $::yp::params::serv_yppasswdd_service_name)

    The name of the service managing yppasswdd.

  • ypserv_service_name (String) (defaults to: $::yp::params::serv_ypserv_service_name)

    The name of the service managing ypserv.

  • ypxfrd_service_name (Optional[String]) (defaults to: $::yp::params::serv_ypxfrd_service_name)

    The name of the service managing ypxfrd.

  • slaves (Optional[Array[Stdlib::IP::Address::NoSubnet, 1]]) (defaults to: undef)

    If this is a master YP server, specify the slaves which will be notified when a map is updated.

  • yp_dir (Stdlib::Absolutepath) (defaults to: $::yp::params::yp_dir)

    The base YP directory, usually /var/yp.

See Also:



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'manifests/serv.pp', line 85

class yp::serv (
  String                                            $domain,
  Boolean                                           $has_yppasswdd          = $::yp::params::serv_has_yppasswdd,
  Boolean                                           $has_ypxfrd             = $::yp::params::serv_has_ypxfrd,
  Boolean                                           $manage_package         = $::yp::params::serv_manage_package,
  Array[String, 1]                                  $maps                   = $::yp::params::serv_maps,
  Optional[String]                                  $map_extension          = $::yp::params::serv_map_extension,
  Optional[Stdlib::IP::Address::NoSubnet]           $master                 = undef,
  Boolean                                           $merge_group            = $::yp::params::serv_merge_group,
  Boolean                                           $merge_passwd           = $::yp::params::serv_merge_passwd,
  Integer[0]                                        $minimum_gid            = $::yp::params::serv_minimum_gid,
  Integer[0]                                        $minimum_uid            = $::yp::params::serv_minimum_uid,
  Optional[String]                                  $package_name           = $::yp::params::serv_package_name,
  Boolean                                           $service_enable         = $::yp::params::serv_service_enable,
  Enum['running', 'stopped']                        $service_ensure         = $::yp::params::serv_service_ensure,
  Optional[String]                                  $yppasswdd_service_name = $::yp::params::serv_yppasswdd_service_name,
  String                                            $ypserv_service_name    = $::yp::params::serv_ypserv_service_name,
  Optional[String]                                  $ypxfrd_service_name    = $::yp::params::serv_ypxfrd_service_name,
  Optional[Array[Stdlib::IP::Address::NoSubnet, 1]] $slaves                 = undef,
  Stdlib::Absolutepath                              $yp_dir                 = $::yp::params::yp_dir,
) inherits yp::params {

  if defined(Class['yp::ldap']) {
    fail('yp::ldap and yp::serv are mutually exclusive.')
  }

  contain yp::serv::install
  contain yp::serv::config
  contain yp::serv::service

  Class['yp::serv::install'] -> Class['yp::serv::config']
    ~> Class['yp::serv::service']
}