ansible-role-nginx icon indicating copy to clipboard operation
ansible-role-nginx copied to clipboard

update package manager before installing nginx

Open vjpr opened this issue 9 years ago • 5 comments
trafficstars

This role didn't work out of the box for me because I needed to run sudo apt-get update.

Should this be incorporated in this role, or should it be in my playbook?

vjpr avatar Jan 08 '16 21:01 vjpr

What is your distribution ? ( Debian, Ubuntu or other Debian Derivate ) What's the last time you made an "apt-get update" in your system ? (if it's old, it's not the role of this role to update that for you, it's more in your playbook or an apt role to do that) If it's recently, the problem was encounted with nginx_official_repo activated ?

FYI this role is automatically runned in a fresh ubuntu VM by travis at each commit.

jdauphant avatar Jan 09 '16 00:01 jdauphant

It was a fresh Ubuntu 14.14 on amazon ec2. On Fri, 8 Jan 2016 at 7:02 PM, Julien DAUPHANT [email protected] wrote:

What is your distribution ? ( Debian, Ubuntu or other Debian Derivate ) What's the last time you made an "apt-get update" in your system ? (if it's old, it's not the role of this role to update that for you, it's more in your playbook or an apt role to do that) If it's recently, the problem was encounted with nginx_official_repo activated ?

FYI this role is automatically runned in a fresh ubuntu VM by travis at each commit.

— Reply to this email directly or view it on GitHub https://github.com/jdauphant/ansible-role-nginx/issues/86#issuecomment-170160934 .

vjpr avatar Jan 09 '16 00:01 vjpr

Can you install other apps or it only fail with nginx ? In the first case, you should add "sudo apt-get update" in the playbook (or made it with an another role)

jdauphant avatar Jan 09 '16 01:01 jdauphant

If you have ansible >= 1.9 you can use update_cache=yes in the tasks installing the packages, maybe It could be a good idea to have a release for versions later than 1.9, where this problem is trivial to solve.

javaguirre avatar Feb 07 '16 17:02 javaguirre

+1 I also just had this problem on a fresh AWS Ubuntu 14.04 box.

skolsuper avatar Jun 01 '16 10:06 skolsuper