blob: df499727f5a71c41090dafa38a4bc9dc66016d27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
{
inputs = {
nixpkgs.url = "nixpkgs";
nix-filter.url = "github:numtide/nix-filter";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
flake-utils,
...
} @ inputs:
flake-utils.lib.eachDefaultSystem (system: let
pkgs =
import inputs.nixpkgs
{
inherit system;
};
in {
devShells.default = pkgs.mkShell {
name = "dev";
buildInputs = [
pkgs.ansible-language-server
pkgs.bashInteractive
];
shellHook = ''
[[ -f ./.venv/bin/activate ]] && {
source ./.venv/bin/activate
source ~/awx-login.sh
# NOTE(mike): this is necessary to make ansible-lint work with
# playbooks that use:
#vars_files:
# - ./secrets/vault.yaml
initool s ansible.cfg defaults vault_identity devena | initool s - defaults vault_password_file ~/pass-ansible-vault-client > /tmp/ansible.cfg
cp /tmp/ansible.cfg ansible.cfg
}
'';
};
});
}
|