Skip to content
Snippets Groups Projects
Commit d2170ed3 authored by nimrod's avatar nimrod
Browse files

- Moved backports to a seperate role.

parent 79661a14
Branches
No related tags found
No related merge requests found
......@@ -18,7 +18,6 @@ Role Variables
::
extra_tls_certs: [] # List of filenames of TLS certs to be added.
backports: False # To enable Debian backports repos.
ssh_ca: # TBD.
syslog_server: # The address of syslog server to forward.
tls_cert: # Filename of the TLS cert for that host.
......
---
- name: Assert
assert:
that:
- ansible_os_family == 'Debian'
- ansible_distribution_release in [ 'wheezy', 'jessie', 'trusty', 'precise', 'squeeze' ]
- name: Add backports repositories
with_items:
- deb
- deb-src
apt_repository:
repo: '{{ item }} {{ backports_repo[ansible_distribution_release] }}'
state: present
update_cache: yes
- name: Add repo priority pinning
template:
src: backports.j2
dest: /etc/apt/preferences.d/backports
owner: root
group: root
mode: 0o0644
......@@ -5,9 +5,6 @@
assert:
that: ansible_os_family in [ 'Debian', 'OpenBSD' ]
- include: backports.yml
when: backports|default(False) and ansible_os_family == 'Debian' and not common_role_finished is defined
- include: tls_cert.yml
when: tls_cert|default(True) and not common_role_finished is defined
......
Package: *
Pin: release a={{ ansible_distribution_release }}-backports
Pin-Priority: 500
......@@ -8,13 +8,6 @@ debian_suite:
stretch: testing
sid: unstable
backports_repo:
squeeze: http://httpredir.debian.org/debian-backports squeeze-backports main
wheezy: http://httpredir.debian.org/debian wheezy-backports main
jessie: http://httpredir.debian.org/debian jessie-backports main
precise: http://archive.ubuntu.com/ubuntu precise-backports main universe multiverse
trusty: http://archive.ubuntu.com/ubuntu trusty-backports main universe multiverse
ca_store:
OpenBSD: /etc/ssl/cert.pem
Debian: /etc/ssl/certs/ca-certificates.crt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment