ansible/.drone.yml

28 lines
503 B
YAML
Raw Normal View History

2023-02-06 13:08:28 +00:00
---
kind: pipeline
type: docker
name: run updates
steps:
2023-02-06 14:35:49 +00:00
- name: setup ansible
2023-02-06 14:32:23 +00:00
image: alpine
2023-02-06 13:08:28 +00:00
environment:
PASS:
from_secret: pass
2023-02-06 15:11:52 +00:00
KEY:
from_secret: key
2023-02-06 13:08:28 +00:00
commands:
2023-02-06 13:33:21 +00:00
- sed -i "1s/^/[all:vars]\nansible_become_pass = $PASS\n/" servers.ini
2023-02-06 15:11:52 +00:00
- echo "$KEY" > id_rsa
2023-02-06 14:35:49 +00:00
- name: run updates
2023-02-06 14:32:23 +00:00
image: plugins/ansible
2023-02-06 14:39:24 +00:00
settings:
inventory: servers.ini
2023-02-06 14:39:24 +00:00
playbook: site.yml
tags: update
2023-02-06 15:06:19 +00:00
verbose: 4
2023-02-06 14:49:14 +00:00
ssh_common_args: -o "StrictHostKeyChecking no"
2023-02-06 15:11:52 +00:00
private_key: id_rsa
2023-02-06 13:08:28 +00:00