test-proj/.woodpecker.yml

24 lines
634 B
YAML
Raw Normal View History

2023-03-08 22:52:10 +00:00
pipeline:
2023-03-09 15:44:23 +00:00
test:
image: debian:stable
secrets: [ ssh_key ]
environment:
- ANSIBLE_PRIVATE_KEY=$SSH_KEY
2023-03-09 15:46:59 +00:00
- ANSIBLE_HOST_KEY_CHECKING=False
2023-03-09 15:44:23 +00:00
commands:
- apt-get update && apt-get install ansible -y
2023-03-09 15:50:08 +00:00
- echo $ANSIBLE_PRIVATE_KEY > /tmp/privateKey
- chmod 600 /tmp/privateKey
- ansible-playbook --user igor --inventory hosts.ini --private-key /tmp/privateKey main.yml
2023-03-09 15:44:23 +00:00
2023-03-09 02:20:45 +00:00
publish:
image: plugins/ansible
2023-03-09 15:21:56 +00:00
pull: true
2023-03-09 02:20:45 +00:00
secrets: [ ssh_key ]
settings:
2023-03-09 02:22:19 +00:00
playbook: main.yml
2023-03-09 02:20:45 +00:00
inventory: hosts.ini
2023-03-09 14:56:32 +00:00
connection: paramiko_ssh
2023-03-09 02:20:45 +00:00
user: igor
2023-03-09 15:14:04 +00:00
private_key: $SSH_KEY