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
|
|
|
|
|
|
|
|
- name: Run ansible playbook
|
|
|
|
image: harbor.sebclem.fr/sebclem/drone-ansible-runner
|
|
|
|
settings:
|
2022-11-05 18:42:41 +01: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:
|
2022-11-05 18:42:41 +01:00
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
target:
|
|
|
|
- production
|
2022-02-04 16:11:54 +01:00
|
|
|
|
|
|
|
- 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-03-04 14:02:21 +01:00
|
|
|
status: [changed, failure]
|