Updating the playbook to edit the hostname

This commit is contained in:
Lucas Costa Beyeler
2017-02-03 23:42:15 -02:00
parent cf74da8404
commit f996ae57b8
4 changed files with 18 additions and 6 deletions
+1
View File
@@ -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
+14
View File
@@ -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