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:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
HOME: /root
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Fix HOME directory
|
||||||
|
run: |
|
||||||
|
echo "HOME=/tmp" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up SSH Key
|
- name: Set up SSH Key
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p /tmp/.ssh
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /tmp/.ssh/id_ed25519
|
||||||
chmod 600 ~/.ssh/id_ed25519
|
chmod 600 /tmp/.ssh/id_ed25519
|
||||||
echo "StrictHostKeyChecking no" >> ~/.ssh/config
|
# Отключаем проверку хоста, чтобы не зависало на вопросе (yes/no)
|
||||||
|
echo "StrictHostKeyChecking no" >> /tmp/.ssh/config
|
||||||
|
|
||||||
- name: Run Ansible Playbook
|
- name: Run Ansible Playbook
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
[windows]
|
[windows]
|
||||||
GUFK_ISERVER ansible_host=192.168.1.2
|
GUFK_ISERVER ansible_host=192.168.1.2 ansible_port=2222
|
||||||
|
|
||||||
[windows:vars]
|
[windows:vars]
|
||||||
ansible_user=admin
|
ansible_user=admin
|
||||||
ansible_connection=ssh
|
ansible_connection=ssh
|
||||||
ansible_shell_type=cmd
|
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