added hiera data for nameservers and configured resolv profile
This commit is contained in:
parent
bd5a987e92
commit
1d55cd96ce
@ -1,3 +1,8 @@
|
|||||||
---
|
---
|
||||||
message: "This node is using common data"
|
message: "This node is using common data"
|
||||||
profiles::base::dns::nameservers: 8.8.8.8
|
|
||||||
|
profile::base::resolv: true
|
||||||
|
profile::base::resolv::nameservers:
|
||||||
|
- '8.8.8.8'
|
||||||
|
- '127.0.0.1'
|
||||||
|
profile::base::resolv::domainname: home
|
||||||
|
@ -4,7 +4,7 @@ class profile::base (
|
|||||||
Boolean $ntp = false,
|
Boolean $ntp = false,
|
||||||
Boolean $puppet = false,
|
Boolean $puppet = false,
|
||||||
Boolean $repos = false,
|
Boolean $repos = false,
|
||||||
Boolean $resolver = false,
|
Boolean $resolv = false,
|
||||||
Boolean $ssh = true,
|
Boolean $ssh = true,
|
||||||
Boolean $selinux = true,
|
Boolean $selinux = true,
|
||||||
Boolean $motd = true,
|
Boolean $motd = true,
|
||||||
@ -27,8 +27,8 @@ class profile::base (
|
|||||||
if $repos {
|
if $repos {
|
||||||
class { '::profile::base::repositories': }
|
class { '::profile::base::repositories': }
|
||||||
}
|
}
|
||||||
if $resolver {
|
if $resolv {
|
||||||
class { '::profile::base::resolver': }
|
class { '::profile::base::resolv': }
|
||||||
}
|
}
|
||||||
if $ssh {
|
if $ssh {
|
||||||
class { '::profile::base::ssh': }
|
class { '::profile::base::ssh': }
|
||||||
|
17
site-modules/profile/manifests/base/resolv.pp
Normal file
17
site-modules/profile/manifests/base/resolv.pp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# This class can be used to configure resolv.conf.
|
||||||
|
#
|
||||||
|
# @example when declaring the resolver class
|
||||||
|
# class { '::profiles::base::resolv': }
|
||||||
|
#
|
||||||
|
class profile::base::resolv (
|
||||||
|
Optional[String] $domainname = undef,
|
||||||
|
Array[String] $nameservers = [],
|
||||||
|
Optional[String] $searchpath = undef,
|
||||||
|
) {
|
||||||
|
|
||||||
|
class { '::resolv_conf':
|
||||||
|
domainname => $domainname,
|
||||||
|
nameservers => $nameservers,
|
||||||
|
searchpath => $searchpath,
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user