From c7bcf2cddf8a22dd0193a4c8742a1b0ece6de2ee Mon Sep 17 00:00:00 2001 From: Paul Brinkmeier Date: Thu, 15 Sep 2022 04:57:37 +0200 Subject: [PATCH] Use Nix instead of virtualenv --- ansible/README.md | 4 ++-- default.nix | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 default.nix diff --git a/ansible/README.md b/ansible/README.md index 9484d5b..51e668e 100644 --- a/ansible/README.md +++ b/ansible/README.md @@ -2,10 +2,10 @@ ## Ansible Control Node Setup -In a Python 3 environment (perhaps a venv): +Run in repository root to use `ansible-*` commands: ``` -pip install -r requirements.txt +nix run -c $SHELL ``` ## `misc.yaml` diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..80de056 --- /dev/null +++ b/default.nix @@ -0,0 +1,13 @@ +{ + pkgs ? import {} +}: +let + paths = with pkgs; [ + ansible + ansible-lint + ]; +in + pkgs.buildEnv { + name = "infrastructure-env"; + paths = paths; + }