vm-ansible/.drone.yml

27 lines
638 B
YAML
Raw Normal View History

2022-05-28 20:37:56 +02:00
---
2022-05-28 19:58:38 +02:00
kind: pipeline
type: docker
name: ansible
steps:
2022-05-28 20:30:11 +02:00
- name: setup environment
image: ubuntu
environment:
2022-05-28 20:59:54 +02:00
SSH_KEY:
from_secret: SSH_KEY
2022-05-28 20:30:11 +02:00
commands:
2022-05-28 20:37:56 +02:00
- echo "$PWD"
2022-05-28 20:30:11 +02:00
- echo "$SSH_KEY" > $PWD/id_rsa && chmod 0600 $PWD/id_rsa
2022-05-28 19:58:38 +02:00
- name: ansible nightly run
2023-07-25 14:46:24 +02:00
image: alpinelinux/ansible
2022-05-28 20:30:11 +02:00
environment:
ANSIBLE_HOST_KEY_CHECKING: "False"
ANSIBLE_PRIVATE_KEY_FILE: "/drone/src/id_rsa"
2023-03-05 18:32:21 +01:00
ANSIBLE_CONFIG: "/drone/src/ansible.cfg"
2023-03-05 22:08:45 +01:00
CLOUDFLARE_TOKEN:
from_secret: CLOUDFLARE_TOKEN
2023-07-25 14:46:24 +02:00
commands:
- ansible-galaxy collection install -r requirements.yaml
- ansible-playbook -i inventory.yaml nightly.yaml
2022-05-28 20:37:56 +02:00
...