File tree Expand file tree Collapse file tree 6 files changed +12
-5
lines changed
src/ansible_dev_environment Expand file tree Collapse file tree 6 files changed +12
-5
lines changed Original file line number Diff line number Diff line change
1
+ # !/bin/bash
2
+ # PWD is supposed to be the directory container the .envrc file based on the
3
+ # specs. This trick should isolate our testing from user environment.
4
+ ANSIBLE_HOME = $PWD /.ansible
5
+ ANSIBLE_CONFIG = $PWD /ansible.cfg
Original file line number Diff line number Diff line change @@ -120,7 +120,6 @@ celerybeat.pid
120
120
* .sage.py
121
121
122
122
# Environments
123
- .env
124
123
.venv
125
124
env /
126
125
venv /
@@ -170,3 +169,4 @@ cython_debug/
170
169
171
170
.DS_Store
172
171
_readthedocs /
172
+ .ansible
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ [defaults]
2
+ # isolate project testing from user local setup
3
+ collections_path = .
Original file line number Diff line number Diff line change @@ -109,11 +109,11 @@ def ensure_isolated(self) -> None:
109
109
self .output .hint (hint )
110
110
errored = True
111
111
112
- home_coll = Path . home () / " .ansible/ collections/ansible_collections"
112
+ home_coll = Path ( os . environ . get ( "ANSIBLE_HOME" , "~/ .ansible" )). expanduser () / " collections/ansible_collections"
113
113
if home_coll .exists () and tuple (home_coll .iterdir ()):
114
114
err = f"Collections found in { home_coll } "
115
115
self .output .error (err )
116
- hint = "Run `rm -rf ~/.ansible/collections ` to remove them."
116
+ hint = f "Run `rm -rf { home_coll } ` to remove them or configure ANSIBLE_HOME to point to a different location ."
117
117
self .output .hint (hint )
118
118
errored = True
119
119
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ package = editable
18
18
extras =
19
19
test
20
20
pass_env =
21
+ ANSIBLE_*
21
22
CI
22
23
CONTAINER_*
23
24
DOCKER_*
You can’t perform that action at this time.
0 commit comments