ansible-playbook-template/.drone.yml

49 lines
1.1 KiB
YAML
Raw Normal View History

2022-02-04 16:11:54 +01:00
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: 1
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 ]