samdoran / ansible-role-gitlab

Ansible role for GitLab CE Omnibus
30 stars 21 forks source link

Order of apt operations on Debian #11

Closed tszym closed 7 years ago

tszym commented 7 years ago

Hi,

There is an issue when executing this role on Debian Jessie. I tested this on version 3.1.1 of this role.

The repo file is added to the system before the inclusion of the Debian specific tasks file and the apt tasks. At this point, the role will failt at the cache update of the apt task because the apt-transport-https package is not installed yet, and apt cannot use the previously added repo. It will be installed too late.

Ansible output:

TASK [samdoran.gitlab : DEBIAN | Install support packages] *********************
fatal: [debian]: FAILED! => {"changed": false, "failed": true, "msg": "Failed to update apt cache."}

On the host:

user@jessie:~$ sudo apt-get update
E: The method driver /usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed?

The issue is solved by installing the apt-transport-https package before calling this role.

samdoran commented 7 years ago

Thanks for bringing this to my attention. Looking into it now.

samdoran commented 7 years ago

Looks like setting update_cache: no on the Install support packages task is sufficient to fix this.