2022-05-28 20:37:56 +02:00
|
|
|
---
|
2022-05-28 19:58:38 +02:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: ansible
|
|
|
|
|
|
|
|
steps:
|
2022-05-28 20:30:11 +02:00
|
|
|
- name: setup environment
|
|
|
|
image: ubuntu
|
|
|
|
environment:
|
2022-05-28 20:59:54 +02:00
|
|
|
SSH_KEY:
|
|
|
|
from_secret: SSH_KEY
|
2022-05-28 20:30:11 +02:00
|
|
|
commands:
|
2022-05-28 20:37:56 +02:00
|
|
|
- echo "$PWD"
|
2022-05-28 20:30:11 +02:00
|
|
|
- echo "$SSH_KEY" > $PWD/id_rsa && chmod 0600 $PWD/id_rsa
|
|
|
|
|
2022-05-28 19:58:38 +02:00
|
|
|
- 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
|
2022-05-28 20:30:11 +02:00
|
|
|
environment:
|
|
|
|
ANSIBLE_HOST_KEY_CHECKING: "False"
|
|
|
|
ANSIBLE_PRIVATE_KEY_FILE: "/drone/src/id_rsa"
|
2022-11-23 15:17:59 +01:00
|
|
|
ARTIFACTORY_APT_PASSWORD:
|
|
|
|
from_secret: ARTIFACTORY_APT_PASSWORD
|
2022-05-28 19:58:38 +02:00
|
|
|
settings:
|
|
|
|
playbook: nightly.yaml
|
|
|
|
galaxy: requirements.yaml
|
|
|
|
inventory: inventory.yaml
|
|
|
|
check: true
|
|
|
|
|
|
|
|
- name: ansible nightly run
|
|
|
|
image: plugins/ansible:3
|
2022-05-28 20:30:11 +02:00
|
|
|
environment:
|
|
|
|
ANSIBLE_HOST_KEY_CHECKING: "False"
|
|
|
|
ANSIBLE_PRIVATE_KEY_FILE: "/drone/src/id_rsa"
|
2022-11-23 15:17:59 +01:00
|
|
|
ARTIFACTORY_APT_PASSWORD:
|
|
|
|
from_secret: ARTIFACTORY_APT_PASSWORD
|
2022-05-28 19:58:38 +02:00
|
|
|
settings:
|
|
|
|
playbook: nightly.yaml
|
|
|
|
galaxy: requirements.yaml
|
2022-05-28 20:37:56 +02:00
|
|
|
inventory: inventory.yaml
|
|
|
|
...
|