service-ansible/.drone.yml

27 lines
620 B
YAML
Raw Normal View History

---
kind: pipeline
type: docker
name: ansible
steps:
2023-08-30 23:21:24 +02:00
- name: ansible nightly run
image: alpinelinux/ansible
environment:
2023-08-30 23:21:24 +02:00
ANSIBLE_HOST_KEY_CHECKING: "False"
ANSIBLE_PRIVATE_KEY_FILE: "/drone/src/id_rsa"
ANSIBLE_CONFIG: "/drone/src/ansible.cfg"
SSH_KEY:
from_secret: SSH_KEY
commands:
2023-08-30 23:22:57 +02:00
- echo "$SSH_KEY" > $PWD/id_rsa
- chmod 0600 $PWD/id_rsa
2023-08-30 23:35:26 +02:00
- ansible-galaxy collection install -r requirements.yaml
2023-08-30 23:21:24 +02:00
- ansible-playbook -i inventory.yaml nightly.yaml
2023-08-30 23:39:41 +02:00
- name: notify
image: drillster/drone-email
settings:
host: smtp.intra.tormakris.dev
from: drone@tormakris.dev
2023-08-30 23:21:24 +02:00
...