vm-ansible/.drone.yml
Kristóf Torma 89c4c3baf0
Some checks reported errors
continuous-integration/drone/push Build was killed
add shit
2023-03-05 22:08:45 +01:00

54 lines
1.3 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"
ANSIBLE_CONFIG: "/drone/src/ansible.cfg"
ARTIFACTORY_APT_PASSWORD:
from_secret: ARTIFACTORY_APT_PASSWORD
CLOUDFLARE_TOKEN:
from_secret: CLOUDFLARE_TOKEN
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"
ANSIBLE_CONFIG: "/drone/src/ansible.cfg"
ARTIFACTORY_APT_PASSWORD:
from_secret: ARTIFACTORY_APT_PASSWORD
CLOUDFLARE_TOKEN:
from_secret: CLOUDFLARE_TOKEN
settings:
playbook: nightly.yaml
galaxy: requirements.yaml
inventory: inventory.yaml
...