generated from helmut/template
Fix runner home and ssh port
Remote Deploy to Windows / deploy (push) Failing after 1s
Details
Remote Deploy to Windows / deploy (push) Failing after 1s
Details
This commit is contained in:
parent
bb88e8bacc
commit
c0f0f5ed07
|
|
@ -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: |
|
||||
|
|
|
|||
|
|
@ -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
|
||||
ansible_ssh_private_key_file=/tmp/.ssh/id_ed25519
|
||||
Loading…
Reference in New Issue