Skip to content

Commit

Permalink
Merge pull request #292 from arxcruz/ssh-keyscan
Browse files Browse the repository at this point in the history
Remove ssh-keyscan from gen-edpm-compute-node script
  • Loading branch information
openshift-merge-robot authored May 31, 2023
2 parents b08d615 + 35d2e39 commit 6dd770e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions devsetup/scripts/gen-edpm-compute-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ sed -i s/dhcp/none/g $NETSCRIPT
sed -i /PERSISTENT_DHCLIENT/d $NETSCRIPT
EOF

chmod +x ${OUTPUT_BASEDIR}/${EDPM_COMPUTE_NAME}-firstboot.sh

if [ ! -f ${DISK_FILEPATH} ]; then
if [ ! -f ${CRC_POOL}/centos-9-stream-base.qcow2 ]; then
pushd ${CRC_POOL}
Expand All @@ -191,7 +193,6 @@ if [ ! -f ${DISK_FILEPATH} ]; then
if [[ ! -e /usr/bin/virt-customize ]]; then
sudo dnf -y install /usr/bin/virt-customize
fi
VIRT_HOST_KNOWN_HOSTS=$(ssh-keyscan 192.168.122.1)
virt-customize -a ${DISK_FILEPATH} \
--root-password password:12345678 \
--hostname ${EDPM_COMPUTE_NAME} \
Expand All @@ -200,7 +201,6 @@ if [ ! -f ${DISK_FILEPATH} ]; then
--run-command "echo 'PermitRootLogin yes' > /etc/ssh/sshd_config.d/99-root-login.conf" \
--run-command "mkdir -p /root/.ssh; chmod 0700 /root/.ssh" \
--run-command "ssh-keygen -f /root/.ssh/id_rsa -N ''" \
--run-command "echo \"${VIRT_HOST_KNOWN_HOSTS}\" >> /root/.ssh/known_hosts" \
--ssh-inject root:string:"$(cat $SSH_PUBLIC_KEY)" \
--selinux-relabel || rm -f ${DISK_FILEPATH}
if [ ! -f ${DISK_FILEPATH} ]; then
Expand Down

0 comments on commit 6dd770e

Please sign in to comment.