vm-ansible/.drone.yml
Kristóf Torma 85e0b9f978
Some checks reported errors
continuous-integration/drone/push Build was killed
prepare for mastodon
2022-11-23 15:17:59 +01:00

48 lines
1.1 KiB
YAML

---
kind: pipeline
type: docker
name: ansible
steps:
- name: setup environment
image: ubuntu
environment:
SSH_KEY:
from_secret: SSH_KEY
commands:
- echo "$PWD"
- echo "$SSH_KEY" > $PWD/id_rsa && chmod 0600 $PWD/id_rsa
- name: check ansible syntax
image: plugins/ansible:3
settings:
playbook: nightly.yaml
galaxy: requirements.yaml
inventory: inventory.yaml
syntax_check: true
- name: run playbook in check mode
image: plugins/ansible:3
environment:
ANSIBLE_HOST_KEY_CHECKING: "False"
ANSIBLE_PRIVATE_KEY_FILE: "/drone/src/id_rsa"
ARTIFACTORY_APT_PASSWORD:
from_secret: ARTIFACTORY_APT_PASSWORD
settings:
playbook: nightly.yaml
galaxy: requirements.yaml
inventory: inventory.yaml
check: true
- name: ansible nightly run
image: plugins/ansible:3
environment:
ANSIBLE_HOST_KEY_CHECKING: "False"
ANSIBLE_PRIVATE_KEY_FILE: "/drone/src/id_rsa"
ARTIFACTORY_APT_PASSWORD:
from_secret: ARTIFACTORY_APT_PASSWORD
settings:
playbook: nightly.yaml
galaxy: requirements.yaml
inventory: inventory.yaml
...