diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 5c6942d..6e14869 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -6,18 +6,21 @@ on: jobs: deploy: runs-on: ubuntu-latest - env: - HOME: /root steps: + - name: Fix HOME directory + run: | + echo "HOME=/tmp" >> $GITHUB_ENV + - name: Checkout code uses: actions/checkout@v3 - name: Set up SSH Key run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - echo "StrictHostKeyChecking no" >> ~/.ssh/config + mkdir -p /tmp/.ssh + echo "${{ secrets.SSH_PRIVATE_KEY }}" > /tmp/.ssh/id_ed25519 + chmod 600 /tmp/.ssh/id_ed25519 + # Отключаем проверку хоста, чтобы не зависало на вопросе (yes/no) + echo "StrictHostKeyChecking no" >> /tmp/.ssh/config - name: Run Ansible Playbook run: | diff --git a/ansible/inventory.ini b/ansible/inventory.ini index 84abeb6..24e8c05 100644 --- a/ansible/inventory.ini +++ b/ansible/inventory.ini @@ -1,8 +1,8 @@ [windows] -GUFK_ISERVER ansible_host=192.168.1.2 +GUFK_ISERVER ansible_host=192.168.1.2 ansible_port=2222 [windows:vars] ansible_user=admin ansible_connection=ssh ansible_shell_type=cmd -ansible_ssh_private_key_file=~/.ssh/id_ed25519 \ No newline at end of file +ansible_ssh_private_key_file=/tmp/.ssh/id_ed25519 \ No newline at end of file