Compare commits

..

3 Commits

Author SHA1 Message Date
78c13e41a6 Add ansible-lint drone config
Some checks failed
continuous-integration/drone/push Build is failing
2022-09-15 05:01:01 +02:00
c7bcf2cddf Use Nix instead of virtualenv 2022-09-15 04:57:37 +02:00
a86b3e6a43 Move playbooks to playbooks folder 2022-09-15 04:56:14 +02:00
8 changed files with 26 additions and 3 deletions

9
.drone.yml Normal file
View File

@ -0,0 +1,9 @@
---
kind: pipeline
type: docker
name: ansible
steps:
- name: ansible-lint
image: nixos/nix:2.11.0
commands:
- nix run -c ansible-lint ansible

View File

@ -2,10 +2,10 @@
## Ansible Control Node Setup ## 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` ## `misc.yaml`

View File

@ -1,2 +1,3 @@
[defaults] [defaults]
inventory = ./inventory inventory = ./inventory
roles_path = ./roles

View File

@ -24,7 +24,7 @@
- name: Upload docker configuration - name: Upload docker configuration
become: yes become: yes
copy: copy:
src: ../docker src: ../../docker
dest: /etc/pbri dest: /etc/pbri
# Files should inaccessible to non-root users. # Files should inaccessible to non-root users.
mode: u=rw,g=,o= mode: u=rw,g=,o=

13
default.nix Normal file
View File

@ -0,0 +1,13 @@
{
pkgs ? import <nixpkgs> {}
}:
let
paths = with pkgs; [
ansible
ansible-lint
];
in
pkgs.buildEnv {
name = "infrastructure-env";
paths = paths;
}