Classes
resolv_conf
: Manage the /etc/resolv.conf file.
Rather then using a template, the file is edited in-place. This eliminates the need to maintain a template and means that only the items we are interested in managing are managed. This makes it possible to use this module to say set the search domain without necessarily setting the nameservers, which would be impossible if we insisted on managing the whole file.
Previous versions of this module would automatically setup google DNS. This is no longer the case.
include resolv_conf
resolve_conf::nameservers:
- "8.8.8.8"
- "8.8.4.4"
resolv_conf::options:
- "rotate"
- "timeout:2"
- "attempts:2"
resolv_conf::search: "megacorp.com"
The following parameters are available in the resolv_conf
class.
Data type: Optional[String]
Keyword prefix for search domains
Data type: Optional[String]
Search domain
Default value: undef
Data type: Optional[Array[String]]
Array of options
Default value: []
Data type: Optional[Array[String]]
Array of nameservers
Default value: []
Data type: String
Path to /etc/resolve.conf
Default value: "/etc/resolv.conf"
Data type: String
Owner for /etc/resolv.conf
Default value: "root"
Data type: Integer
Group for /etc/resolv.conf
Default value: 0
Data type: String
Mode for /etc/resolv.conf
Default value: "0644"
Data type: String
Header to insert into /etc/resolv.conf
Default value: "# managed by puppet"