Loading sources files from server and not creating it locally. Templates for sources files are regenerated by server.

This commit is contained in:
Emiliano Vavassori 2016-09-22 00:16:49 +02:00
parent 49a46ed02c
commit 9d9a8b39d3
5 changed files with 13 additions and 99 deletions

View File

@ -1,20 +0,0 @@
---
# Manage Repository changes (but only for physical machines)
- name: Change repository sources
template:
src: sources.list
dest: /etc/apt/sources.list
when: ansible_product_name != "VirtualBox"
- name: Adding/changing ansible ppa local mirror
get_url:
url: "http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-ansible-trusty.list"
dest: /etc/apt/sources.list.d/ansible-ansible-trusty.list
owner: root
group: root
mode: 0644
when: ansible_product_name != "VirtualBox"
- name: Updating package database
apt: update_cache=yes

View File

@ -5,11 +5,6 @@
# Requires fact execpath, already set by prereq role.
- include: apt-sources.yml
tags:
- base
- apt-sources
- include: virtualbox-guest-addons.yml
tags:
- base

View File

@ -1,2 +0,0 @@
deb http://{{ execpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
# deb-src http://{{ execpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main

View File

@ -1,56 +0,0 @@
#deb cdrom:[Edubuntu 14.04 LTS _Trusty Tahr_ - Release i386 (20140417)]/ trusty main multiverse restricted universe
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://{{ execpath }}archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://{{ execpath }}archive.ubuntu.com/ubuntu/ trusty main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://{{ execpath }}archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://{{ execpath }}archive.ubuntu.com/ubuntu/ trusty-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://{{ execpath }}archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://{{ execpath }}archive.ubuntu.com/ubuntu/ trusty universe
deb http://{{ execpath }}archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://{{ execpath }}archive.ubuntu.com/ubuntu/ trusty-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://{{ execpath }}archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://{{ execpath }}archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://{{ execpath }}archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://{{ execpath }}archive.ubuntu.com/ubuntu/ trusty-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://{{ execpath }}archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://{{ execpath }}archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://{{ execpath }}security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://{{ execpath }}security.ubuntu.com/ubuntu trusty-security main restricted
deb http://{{ execpath }}security.ubuntu.com/ubuntu trusty-security universe
deb-src http://{{ execpath }}security.ubuntu.com/ubuntu trusty-security universe
deb http://{{ execpath }}security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://{{ execpath }}security.ubuntu.com/ubuntu trusty-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://{{ execpath }}archive.canonical.com/ubuntu trusty partner
# deb-src http://{{ execpath }}archive.canonical.com/ubuntu trusty partner
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://{{ execpath }}extras.ubuntu.com/ubuntu trusty main
deb-src http://{{ execpath }}extras.ubuntu.com/ubuntu trusty main

View File

@ -2,22 +2,19 @@
# Fixing all the stuff around repositories.
# Provide a clean and ordered sources.list
- name: Replace sources.list with a clean one.
template:
src: sources.list
- name: Change main repositories
get_url:
url: "http://{{ ansible_local.domain.serverfqdn }}/ks/repoconfig/sources.list"
dest: /etc/apt/sources.list
- name: Adding Ansible repo
template:
src: ansible.list
dest: /etc/apt/sources.list.d/ansible.list
- name: Adding additional repositories
get_url:
src: "http://{{ ansible_local.domain.serverfqdn }}/ks/repoconfig/{{ item }}"
dest: "/etc/apt/sources.list.d/{{ item }}"
with_items:
- ansible-ansible-trusty.list
- libreoffice-ppa-trusty.list
- bglug-trusty.list
- name: Adding LibreOffice repo
template:
src: libreoffice.list
dest: /etc/apt/sources.list.d/libreoffice.list
- name: Adding BgLUG repo
template:
src: bglug.list
dest: /etc/apt/sources.list.d/bglug.list
- name: Updating package database
apt: update_cache=yes