diff options
Diffstat (limited to 'shell.nix')
| -rw-r--r-- | shell.nix | 40 |
1 files changed, 40 insertions, 0 deletions
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 <nixpkgs> { }, +}: + +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" + ''; +} |