Commit b8ed4f49 by Ned Batchelder

We need a custom edX PPA for all versions of Debian

parent fb34593d
......@@ -52,25 +52,22 @@
when: ansible_distribution in common_debian_variants
# Ensure that we get the latest version of python 2.7
- name: add edx ppa apt key
# Ensure that we can install old software if need be.
- name: Add edX PPA apt key
apt_key:
id: "{{ COMMON_EDX_PPA_KEY_ID }}"
keyserver: "{{ COMMON_EDX_PPA_KEY_SERVER }}"
state: "present"
when: >
ansible_distribution in common_debian_variants and
ansible_distribution_release in common_custom_ppa_releases
ansible_distribution in common_debian_variants
- name: Add custom edX PPA
# Ensure that we get a current version of Git and latest version of python 2.7
# GitHub requires version 1.7.10 or later
# https://help.github.com/articles/https-cloning-errors
# Ensure that we get the latest version of python 2.7
# MySQL 5.6 is from our own PPA: https://bugs.mysql.com/bug.php?id=84848
apt_repository:
repo: "{{ COMMON_EDX_PPA }}"
when: >
ansible_distribution in common_debian_variants and
ansible_distribution_release in common_custom_ppa_releases
ansible_distribution in common_debian_variants
- name: Install role-independent useful system packages
......@@ -89,10 +86,10 @@
install_recommends: yes
state: present
update_cache: yes
with_items: "{{ common_custom_debian_pkgs }}"
with_items: "{{ old_python_debian_pkgs }}"
when: >
ansible_distribution in common_debian_variants and
ansible_distribution_release in common_custom_ppa_releases
ansible_distribution_release in old_python_ppa_releases
- name: Install role-independent useful system packages
yum:
......
......@@ -119,7 +119,7 @@ common_debian_pkgs:
- python2.7-dev
# Packages that should be installed from our custom PPA, i.e. COMMON_EDX_PPA
common_custom_debian_pkgs:
old_python_debian_pkgs:
- "python2.7=2.7.10-0+{{ ansible_distribution_release }}1"
common_pip_pkgs:
......@@ -153,8 +153,8 @@ common_debian_variants:
- Ubuntu
- Debian
# Only attempt to use our custom PPA for these releases
common_custom_ppa_releases:
# We only have to install old Python for these releases:
old_python_ppa_releases:
- precise
- trusty
......
......@@ -107,13 +107,9 @@ apt-get install -y software-properties-common python-software-properties
# Add git PPA
add-apt-repository -y ppa:git-core/ppa
# For older distributions we need to install a PPA for Python 2.7.10
if [[ "precise" = "${SHORT_DIST}" || "trusty" = "${SHORT_DIST}" ]]; then
# Add python PPA
apt-key adv --keyserver "${EDX_PPA_KEY_SERVER}" --recv-keys "${EDX_PPA_KEY_ID}"
add-apt-repository -y "${EDX_PPA}"
fi
# For older software we need to install our own PPA.
apt-key adv --keyserver "${EDX_PPA_KEY_SERVER}" --recv-keys "${EDX_PPA_KEY_ID}"
add-apt-repository -y "${EDX_PPA}"
# Install python 2.7 latest, git and other common requirements
# NOTE: This will install the latest version of python 2.7 and
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment