Closed leventyalcin closed 8 years ago
I haven't tested with Ansible 1.9.x or 2.x with the included vars files—but I believe variable precedence would make it difficult to override the package name in an upstream playbook... or have you tested and found otherwise? In the past, I've done things like this: https://github.com/geerlingguy/ansible-role-php/blob/master/vars/Debian.yml#L14 / https://github.com/geerlingguy/ansible-role-php/blob/master/tasks/main.yml#L13
You're right. I only run the role but didn't check the version of redis. It was the wrong one. Now, It's working as expected.
Ping
@leventyalcin I did a fork to achieve pretty much the same thing, but for the repo name (we used custom name for repos). Not sure if @geerlingguy is maintaining this still, but could I suggest you adding a var for redis_yum_repo
or something? Thanks.
Hi @seeafish,
It could be nice but I'm not sure if @geerlingguy wants to add that.
To me, I'd like to keep repositories at the same place and I'm usually managing repositories something like https://github.com/AerisCloud/ansible-repos It makes easy to understand what repositories you're using and I think it's a bit more flexible when you're trying to set priority between repositories.
Thanks,
Hi @leventyalcin.
The issue I have is that this playbook does enablerepo=epel
when it installs the package, but the particular servers I use might have custom-name-epel
, which requires me to customise the repo name in the playbook.
Bit of an edge case I know, but I think it's good to use vars regardless.
I'll work off my fork.
Hi @seeafish,
I think it's good to have that flexibility, though.
I can suggest using yum-plugin-priorities If you're using any role to manage repositories and if it is not causing any conflict/problem (installing any other package etc).
Almost ready to merge this, thanks for your work on this!
This make easier to set up redis from external repositories such as IUS etc.