ansible-playbook-template/.drone.yml

51 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:
2022-07-26 15:40:29 +02:00
verbosity: ${verbosity=0}
limit: ${limit}
tags: ${tags}
2022-02-04 16:11:54 +01:00
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:
2022-03-04 14:02:21 +01:00
host:
2022-02-04 16:11:54 +01:00
from_secret: mail_host
2022-03-04 14:02:21 +01:00
username:
2022-02-04 16:11:54 +01:00
from_secret: mail_username
2022-03-04 14:02:21 +01:00
password:
2022-02-04 16:11:54 +01:00
from_secret: mail_password
2022-03-04 14:02:21 +01:00
from:
from_secret: mail_from
2022-02-04 16:11:54 +01:00
when:
2022-07-26 15:40:29 +02:00
status: [changed, failure]