parent
8466d36ff8
commit
4a66a3a736
51
.github/workflows/deploy.yml
vendored
51
.github/workflows/deploy.yml
vendored
@ -9,29 +9,28 @@ jobs:
|
|||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- run: echo "${{github.ref}}"
|
- name: Checkout cuqmbr/homelab repository
|
||||||
# - name: Checkout cuqmbr/homelab repository
|
run: git clone https://git.cuqmbr.xyz/cuqmbr/homelab.git --depth 1 --branch main --single-branch
|
||||||
# run: git clone https://git.cuqmbr.xyz/cuqmbr/homelab.git --depth 1 --branch main --single-branch
|
- name: Setup ansible
|
||||||
# - name: Setup ansible
|
run: apt-get update && apt-get install ansible-core -y
|
||||||
# run: apt-get update && apt-get install ansible-core -y
|
- name: Add SSH key
|
||||||
# - name: Add SSH key
|
env:
|
||||||
# env:
|
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
||||||
# SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
run: |
|
||||||
# run: |
|
mkdir -p ~/.ssh
|
||||||
# mkdir -p ~/.ssh
|
echo "${{secrets.ANSIBLE_SSH_KEY}}" > ~/.ssh/key
|
||||||
# echo "${{secrets.ANSIBLE_SSH_KEY}}" > ~/.ssh/key
|
chmod 600 ~/.ssh/key
|
||||||
# chmod 600 ~/.ssh/key
|
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
|
||||||
# ssh-agent -a $SSH_AUTH_SOCK > /dev/null
|
ssh-add ~/.ssh/key
|
||||||
# ssh-add ~/.ssh/key
|
# Without the workaroud can't establish connection to targeted server
|
||||||
# # Without the workaroud can't establish connection to targeted server
|
- name: Connect directly to bastion
|
||||||
# - name: Connect directly to bastion
|
env:
|
||||||
# env:
|
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
||||||
# SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
run: |
|
||||||
# run: |
|
ssh -o StrictHostKeyChecking=no gitea-actions@bastion.cuqmbr.home 'cat /etc/hostname'
|
||||||
# ssh -o StrictHostKeyChecking=no gitea-actions@bastion.cuqmbr.home 'cat /etc/hostname'
|
- name: Run ansible playbook
|
||||||
# - name: Run ansible playbook
|
env:
|
||||||
# env:
|
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
||||||
# SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
run: |
|
||||||
# run: |
|
cd ./homelab/ansible
|
||||||
# cd ./homelab/ansible
|
ansible-playbook -u gitea-actions --ssh-common-args "-o StrictHostKeyChecking=no -o ProxyCommand='ssh -p 22 -W %h:%p -q gitea-actions@bastion.cuqmbr.home'" --private-key ~/.ssh/key -b --become-method doas --start-at-task 'Install hugo deb package from github.' --extra-vars "hugo_git_repo=${{github.server_url}}/${{github.repository}}.git hugo_git_refspec=${{github.ref}} hugo_git_commit=${{github.sha}}" -i inventories/dev/hosts.yml 20_main_page.yml
|
||||||
# ansible-playbook -u gitea-actions --ssh-common-args "-o StrictHostKeyChecking=no -o ProxyCommand='ssh -p 22 -W %h:%p -q gitea-actions@bastion.cuqmbr.home'" --private-key ~/.ssh/key -b --become-method doas --start-at-task 'Install hugo deb package from github.' --extra-vars "hugo_git_repo=${{github.server_url}}/${{github.repository}}.git hugo_git_commit=${{github.sha}}" -i inventories/dev/hosts.yml 20_main_page.yml
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
title: Home
|
title: Home
|
||||||
---
|
---
|
||||||
|
|
||||||
# HELLO FROM ACTIONS
|
# HELLO FROM ACTIONS AAAA!
|
||||||
|
|
||||||
# Dan Nazarko aka cuqmbr
|
# Dan Nazarko aka cuqmbr
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user