Closed brainwire closed 7 years ago
Hi, @UnderGreen ! By default I get one error:
I set options:
nginx_sites: "none" nginx_enabled_sites: "none" nginx_disabled_sites: "none"
But still get the error::
Ping!
I believe the root cause of this issue is actually addressed by my PR #90; the problem here is that the with_items
statement on the previous line L19 (and all other instances in the file) are being read by modern Ansible versions as a literal rather than a variable reference. So rather than evaluating []
, it's evaluating "nginx_sites"
. So then when L14 attempts to get the .server.name
property of the iteration var, it can't find it because it's iterating on a string.
So your fix here works for folks who provide 'none'
sites by ignoring the whole block, but covers up the real error on the previous line.
This was fixed in https://github.com/ANXS/nginx/pull/90 and has been merged.
Hi, Vadim.
Why you need to add when clause? By default
nginx_sites: []
and impossible to compare this value withnone
. And you don't need to compare it.