2015-10-05 21:46:36 +02:00
|
|
|
---
|
|
|
|
# Fixing all the stuff around repositories.
|
|
|
|
|
|
|
|
# Provide a clean and ordered sources.list
|
2016-09-22 00:16:49 +02:00
|
|
|
- name: Change main repositories
|
|
|
|
get_url:
|
|
|
|
url: "http://{{ ansible_local.domain.serverfqdn }}/ks/repoconfig/sources.list"
|
2015-10-05 21:46:36 +02:00
|
|
|
dest: /etc/apt/sources.list
|
2016-10-03 21:56:18 +02:00
|
|
|
force: yes
|
2015-10-05 21:46:36 +02:00
|
|
|
|
2017-02-10 22:48:26 +01:00
|
|
|
- name: Checking for libreoffice PPA GPG key
|
|
|
|
shell: apt-key list | grep -q 1378B444
|
|
|
|
register: check_gpg_libreoffice
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- name: Installing libreoffice PPA GPG key
|
|
|
|
shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 1378B444
|
2019-11-18 22:49:41 +01:00
|
|
|
when: check_gpg_libreoffice is failed
|
2017-02-10 22:48:26 +01:00
|
|
|
|
|
|
|
- name: Checking for ansible PPA GPG key
|
|
|
|
shell: apt-key list | grep -q 7BB9C367
|
|
|
|
register: check_gpg_ansible
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- name: Installing ansible PPA GPG key
|
|
|
|
shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 7BB9C367
|
2019-11-18 22:49:41 +01:00
|
|
|
when: check_gpg_ansible is failed
|
2017-02-10 22:48:26 +01:00
|
|
|
|
2017-02-20 23:28:43 +01:00
|
|
|
- name: Checking for epoptes PPA GPG key
|
|
|
|
shell: apt-key list | grep -q 0350B375
|
|
|
|
register: check_gpg_epoptes
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- name: Installing epoptes PPA GPG key
|
|
|
|
shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 0350B375
|
2019-11-18 22:49:41 +01:00
|
|
|
when: check_gpg_epoptes is failed
|
2017-02-20 23:28:43 +01:00
|
|
|
|
2017-02-10 22:48:26 +01:00
|
|
|
- name: Checking for geogebra GPG key
|
|
|
|
shell: apt-key list | grep -q 83A736CF
|
|
|
|
register: check_gpg_geogebra
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- name: Installing geogebra GPG key
|
|
|
|
shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 83A736CF
|
2019-11-18 22:49:41 +01:00
|
|
|
when: check_gpg_geogebra is failed
|
2017-02-10 22:48:26 +01:00
|
|
|
|
2017-02-20 23:28:43 +01:00
|
|
|
- name: Removing old repositories (if present)
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: absent
|
|
|
|
with_items:
|
|
|
|
- ansible.list
|
|
|
|
- geogebra.list
|
|
|
|
- libreoffice.list
|
|
|
|
|
2016-09-22 00:16:49 +02:00
|
|
|
- name: Adding additional repositories
|
|
|
|
get_url:
|
2016-09-23 00:43:11 +02:00
|
|
|
url: "http://{{ ansible_local.domain.serverfqdn }}/ks/repoconfig/{{ item }}"
|
2016-09-22 00:16:49 +02:00
|
|
|
dest: "/etc/apt/sources.list.d/{{ item }}"
|
2016-10-03 21:56:18 +02:00
|
|
|
force: yes
|
2016-09-22 00:16:49 +02:00
|
|
|
with_items:
|
|
|
|
- ansible-ansible-trusty.list
|
|
|
|
- libreoffice-ppa-trusty.list
|
2017-02-20 23:28:43 +01:00
|
|
|
- epoptes-ppa-trusty.list
|
2017-02-10 22:48:26 +01:00
|
|
|
- geogebra-stable.list
|
2016-09-22 00:16:49 +02:00
|
|
|
- bglug-trusty.list
|
2015-10-05 21:46:36 +02:00
|
|
|
|
2016-09-22 00:16:49 +02:00
|
|
|
- name: Updating package database
|
|
|
|
apt: update_cache=yes
|