mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Add RHEL 7.3 to ansible-test and CI. (#26550)
* Add support for RHEL to ansible-test. * Enable RHEL 7.3 on Shippable.
This commit is contained in:
parent
941a32a632
commit
4a013d6d69
6 changed files with 51 additions and 9 deletions
|
@ -28,21 +28,39 @@ if [ "${platform}" = "freebsd" ]; then
|
|||
subversion \
|
||||
sudo \
|
||||
zip
|
||||
elif [ "${platform}" = "rhel" ]; then
|
||||
yum update -y
|
||||
|
||||
yum install -y \
|
||||
gcc \
|
||||
git \
|
||||
mercurial \
|
||||
python-devel \
|
||||
python-jinja2 \
|
||||
python-virtualenv \
|
||||
python2-cryptography \
|
||||
rubygems \
|
||||
subversion \
|
||||
unzip \
|
||||
|
||||
pip --version 2>/dev/null || curl --silent --show-error https://bootstrap.pypa.io/get-pip.py | python
|
||||
fi
|
||||
|
||||
pip install virtualenv
|
||||
if [ "${platform}" = "freebsd" ] || [ "${platform}" = "osx" ]; then
|
||||
pip install virtualenv
|
||||
|
||||
# Tests assume loopback addresses other than 127.0.0.1 will work.
|
||||
# Add aliases for loopback addresses used by tests.
|
||||
# Tests assume loopback addresses other than 127.0.0.1 will work.
|
||||
# Add aliases for loopback addresses used by tests.
|
||||
|
||||
for i in 3 4 254; do
|
||||
ifconfig lo0 alias "127.0.0.${i}" up
|
||||
done
|
||||
for i in 3 4 254; do
|
||||
ifconfig lo0 alias "127.0.0.${i}" up
|
||||
done
|
||||
|
||||
ifconfig lo0
|
||||
ifconfig lo0
|
||||
fi
|
||||
|
||||
# Since tests run as root, we also need to be able to ssh to localhost as root.
|
||||
sed -i '' 's/^# *PermitRootLogin.*$/PermitRootLogin yes/;' /etc/ssh/sshd_config
|
||||
sed -i= 's/^# *PermitRootLogin.*$/PermitRootLogin yes/;' /etc/ssh/sshd_config
|
||||
|
||||
if [ "${platform}" = "freebsd" ]; then
|
||||
# Restart sshd for configuration changes and loopback aliases to work.
|
||||
|
@ -65,5 +83,9 @@ fi
|
|||
cat << EOF > ~/.bashrc
|
||||
alias ls='ls -G'
|
||||
export PS1='\[\e]0;\u@\h: \w\a\]\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
cd ~/ansible/
|
||||
EOF
|
||||
|
||||
# Make sure ~/ansible/ is the starting directory for interactive shells.
|
||||
if [ "${platform}" = "osx" ]; then
|
||||
echo "cd ~/ansible/" >> ~/.bashrc
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue