File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -534,10 +534,17 @@ def conf_passenv() -> list[str]:
534
534
def conf_setenv (env_conf : EnvConfigSet ) -> str :
535
535
"""Build the set environment variables for the tox environment.
536
536
537
+ ansible 2.9 did not support the ANSIBLE_COLLECTION_PATH environment variable
538
+ ansible 2.16 has it marked for deprecation in 2.19
539
+
537
540
:param env_conf: The environment configuration.
538
541
:return: The set environment variables.
539
542
"""
543
+ if env_conf .name .endswith ("2.9" ):
544
+ envvar_name = "ANSIBLE_COLLECTIONS_PATHS"
545
+ else :
546
+ envvar_name = "ANSIBLE_COLLECTIONS_PATH"
540
547
envtmpdir = env_conf ["envtmpdir" ]
541
548
setenv = []
542
- setenv .append (f"ANSIBLE_COLLECTIONS_PATH ={ envtmpdir } /collections/" )
549
+ setenv .append (f"{ envvar_name } ={ envtmpdir } /collections/" )
543
550
return "\n " .join (setenv )
You can’t perform that action at this time.
0 commit comments