ansible/.drone.yml

22 lines
566 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 15:43:06 +00:00
- name: run updates
image: siverten/ansible
2023-02-06 13:08:28 +00:00
environment:
2023-02-06 16:30:05 +00:00
ANSIBLE_HOST_KEY_CHECKING: False
2023-02-06 16:27:59 +00:00
#ANSIBLE_SSH_PIPELINING: False
ANSIBLE_SSH_ARGS: -o StrictHostKeyChecking no -C -o ControlMaster=auto -o ControlPersist=60s
2023-02-06 13:08:28 +00:00
PASS:
from_secret: pass
2023-02-06 15:43:06 +00:00
KEY:
from_secret: key
2023-02-06 13:08:28 +00:00
commands:
2023-02-06 16:32:16 +00:00
- mkdir ~/.ssh && echo "$KEY" > ~/.ssh/id_rsa && chmod 600 -R ~/.ssh
2023-02-06 13:33:21 +00:00
- sed -i "1s/^/[all:vars]\nansible_become_pass = $PASS\n/" servers.ini
2023-02-06 16:33:25 +00:00
- unbuffer ansible-playbook site.yml -t update | cat
2023-02-06 13:08:28 +00:00