File tree Expand file tree Collapse file tree 2 files changed +32
-5
lines changed
actions/ssh-keyless-login Expand file tree Collapse file tree 2 files changed +32
-5
lines changed Original file line number Diff line number Diff line change 1+ name : SSH Copy ID
2+ description : Configure SSH keyless login to target hosts
3+
4+ inputs :
5+ target_hosts :
6+ description : ' Comma-separated list of target hosts'
7+ required : true
8+ password :
9+ description : ' SSH login password'
10+ required : true
11+
12+ runs :
13+ using : ' composite'
14+ steps :
15+ - name : Install sshpass
16+ run : |
17+ sudo apt-get update
18+ sudo apt-get install -y sshpass
19+
20+ - name : Copy SSH Key to Target Hosts
21+ shell : bash
22+ run : |
23+ IFS=',' read -r -a hosts <<< "${{ inputs.target_hosts }}"
24+ for host in "${hosts[@]}"; do
25+ echo "Copying SSH key to $host"
26+ sshpass -p "${{ inputs.password }}" ssh-copy-id -o StrictHostKeyChecking=no root@$host
27+ done
Original file line number Diff line number Diff line change 11name : Update Hosts
22
3- on :
4- push :
5- branches :
6- - test/fractal
73# on:
8- # workflow_dispatch:
4+ # push:
5+ # branches:
6+ # - test/fractal
7+ on :
8+ workflow_dispatch :
99
1010jobs :
1111 filter-runners :
You can’t perform that action at this time.
0 commit comments