- 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
|
* CentOS 6, 7
|
||||||
* RHEL 6, 7
|
* RHEL 6, 7
|
||||||
* Ubuntu 14.04
|
* 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
|
* Correctly configued `/etc/hosts` file : now auto-configured by this ansible role
|
||||||
|
|
||||||
Role Variables
|
Role Variables
|
||||||
@ -94,3 +94,5 @@ Author Information
|
|||||||
------------------
|
------------------
|
||||||
|
|
||||||
Based on ansible-zimbradev by pbruna
|
Based on ansible-zimbradev by pbruna
|
||||||
|
|
||||||
|
Modified by paulbsd
|
||||||
|
@ -3,3 +3,6 @@
|
|||||||
|
|
||||||
- name: postfix restart
|
- 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
|
src=hosts.j2
|
||||||
dest=/etc/hosts
|
dest=/etc/hosts
|
||||||
owner=root
|
owner=root
|
||||||
|
group=root
|
||||||
mode=0644
|
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:
|
service:
|
||||||
name=dnsmasq
|
name=dnsmasq
|
||||||
state=stopped
|
enabled=yes
|
||||||
enabled=no
|
|
||||||
|
- name: Ensure handlers run now
|
||||||
|
meta: flush_handlers
|
||||||
|
|
||||||
- name: Create Source Software Directory
|
- name: Create Source Software Directory
|
||||||
file: path=/opt/src state=directory
|
file: path=/opt/src state=directory
|
||||||
@ -56,5 +81,6 @@
|
|||||||
|
|
||||||
- name: Start zimbra
|
- name: Start zimbra
|
||||||
service: name=zimbra state=restarted
|
service: name=zimbra state=restarted
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
- include: provision_zimbra.yml
|
- 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
|
nameserver 127.0.0.1
|
||||||
|
@ -10,9 +10,11 @@ zimbra_required_packages:
|
|||||||
- unzip
|
- unzip
|
||||||
- perl
|
- perl
|
||||||
- libperl5.18
|
- libperl5.18
|
||||||
|
- netcat-openbsd
|
||||||
- pax
|
- pax
|
||||||
- sysstat
|
- sysstat
|
||||||
- sqlite3
|
- sqlite3
|
||||||
- resolvconf
|
- resolvconf
|
||||||
- dnsmasq
|
- dnsmasq
|
||||||
|
- dnsutils
|
||||||
- wget
|
- wget
|
||||||
|
Loading…
Reference in New Issue
Block a user