File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,3 @@ def ansible_version(version: str = "") -> Version:
162
162
)
163
163
sys .exit (ANSIBLE_MISSING_RC )
164
164
return Version (version )
165
-
166
-
167
- if ansible_collections_path () in os .environ :
168
- collection_list = os .environ [ansible_collections_path ()].split (":" )
Original file line number Diff line number Diff line change 13
13
import tenacity
14
14
from packaging import version
15
15
16
- from ansiblelint .config import (
17
- ansible_collections_path ,
18
- collection_list ,
19
- options ,
20
- parse_ansible_version ,
21
- )
16
+ from ansiblelint .config import ansible_collections_path , options , parse_ansible_version
22
17
from ansiblelint .constants import (
23
18
ANSIBLE_DEFAULT_ROLES_PATH ,
24
19
ANSIBLE_MIN_VERSION ,
@@ -309,6 +304,10 @@ def _prepare_ansible_paths() -> None:
309
304
"""Configure Ansible environment variables."""
310
305
library_paths : List [str ] = []
311
306
roles_path : List [str ] = []
307
+ collection_list : List [str ] = []
308
+
309
+ if ansible_collections_path () in os .environ :
310
+ collection_list = os .environ [ansible_collections_path ()].split (":" )
312
311
313
312
for path_list , path in (
314
313
(library_paths , "plugins/modules" ),
You can’t perform that action at this time.
0 commit comments