This module setups resolv.conf
Configures /etc/resolv.conf (resolv.conf.d on Ubuntu)
Optional Modules to disable immutable bit on resolv.conf:
- eyp/chattr
- Modifies /etc/resolv.conf
- This can module can break name resolution, consider yourself warned if something goes wrong
To setup resolv.conf to itself:
class { 'resolvconf':
resolvers => [ '127.0.0.1' ],
domain => 'systemadmin.es',
rotate => false,
}
To setup resolv with a given list of resolver, alternating queries:
class { 'resolvconf':
resolvers => [ '8.8.8.8', '8.8.4.4' ],
domain => 'systemadmin.es',
rotate => true,
}
To setup resolv with a given list of resolver, alternating queries:
class { 'resolvconf':
resolvers => [ '64.123.456.78' ],
domain => 'example.es',
searchlist => [ 'searchexample.es', 'company.es' ],
rotate => true,
timeout => 10,
attempts => 2,
ignoreifconf => false,
disableimmutable => false,
}
- resolvers: array that defines the entries to add.
- domain: string that defines the domain of the entries.
- searchlist: array than defines the names that resolve the entry.
- rotate: if true sets the option rotate.
- timeout: sets the time before a timeout.
- attempts: sets the numbers of attempts.
- ignoreifconf: if set to true ignores dhcp pushed configuration. Only works in systems with resolv.conf.d.
- disableimmutable: disable the immutable bit to /etc/resolv.conf. eyp-chattr required if set to true (not an actual dependency)
Facter:
- eyp_resolvconf_maxns, to get MAXNS value we need /usr/include/resolv.h to be present. If /usr/include/resolv.h isn't installed before the first execution it will be ignored, however during the first execution it will be installed so for later executions to be present
Tested on:
- Redhat and derivatives: 5, 6 and 7 releases.
- Ubuntu: 14.04
- Ubuntu: 16.04
- SLES 11 SP3
We are pushing to have acceptance testing in place, so any new feature should have some test to check both presence and absence of any feature
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request