DCD-686: Install Postgres only if restoration is required.

This commit is contained in:
Steve Smith
2019-10-10 09:30:45 +11:00
parent 0400d8943d
commit 72659de9ad
3 changed files with 10 additions and 2 deletions

View File

@@ -4,9 +4,7 @@ set -e
source /etc/os-release source /etc/os-release
if [[ $ID = "amzn" ]]; then if [[ $ID = "amzn" ]]; then
amazon-linux-extras enable postgresql9.6
yum install -y \ yum install -y \
postgresql \
python3-devel \ python3-devel \
python3-pip \ python3-pip \
python2-boto3 \ python2-boto3 \

View File

@@ -0,0 +1,7 @@
---
# Amazon Linux 2 supplies extra packages via a special command.
- name: Enable Postgresql from 'extras'
command: amazon-linux-extras install -y "postgresql{{ postgres_version }}"
args:
creates: /usr/bin/psql

View File

@@ -69,4 +69,7 @@
object: "{{ atl_backup_manifest.shared_home_dump | urlsplit('path') }}" object: "{{ atl_backup_manifest.shared_home_dump | urlsplit('path') }}"
dest: "{{ atl_backup_home_dest }}" dest: "{{ atl_backup_home_dest }}"
- name: Install distro-specific restore support packages
include_tasks: "{{ ansible_distribution|lower }}.yml"
when: atl_backup_manifest_url is defined and atl_backup_manifest_url != '' when: atl_backup_manifest_url is defined and atl_backup_manifest_url != ''