more config

This commit is contained in:
decentral1se 2022-05-31 09:42:00 +02:00
parent cb4e2091fd
commit 01a1fe3433
No known key found for this signature in database
GPG Key ID: 03789458B3D0C410
5 changed files with 55 additions and 1 deletions

4
.ansible-lint.yml Normal file
View File

@ -0,0 +1,4 @@
---
skip_list:
- fqcn-builtins
- experimental

16
.drone.yml Normal file
View File

@ -0,0 +1,16 @@
----
kind: pipeline
name: default
steps:
- name: integration test
image: python:3.9-buster
environment:
REMOTE_USER: molecule
HCLOUD_TOKEN:
from_secret: HCLOUD_TOKEN
commands:
- apt update && apt install -y pwgen
- mkdir -p /root/.ansible/roles && ln -sr . /root/.ansible/roles/${ROLE_NAME}
- export INSTANCE_UUID=$(pwgen 8 1)
- pip install -r requirements.txt
- molecule test

18
.envrc.sample Normal file
View File

@ -0,0 +1,18 @@
# Your username that you use for accounts on our machines.
export REMOTE_USER=
export ANSIBLE_USER=$REMOTE_USER
# The path to our pass credentials store
export PASSWORD_STORE_DIR=
# The Hetzner Cloud API token for managing our instances
# Uncomment the prod/test line below depending on what you're doing
# export HCLOUD_TOKEN=$(pass show logins/hetzner/prod/api_key)
# export HCLOUD_TOKEN=$(pass show logins/hetzner/test/api_key)
export HCLOUD_TOKEN=$(pass show logins/hetzner/cicd/api_key)
# For molecule role testing
export INSTANCE_UUID=$RANDOM
# So molecule will show credentials in the logs
export MOLECULE_NO_LOG=False

16
.yamllint.yml Executable file
View File

@ -0,0 +1,16 @@
---
extends: default
yaml-files:
- "*.yaml"
- "*.yml"
ignore: |
.venv
.drone.yml
rules:
line-length: disable
braces:
max-spaces-inside: 1
level: error

View File

@ -6,7 +6,7 @@ driver:
name: hetznercloud
platforms:
- name: "autonomic.add-users-${INSTANCE_UUID}"
- name: "${ROLE_NAME}-$${INSTANCE_UUID}"
server_type: cx11
image: debian-10