diff --git a/.travis.yml b/.travis.yml index 756ed4e..0ae6a8e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ python: "2.7" sudo: true # This playbook need to run on Ubuntu 14.04 or later -dist: trusty +dist: trust # Install ansible addons: @@ -23,13 +23,13 @@ install: # Create ansible.cfg with correct roles_path - printf '[defaults]\nroles_path=../' >ansible.cfg - + + # Install ansible-commons + - ansible-galaxy install lucascbeyeler.commons + script: # Basic role syntax check - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - # Run the role/playbook with ansible-playbook. - - "ansible-playbook -i tests/inventory tests/test.yml --connection=local --sudo" - notifications: webhooks: https://galaxy.ansible.com/api/v1/notifications/ diff --git a/meta/main.yml b/meta/main.yml index 6aa42bb..8b2fcdd 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -17,4 +17,5 @@ galaxy_info: galaxy_tags: - zimbra - monoserver -dependencies: [] +dependencies: + - { role: lucascbeyeler.commons } diff --git a/tasks/main.yml b/tasks/main.yml index 40f84e7..f4e991d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -10,7 +10,6 @@ # # Starting the install ################################### -- include: nodistro/hostname.yml - include: '{{ ansible_os_family }}/packages.yml' - include: nodistro/install-zimbra.yml - include: nodistro/install-spamassassin.yml diff --git a/tasks/nodistro/hostname.yml b/tasks/nodistro/hostname.yml deleted file mode 100644 index 0e8c368..0000000 --- a/tasks/nodistro/hostname.yml +++ /dev/null @@ -1,14 +0,0 @@ -# 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