You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the recommended way to run ansible-dev-tools. If a virtual environment
40
-
is not detected, a warning will be displayed, prompting the user to use one
41
-
for better isolation.
39
+
- First folder that is not read-only from the list below will be used as cache directory and also :
42
40
43
-
It should be noted that our tools will look for a `.venv` directory inside
44
-
the current directory if a virtual environment is not already active and will
45
-
try to use it if found.
41
+
-`$VIRTUAL_ENV/.ansible` for anything but collections, those will be inside `lib/python3.*/site-packages/ansible_collections` because this makes them available to ansible-core without any additional configuration.
42
+
-`$PROJECT_ROOT/.ansible`
43
+
-`$TMPDIR/.ansible-<sha256>` for temporary installations
46
44
47
-
When running ansible-dev-tools inside a virtual environment, the following
48
-
things will happen:
45
+
-`ANSIBLE_HOME` will be defined to point to it, preventing accidental use of user's home directory. Its existing value will be ignored. If you want to avoid this, see non-isolated mode below.
46
+
47
+
### Virtual environment detection
48
+
49
+
Our tools will look for presence of `VIRTUAL_ENV` variable and use it.
50
+
Otherwise they will also try to look a `.venv` directory inside
51
+
the project directory will try to use it if found.
52
+
53
+
When running ansible-dev-tools inside a **writable** virtual environment,
54
+
the following things will happen:
49
55
50
56
- Few Ansible environment variables will be automatically defined in order to
51
57
make `ansible-galaxy` install commands to install content (collections and
52
-
roles) directly inside the virtual environment. Ansible-core itself is already able to find content from inside the virtual environment and this takes priority over the other paths.
58
+
roles) directly inside the virtual environment. Ansible-core itself is
59
+
already able to find content from inside the virtual environment and this
60
+
takes priority over the other paths.
53
61
- Dependencies will automatically be installed inside the virtual environment
0 commit comments