Woodpecker setup
This commit is contained in:
parent
71b6846b56
commit
159db6a1c8
1 changed files with 18 additions and 0 deletions
18
.woodpecker/main.yml
Normal file
18
.woodpecker/main.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
when:
|
||||||
|
- event: cron
|
||||||
|
cron: ansible_setup
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: local/builder
|
||||||
|
|
||||||
|
commands:
|
||||||
|
- mkdir /root/.ssh && chmod 0700 /root/.ssh
|
||||||
|
- echo $SSH_KEY | base64 --decode >> /root/.ssh/id_rsa
|
||||||
|
- chmod 0600 /root/.ssh/id_rsa
|
||||||
|
- cd /ansible
|
||||||
|
- touch ./.vault_password
|
||||||
|
- echo $VAULT_PASSWORD >> ./.vault_password
|
||||||
|
- ansible-playbook -i homelab.ini --extra-vars "ansible_sudo_pass=$ansible_password" setup.yml
|
||||||
|
secrets: [ SSH_KEY, ansible_password, VAULT_PASSWORD ]
|
||||||
|
|
Loading…
Reference in a new issue