From 2570550feba2abc80c182ca5e6918f29c22c4cf8 Mon Sep 17 00:00:00 2001 From: Colin Wilk Date: Tue, 23 Jun 2026 13:22:08 +0200 Subject: Add shell.nix for molecule tests --- shell.nix | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 shell.nix (limited to 'shell.nix') diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..b07495a --- /dev/null +++ b/shell.nix @@ -0,0 +1,40 @@ +{ + pkgs ? import { }, +}: + +let + python = pkgs.python3.withPackages (ps: [ + ps.ansible + ps.docker + ps.molecule + ps.molecule-plugins + ps.pytest + ps.pytest-testinfra + ps.requests + ]); +in +pkgs.mkShell { + packages = [ + python + pkgs.docker + pkgs.rsync + pkgs.python311Packages.requests + ]; + + shellHook = '' + export ANSIBLE_ALLOW_BROKEN_CONDITIONALS=True + export PYTHONDONTWRITEBYTECODE=1 # Keep Python from writing .pyc files + + + echo "==========================================================" + echo "🚀 Ansible Molecule Development Environment is ready" + echo "==========================================================" + echo "Installed Versions:" + python --version + ansible --version | head -n 1 + molecule --version | head -n 1 + echo "==========================================================" + echo "Using ANSIBLE_ALLOW_BROKEN_CONDITIONALS=True for molecule-plugins/docker" + echo "Run: molecule test -s default" + ''; +} -- cgit v1.2.3