vm-ansible/.drone.yml
Torma Kristóf 85f640d49e
Some checks reported errors
continuous-integration/drone/push Build was killed
fix ssh key secret name
2022-05-28 20:59:54 +02:00

44 lines
966 B
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"
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"
settings:
playbook: nightly.yaml
galaxy: requirements.yaml
inventory: inventory.yaml
...