mirror of
https://github.com/lucascbeyeler/zimbra
synced 2026-09-30 03:41:47 +02:00
Updating the playbook to edit the hostname
This commit is contained in:
@@ -24,12 +24,6 @@ install:
|
||||
# Create ansible.cfg with correct roles_path
|
||||
- printf '[defaults]\nroles_path=../' >ansible.cfg
|
||||
|
||||
# Include the domain inside the /etc/hosts
|
||||
- printf '127.0.0.1 localhost.localdomain localhost' > /etc/hosts
|
||||
|
||||
# Change the hostname
|
||||
- hostnamectl set-hostname 'localhost.localdomain'
|
||||
|
||||
script:
|
||||
# Basic role syntax check
|
||||
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#
|
||||
# Starting the install
|
||||
###################################
|
||||
- include: nodistro/hostname.yml
|
||||
- include: '{{ ansible_os_family }}/packages.yml'
|
||||
- include: nodistro/install-zimbra.yml
|
||||
- include: nodistro/install-spamassassin.yml
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# Change the hostname and ensure the /etc/hosts has the hostname linked to the
|
||||
# localhost. This is very important for some services, like Zimbra, who will
|
||||
# check for the LDAP Server's IP.
|
||||
|
||||
- name: Correct the machine's hostname to {{ hostname }}
|
||||
hostname: name='{{ hostname }}.{{ domain }}'
|
||||
|
||||
- name: Changing the host's file for the template
|
||||
template:
|
||||
src: hosts.j2
|
||||
dest: /etc/hosts
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
@@ -0,0 +1,3 @@
|
||||
::1 localhost.localdomain localhost
|
||||
127.0.0.1 localhost.localdomain localhost
|
||||
127.0.0.1 {{ hostname }}.{{ domain }} {{ hostname }}
|
||||
Reference in New Issue
Block a user