📦️ CI volume to store ssh settings for ansible
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Sivert V. Sæther 2023-02-06 15:45:55 +01:00
parent 6868986b7c
commit d91c61174a

View File

@ -6,12 +6,15 @@ name: run updates
steps: steps:
- name: setup ansible - name: setup ansible
image: alpine image: alpine
volumes:
- name: ssh
path: /root/.ssh
environment: environment:
PASS: PASS:
from_secret: pass from_secret: pass
commands: commands:
- sed -i "1s/^/[all:vars]\nansible_become_pass = $PASS\n/" servers.ini - sed -i "1s/^/[all:vars]\nansible_become_pass = $PASS\n/" servers.ini
#- ansible-playbook site.yml -t update -vvv - echo "Host *\n\tStrictHostKeyChecking no" > ~/.ssh/ssh_config
- name: run updates - name: run updates
image: plugins/ansible image: plugins/ansible
@ -20,4 +23,12 @@ steps:
playbook: site.yml playbook: site.yml
private_key: private_key:
from_secret: key from_secret: key
volumes:
- name: ssh
path: /root/.ssh
volumes:
- name: ssh
temp:
medium: memory