49 lines
No EOL
944 B
YAML
49 lines
No EOL
944 B
YAML
kind: pipeline
|
|
name: default
|
|
type: docker
|
|
|
|
trigger:
|
|
branch:
|
|
- main
|
|
|
|
steps:
|
|
- name: Syntax Check
|
|
image: plugins/ansible
|
|
settings:
|
|
become: true
|
|
playbook: playbook.yml
|
|
inventory: hosts
|
|
private_key:
|
|
from_secret: drone_ssh_priv
|
|
ssh_extra_args: "-o StrictHostKeyChecking=no"
|
|
requirements: requirements.txt
|
|
galaxy: requirements.yml
|
|
syntax_check: true
|
|
# when:
|
|
# event:
|
|
# - pull_request
|
|
|
|
- name: Lint
|
|
image: cytopia/ansible-lint
|
|
commands:
|
|
- ansible-lint playbook.yml --force-color
|
|
# when:
|
|
# event:
|
|
# - pull_request
|
|
|
|
- name: Show Diff and Check
|
|
image: plugins/ansible
|
|
settings:
|
|
become: true
|
|
playbook: playbook.yml
|
|
inventory: hosts
|
|
private_key:
|
|
from_secret: drone_ssh_priv
|
|
diff: true
|
|
check: true
|
|
ssh_extra_args: "-o StrictHostKeyChecking=no"
|
|
requirements: requirements.txt
|
|
galaxy: requirements.yml
|
|
# when:
|
|
# event:
|
|
# - pull_request |