mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
DCD-686: Amazon Linux 2 has updated its Ansible packages so we can remove pipenv from the installation phase.
This commit is contained in:
@@ -14,9 +14,8 @@ source $ENV_FILE
|
||||
set +a
|
||||
|
||||
# Use Ansible from virtualenv if provided
|
||||
pipenv run \
|
||||
ansible-playbook -v \
|
||||
$ATL_DEPLOYMENT_REPOSITORY_CUSTOM_PARAMS \
|
||||
-i $INV \
|
||||
$PLAYBOOK \
|
||||
2>&1 | tee --append $LOG_FILE
|
||||
ansible-playbook -v \
|
||||
$ATL_DEPLOYMENT_REPOSITORY_CUSTOM_PARAMS \
|
||||
-i $INV \
|
||||
$PLAYBOOK \
|
||||
2>&1 | tee --append $LOG_FILE
|
||||
|
||||
@@ -2,24 +2,13 @@
|
||||
|
||||
set -e
|
||||
|
||||
# The Amazon Linux 2 Ansible package is 2.4, which has issue
|
||||
# interacting with RDS, so use pipenv to install a known-good version.
|
||||
# Another alternative here would be nix, however that has issues
|
||||
# installing as root, and can be slow in practice.
|
||||
|
||||
# Luckily AmazonLinux2 and Ubuntu use the same package name for
|
||||
# pip. This may need some logic if other distros are added. Note:
|
||||
# Parsing /etc/os-release is probably a good starting point for that.
|
||||
#
|
||||
# Additionally we need to install boto3 and botocore, as the Ansible
|
||||
# AWS modules manage to escape the virtualenv and invoke the native python.
|
||||
# Amazon Linux 2 packages Ansible separately, so enable the repo
|
||||
. /etc/os-release
|
||||
if [[ $ID == 'amzn' ]]; then
|
||||
amazon-linux-extras enable ansible2
|
||||
fi
|
||||
|
||||
./bin/pacapt install --noconfirm \
|
||||
python-pip \
|
||||
ansible \
|
||||
python-boto3 \
|
||||
python-botocore
|
||||
export PATH=$PATH:/usr/local/bin
|
||||
|
||||
# See Pipfile and Pipfile.lock.
|
||||
pip install pipenv
|
||||
pipenv sync
|
||||
|
||||
Reference in New Issue
Block a user