Skip to content

Commit

Permalink
Fix issues with apt-key and Deadsnakes repo on 14.04.
Browse files Browse the repository at this point in the history
  • Loading branch information
BusterNeece committed Aug 18, 2017
1 parent 503daea commit e9d1943
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions install.sh
Expand Up @@ -23,9 +23,9 @@ if [ "" == "$PKG_OK" ]; then
sudo apt-get install -q -y software-properties-common
sudo add-apt-repository -y ppa:ansible/ansible

if [ $DISTRIB_RELEASE = "14.04" ]; then
sudo add-apt-repository -y ppa:fkrull/deadsnakes-python2.7
fi
# if [ $DISTRIB_RELEASE = "14.04" ]; then
# sudo add-apt-repository -y ppa:fkrull/deadsnakes-python2.7
# fi

sudo apt-get update
sudo apt-get install -q -y python2.7 python-pip python-mysqldb ansible
Expand Down
10 changes: 7 additions & 3 deletions util/ansible/roles/mariadb/tasks/main.yml
Expand Up @@ -3,13 +3,17 @@
template: src=mariadb_ubuntu.list.j2 dest=/etc/apt/sources.list.d/mariadb.list owner=root group=root mode=0644
register: mariadb_list

- name: Add repo key
- name: Add repo key (Xenial)
apt_key: url=http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF1656F24C74CD1D8 state=present
register: mariadb_key
when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'xenial'

- name: Add repo key (Trusty)
apt_key: url=http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xCBCB082A1BB943DB state=present
when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'trusty'

- name: Update apt cache
apt: update_cache=yes
when: mariadb_list.changed == True or mariadb_key.changed == True
when: mariadb_list.changed == True

- name: Unattended package installation
shell: export DEBIAN_FRONTEND=noninteractive
Expand Down

0 comments on commit e9d1943

Please sign in to comment.