ansible-playbook-template/.drone.yml
2022-07-26 15:40:29 +02:00

51 lines
1.1 KiB
YAML

kind: pipeline
name: default
steps:
- name: Check ansible syntax
image: harbor.sebclem.fr/sebclem/drone-ansible-runner
settings:
playbook: sites.yml
galaxy_file: roles/requirements.yml
check_syntax: true
vault_token:
from_secret: ansible_vault_token
private_key:
from_secret: ansible_private_key
when:
event:
- promote
- rollback
- push
- custom
- name: Run ansible playbook
image: harbor.sebclem.fr/sebclem/drone-ansible-runner
settings:
verbosity: ${verbosity=0}
limit: ${limit}
tags: ${tags}
playbook: sites.yml
galaxy_file: roles/requirements.yml
vault_token:
from_secret: ansible_vault_token
private_key:
from_secret: ansible_private_key
when:
event:
- promote
- rollback
- name: Notify
image: drillster/drone-email
settings:
host:
from_secret: mail_host
username:
from_secret: mail_username
password:
from_secret: mail_password
from:
from_secret: mail_from
when:
status: [changed, failure]