2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-31 01:56:39 +00:00

Merge pull request #7331 from gurevichmark/Alma_testcases

Update testcases to run on AlmaLinux
This commit is contained in:
besawn 2023-02-03 14:16:43 -05:00 committed by GitHub
commit 5cda3b6e84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -24,7 +24,7 @@ check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:sleep 2
cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$SN;elif cat /etc/*release |grep "Red Hat\|Rocky" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$SN;fi
cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$SN;elif cat /etc/*release |grep "Red Hat\|Rocky\|AlmaLinux" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$SN;fi
check:output=~$$SN
cmd:chdef -t node $$SN groups=service,all
check:rc==0

View File

@ -1,13 +1,13 @@
start:restapi_setup_on_MN_CN
description: Set up the REST API on MN and CN
label:restapi
#Install the mod_ssl package on Red Hat and Rocky
cmd:if cat /etc/*release | grep "Red Hat\|Rocky" >/dev/null; then yum install mod_ssl -y; rpm -qa | grep mod_ssl; fi
#Install the mod_ssl package on Red Hat, Rocky and AlmaLinux
cmd:if cat /etc/*release | grep "Red Hat\|Rocky\|AlmaLinux" >/dev/null; then yum install mod_ssl -y; rpm -qa | grep mod_ssl; fi
check:rc==0
cmd:if cat /etc/*release | grep "Red Hat\|Rocky" >/dev/null; then sed -i 's/^\(\s*\)SSLCertificateFile.*$/\1SSLCertificateFile \/etc\/xcat\/cert\/server-cred.pem/' /etc/httpd/conf.d/ssl.conf; fi
cmd:if cat /etc/*release | grep "Red Hat\|Rocky" >/dev/null; then sed -i 's/^\(\s*SSLCertificateKeyFile.*\)$/#\1/' /etc/httpd/conf.d/ssl.conf; fi
cmd:if cat /etc/*release | grep "Red Hat\|Rocky\|AlmaLinux" >/dev/null; then sed -i 's/^\(\s*\)SSLCertificateFile.*$/\1SSLCertificateFile \/etc\/xcat\/cert\/server-cred.pem/' /etc/httpd/conf.d/ssl.conf; fi
cmd:if cat /etc/*release | grep "Red Hat\|Rocky\|AlmaLinux" >/dev/null; then sed -i 's/^\(\s*SSLCertificateKeyFile.*\)$/#\1/' /etc/httpd/conf.d/ssl.conf; fi
check:rc==0
cmd:if cat /etc/*release | grep "Red Hat\|Rocky" >/dev/null; then service httpd restart; fi
cmd:if cat /etc/*release | grep "Red Hat\|Rocky\|AlmaLinux" >/dev/null; then service httpd restart; fi
check:rc==0
#Configure the SLES environment
cmd:if cat /etc/*release | grep "SLES" >/dev/null; then a2enmod ssl; a2enflag SSL; cp /etc/apache2/vhosts.d/vhost-ssl.template /etc/apache2/vhosts.d/vhost-ssl.conf; fi
@ -30,8 +30,8 @@ cmd:xdsh $$CN "rm /root/ca-cert.pem"
check:rc==0
cmd:tabch -d key=xcat passwd
check:rc==0
#Remove the mod_ssl package on Red Hat and Rocky
cmd:if cat /etc/*release | grep "Red Hat\|Rocky" >/dev/null; then yum remove mod_ssl -y; service httpd restart; fi
#Remove the mod_ssl package on Red Hat, Rocky and AlmaLinux
cmd:if cat /etc/*release | grep "Red Hat\|Rocky\|AlmaLinux" >/dev/null; then yum remove mod_ssl -y; service httpd restart; fi
check:rc==0
#Clean up the SLES environment
cmd:if cat /etc/*release | grep "SLES" >/dev/null; then rm /etc/apache2/vhosts.d/vhost-ssl.conf; service apache2 restart; fi