From 1b385f113339ba2d06280188b912b9d16badc50b Mon Sep 17 00:00:00 2001
From: Lars Beckers <lars.beckers@rwth-aachen.de>
Date: Wed, 11 Sep 2019 17:10:55 +0200
Subject: [PATCH] add gitlab CI config; add ansible-lint config; update
 yamllint config

---
 .ansible-lint  |  9 +++++++++
 .gitlab-ci.yml | 25 +++++++++++++++++++++++++
 .yamllint      |  6 +++++-
 3 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 .ansible-lint
 create mode 100644 .gitlab-ci.yml

diff --git a/.ansible-lint b/.ansible-lint
new file mode 100644
index 0000000..5f1bb03
--- /dev/null
+++ b/.ansible-lint
@@ -0,0 +1,9 @@
+parseable: true
+quiet: true
+use_default_rules: true
+skip_list:
+  - '204'  # line length is checked by yamllint
+  - '401'  # git checkout must contain explicit version
+  - '701'  # 7xx is about ansible galaxy guidelines
+  - '702'
+  - '703'
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..5ad974b
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,25 @@
+---
+
+image: registry.git.fsmpi.rwth-aachen.de/infra/ci-containers/fsmpi-ansible:buster
+
+variables:
+  GIT_SUBMODULE_STRATEGY: recursive
+
+before_script:
+  - export LANG=en_US.UTF-8
+  - chmod o-w .
+  - apt-get -qq update && apt-get -qq install -y ansible-lint ripgrep
+  - ansible --version
+  - ansible-lint --version
+  - yamllint --version
+
+stages:
+  - test
+
+test:
+  stage: test
+  script:
+    - yamllint .
+    - ansible-lint ./*/
+    # yamllint disable-line rule:line-length
+    - "! rg --fixed-strings 'passwordstore' ./*/templates"
diff --git a/.yamllint b/.yamllint
index cca80e2..734b455 100644
--- a/.yamllint
+++ b/.yamllint
@@ -14,6 +14,10 @@ rules:
     forbid-in-block-mappings: true
   line-length:
     level: warning
+    allow-non-breakable-inline-mappings: true
   octal-values:
     forbid-implicit-octal: true
-    level: warning
+    level: error
+  # quoted-strings: enable
+  truthy:
+    level: error
-- 
GitLab