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 14:45:55 +00:00
|
|
|
volumes:
|
|
|
|
- name: ssh
|
|
|
|
path: /root/.ssh
|
2023-02-06 13:08:28 +00:00
|
|
|
environment:
|
|
|
|
PASS:
|
|
|
|
from_secret: pass
|
|
|
|
commands:
|
2023-02-06 13:33:21 +00:00
|
|
|
- sed -i "1s/^/[all:vars]\nansible_become_pass = $PASS\n/" servers.ini
|
2023-02-06 14:45:55 +00:00
|
|
|
- echo "Host *\n\tStrictHostKeyChecking no" > ~/.ssh/ssh_config
|
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:
|
2023-02-06 14:40:31 +00:00
|
|
|
inventory: servers.ini
|
2023-02-06 14:39:24 +00:00
|
|
|
playbook: site.yml
|
|
|
|
private_key:
|
2023-02-06 14:32:23 +00:00
|
|
|
from_secret: key
|
2023-02-06 14:45:55 +00:00
|
|
|
volumes:
|
|
|
|
- name: ssh
|
|
|
|
path: /root/.ssh
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: ssh
|
|
|
|
temp:
|
|
|
|
medium: memory
|
2023-02-06 13:08:28 +00:00
|
|
|
|