From 56e73da07b8e5d4428f9867ec4bc5bacc03e2764 Mon Sep 17 00:00:00 2001 From: Lucas Costa Beyeler Date: Fri, 3 Feb 2017 23:58:42 -0200 Subject: [PATCH] Reverting branch to the original - Travis CI can't test the playbook entirelly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I can't validate the install process because the error: "mkdir: cannot create directory ‘/opt/zimbra/.pyenv’: Permission denied\nmkdir: cannot create directory ‘/opt/zimbra/.pyenv’: --- .travis.yml | 10 +++++----- meta/main.yml | 3 ++- tasks/main.yml | 1 - tasks/nodistro/hostname.yml | 14 -------------- 4 files changed, 7 insertions(+), 21 deletions(-) delete mode 100644 tasks/nodistro/hostname.yml 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