Don't bail handling global args when `host.data.env` isn't a dictionary.
This was a bug introduced by the change to allow defining global arguments
as `host.data.X` variables. The upcoming move to prefix global arguments
with `_` will address this issue, this simply prevents it causing issues.
@@ -55,7 +55,11 @@ auth_kwargs = {
def generate_env(config, value):
env = config.ENV.copy()
- if value:
+ # TODO: this is to protect against host.data.env being a string or similar,
+ # the introduction of using host.data.X for operation kwargs combined with
+ # `env` being a commonly defined data variable causes issues.
+ # The real fix here is the prefixed `_env` argument.
+ if value and isinstance(value, dict):
env.update(value)
return env
