Manage Resolvconf service
This commit is contained in:
parent
b2368da3f0
commit
f86967ff8d
|
@ -3,6 +3,7 @@
|
|||
### Enhancements
|
||||
* Allow to install Resolvconf.
|
||||
* Manage Resolvconf base configuration file.
|
||||
* Restart Resolvconf service if any modification on configuration file.
|
||||
|
||||
## v1.0.3
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ Manage some basics configuration for IPR's servers.
|
|||
* **basics__resolvconf_packages** : List of Resolvconf packages to install [default : `resolvconf`].
|
||||
* **basics__resolvconf_enabled** : Enable or disable support for Resolvconf [default : `False`].
|
||||
* **basics__resolvconf_domains** : List of domains used as search suffixes with Resolvconf [default : `{{ ansible_domain }}`].
|
||||
* **basics__resolvconf_service_name** : The Resolvconf service name to manage [default : `resolvconf`].
|
||||
|
||||
## Example Playbook
|
||||
|
||||
|
@ -63,6 +64,7 @@ For LXC containers, you also have the possibility to disable the management of s
|
|||
|
||||
* If specified, Resolvconf is installed to fix the domain's informations given by the DHCP server.
|
||||
* Configure a default configuration file with the given informations (list of domains) and system informations (list of nameserver).
|
||||
* Ensure to restart the service if any modification in configuration file.
|
||||
|
||||
## Development
|
||||
|
||||
|
|
|
@ -44,5 +44,11 @@ basics__resolvconf_domains:
|
|||
- '{{ ansible_domain }}'
|
||||
|
||||
# ]]]
|
||||
# .. envvar:: basics__resolvconf_service_name [[[
|
||||
#
|
||||
# The Resolvconf service name to manage.
|
||||
basics__resolvconf_service_name: 'resolvconf'
|
||||
|
||||
# ]]]
|
||||
|
||||
# ]]]
|
||||
|
|
|
@ -1,2 +1,7 @@
|
|||
---
|
||||
# handlers file for basics
|
||||
- name: restart resolvconf service
|
||||
service:
|
||||
name: '{{ basics__resolvconf_service_name }}'
|
||||
state: '{{ "restarted" if (basics__resolvconf_enabled | bool) }}'
|
||||
enabled: '{{ basics__resolvconf_enabled | bool }}'
|
||||
|
|
|
@ -65,4 +65,4 @@
|
|||
group: root
|
||||
mode: '0644'
|
||||
when: basics__resolvconf_enabled|bool
|
||||
|
||||
notify: ['restart resolvconf service']
|
||||
|
|
Reference in New Issue