Kristóf Torma
89c4c3baf0
Some checks reported errors
continuous-integration/drone/push Build was killed
54 lines
1.3 KiB
YAML
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
|
|
... |