- Added DNS auto-configuration
- Tests on Ubuntu 14.04
This commit is contained in:
parent
7d058d7dbb
commit
44bece4b1d
@ -9,7 +9,7 @@ Requirements
|
||||
* CentOS 6, 7
|
||||
* RHEL 6, 7
|
||||
* Ubuntu 14.04
|
||||
* Correctly configure DNS
|
||||
* Correctly configure DNS : now auto-configured using dnsmasq
|
||||
* Correctly configued `/etc/hosts` file : now auto-configured by this ansible role
|
||||
|
||||
Role Variables
|
||||
@ -94,3 +94,5 @@ Author Information
|
||||
------------------
|
||||
|
||||
Based on ansible-zimbradev by pbruna
|
||||
|
||||
Modified by paulbsd
|
||||
|
@ -2,4 +2,7 @@
|
||||
# handlers file for cartertdte.mta
|
||||
|
||||
- name: postfix restart
|
||||
service: name=postfix state=restarted
|
||||
service: name=postfix state=restarted
|
||||
|
||||
- name: dnsmasq restart
|
||||
service: name=dnsmasq state=restarted
|
||||
|
@ -21,13 +21,38 @@
|
||||
src=hosts.j2
|
||||
dest=/etc/hosts
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
notify:
|
||||
- dnsmasq restart
|
||||
|
||||
- name: Disable and stop dnsmasq service
|
||||
- name: Set resolv.conf file
|
||||
template:
|
||||
src=resolv.conf.j2
|
||||
dest=/etc/resolv.conf
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
notify:
|
||||
- dnsmasq restart
|
||||
|
||||
- name: Resolv self hostname via dnsmasq
|
||||
template:
|
||||
src=hostname.dnsmasq.j2
|
||||
dest=/etc/dnsmasq.d/{{ ansible_hostname }}
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
notify:
|
||||
- dnsmasq restart
|
||||
|
||||
- name: Enable dnsmasq service
|
||||
service:
|
||||
name=dnsmasq
|
||||
state=stopped
|
||||
enabled=no
|
||||
enabled=yes
|
||||
|
||||
- name: Ensure handlers run now
|
||||
meta: flush_handlers
|
||||
|
||||
- name: Create Source Software Directory
|
||||
file: path=/opt/src state=directory
|
||||
@ -56,5 +81,6 @@
|
||||
|
||||
- name: Start zimbra
|
||||
service: name=zimbra state=restarted
|
||||
ignore_errors: yes
|
||||
|
||||
- include: provision_zimbra.yml
|
||||
|
1
templates/hostname.dnsmasq.j2
Normal file
1
templates/hostname.dnsmasq.j2
Normal file
@ -0,0 +1 @@
|
||||
address=/{{ zimbra_hostname }}.{{ zimbra_default_domain }}/{{ ansible_eth0.ipv4.address }}
|
@ -1,2 +1,2 @@
|
||||
search localdomain ffx.net
|
||||
search localdomain {{ zimbra_default_domain }}
|
||||
nameserver 127.0.0.1
|
||||
|
@ -10,9 +10,11 @@ zimbra_required_packages:
|
||||
- unzip
|
||||
- perl
|
||||
- libperl5.18
|
||||
- netcat-openbsd
|
||||
- pax
|
||||
- sysstat
|
||||
- sqlite3
|
||||
- resolvconf
|
||||
- dnsmasq
|
||||
- dnsutils
|
||||
- wget
|
||||
|
Loading…
Reference in New Issue
Block a user