Support macOS 10.15 for ansible-test --remote.

Use of this new version is experimental, so it is not enabled in CI yet.
This commit is contained in:
Matt Clay 2020-08-27 12:08:38 -07:00
parent d6fe849b2e
commit 2bbcbe99fd
5 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Add ``macos/10.15`` as a supported value for the ``--remote`` option.

View file

@ -1,6 +1,7 @@
freebsd/11.1 python=2.7,3.6 python_dir=/usr/local/bin
freebsd/12.1 python=3.6,2.7 python_dir=/usr/local/bin
osx/10.11 python=2.7 python_dir=/usr/local/bin
macos/10.15 python=3.8 python_dir=/usr/local/bin
rhel/7.6 python=2.7
rhel/7.8 python=2.7
rhel/8.1 python=3.6

View file

@ -88,6 +88,14 @@ elif [ "${platform}" = "centos" ]; then
done
install_pip
elif [ "${platform}" = "macos" ]; then
while true; do
pip3 install --disable-pip-version-check --quiet \
'virtualenv<20' \
&& break
echo "Failed to install packages. Sleeping before trying again..."
sleep 10
done
elif [ "${platform}" = "osx" ]; then
while true; do
pip install --disable-pip-version-check --quiet \
@ -148,4 +156,7 @@ EOF
# Make sure ~/ansible/ is the starting directory for interactive shells.
if [ "${platform}" = "osx" ]; then
echo "cd ~/ansible/" >> ~/.bashrc
elif [ "${platform}" = "macos" ] ; then
echo "export BASH_SILENCE_DEPRECATION_WARNING=1" >> ~/.bashrc
echo "cd ~/ansible/" >> ~/.bashrc
fi

View file

@ -111,6 +111,7 @@ class AnsibleCoreCI:
'centos arch=power', # avoid ibmvpc as default for no-arch centos to avoid making centos default to power
),
parallels=(
'macos',
'osx',
),
)

View file

@ -211,6 +211,8 @@ class ManagePosixCI:
self.become = ['sudo', '-in', 'sh', '-c']
else:
raise NotImplementedError('provider %s has not been implemented' % self.core_ci.provider)
elif self.core_ci.platform == 'macos':
self.become = ['sudo', '-in', 'PATH=/usr/local/bin:$PATH', 'sh', '-c']
elif self.core_ci.platform == 'osx':
self.become = ['sudo', '-in', 'PATH=/usr/local/bin:$PATH']
elif self.core_ci.platform == 'rhel' or self.core_ci.platform == 'centos':