From ce76c3ed9f05b74dbe641186a80885e10eacedd2 Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Sat, 7 Nov 2020 19:45:50 +0100 Subject: [PATCH] Add dotfile configurations --- .ansible-lint | 5 +++++ .gitignore | 14 ++++++++++++++ .gitlab-ci.yml | 41 +++++++++++++++++++++++++++++++++++++++++ .prettier.json | 9 +++++++++ 4 files changed, 69 insertions(+) create mode 100644 .ansible-lint create mode 100644 .gitignore create mode 100644 .gitlab-ci.yml create mode 100644 .prettier.json diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 0000000..e99d805 --- /dev/null +++ b/.ansible-lint @@ -0,0 +1,5 @@ +parseable: true +quiet: true +skip_list: + - '501' +use_default_rules: true diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c17815f --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +*.retry +*.swp + +.venv +.env +env +venv + +node_modules/ + +.vault +.vaults/ +vault +vaults/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..a4dfde9 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,41 @@ +stages: + - lint + - test + +cache: + key: "$CI_COMMIT_REF_SLUG" + paths: + - .cache/pip + - node_modules/ + +lint: + stage: lint + image: python:3.7 + before_script: + - pip install ansible ansible-lint --quiet + script: + - ansible-lint playbook.yml + only: + refs: + - development + - merge_requests + +pretty-lint: + stage: lint + image: node:12 + before_script: + - npm install + script: + - npx prettier "**/*.yml" --check + only: + refs: + - development + - merge_requests + +syntax-test: + stage: test + image: python:3.7 + before_script: + - pip install ansible ansible-lint --quiet + script: + - ansible-playbook playbook.yml --syntax-check diff --git a/.prettier.json b/.prettier.json new file mode 100644 index 0000000..9c76f6b --- /dev/null +++ b/.prettier.json @@ -0,0 +1,9 @@ +{ + "singleQuote": true, + "printWidth": 90, + "tabWidth": 2, + "useTabs": false, + "bracketSpacing": true, + "parser": "yaml" +} +