Skip to content

feat: Change default isolation mode from 'restrictive' to 'cfg' #345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ansible_dev_environment/arg_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def parse() -> argparse.Namespace:
" cfg: Update or add an ansible.cfg file in the current working directory to isolate the workspace"
" none: No isolation, not recommended."
),
default="restrictive",
default="cfg",
choices=["restrictive", "cfg", "none"],
type=str,
)
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def test_acp_env_var_set(
monkeypatch: Pytest fixture.
"""
monkeypatch.setenv(env_var, "test")
monkeypatch.setattr("sys.argv", ["ansible-dev-environment", "install"])
monkeypatch.setattr("sys.argv", ["ansible-dev-environment", "install", "--im", "restrictive"])
with pytest.raises(SystemExit):
main(dry=True)
captured = capsys.readouterr()
Expand All @@ -162,7 +162,7 @@ def test_collections_in_home(
"""
monkeypatch.setattr(
"sys.argv",
["ansible-dev-environment", "install", "--venv", "venv"],
["ansible-dev-environment", "install", "--venv", "venv", "--im", "restrictive"],
)
monkeypatch.setenv("HOME", str(tmp_path))
monkeypatch.setenv("ANSIBLE_HOME", str(tmp_path / ".ansible"))
Expand Down Expand Up @@ -222,7 +222,7 @@ def _iterdir(path: Path) -> list[Path] | Generator[Path, None, None]:

monkeypatch.setattr(
"sys.argv",
["ansible-dev-environment", "install", "--venv", "venv"],
["ansible-dev-environment", "install", "--venv", "venv", "--im", "restrictive"],
)
with pytest.raises(SystemExit):
main(dry=True)
Expand Down
Loading