service-ansible/.drone.yml

20 lines
435 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:21:24 +02:00
- ansible-playbook -i inventory.yaml nightly.yaml
...