On Wed, 2019-10-16 at 10:50 +0200, Adrian Reber wrote:
{% if env == "staging" or inventory_hostname ==
"proxy14.fedoraproject.org" %}
Rather than inlining host names like this, why not use host vars to
define a boolean variable like "enable_cool_new_rust_mirrorlist". Then
you can make that true in staging, true on proxy 14, and false
everywhere else and make this if statement simpler and more "permanent"
(i.e., you don't to touch this or the other two places with similar
adjustments later when you want to add the other proxies.
I'm guilty of doing the above in my Ansible too, but recently I've been
thinking that it would be better to use the host and group vars
instead. And honestly this is pretty similar to what a lot of our
playbook does, so I am not opposed.
Anyways, I'm +1 to the change as-is, but would prefer a change that
uses vars over this one, if you are so inclined.