diff --git a/README.rst b/README.rst index a16936f6ec98ce0be1daaf822a19b8ec74e33060..8315d88c221d0eee23d0e5325b1a26cf74b4f9d3 100644 --- a/README.rst +++ b/README.rst @@ -2,8 +2,8 @@ Ansible-common ############## An Ansible role with common tasks that ran on all (or most) hosts. -The tls_key_path and tls_cert_path facts are added to point to the path of the -host's key and cert. +The tls_key_path, tls_cert_path and tls_ca_cert_path facts are added to point to +the path of the host's key and cert. Requirements ------------ @@ -84,9 +84,8 @@ TODO - Implement: - add_tls_cert (Debian works, OpenBSD has no mechannism). - - debian_backports (add Ubuntu, priority support). - collectd_agent. - - init. + - init (via module). - ldap_login (with pam_mkhomedir). - ntp. - mail_forward (OpenBSD support?). diff --git a/tasks/backports.yml b/tasks/backports.yml index 425a69b77fb3307b9d833b152b9b6a34fddd27e2..b3fd357d83871cb3c698310b665f6e1a1f699b79 100644 --- a/tasks/backports.yml +++ b/tasks/backports.yml @@ -14,7 +14,6 @@ update_cache: yes - name: Add repo priority pinning - when: backports_priority is defined template: src: backports.j2 dest: /etc/apt/preferences.d/backports diff --git a/tasks/main.yml b/tasks/main.yml index 68e398289056e12e2bb06a9d52fe07bb0652acaf..8d31a1fa4754133d70e4244569f18b00ee0af46d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -9,7 +9,7 @@ when: ansible_os_family == 'Debian' and not common_role_finished is defined - include: backports.yml - when: backports|default(False) and ansible_distribution == 'Debian'and common_role_finished is defined + when: backports|default(False) and ansible_os_family == 'Debian' and not common_role_finished is defined - include: add_repo.yml when: ansible_distribution == 'Debian' and extra_repos is defined and not common_role_finished is defined diff --git a/templates/backports.j2 b/templates/backports.j2 index 880cff4a26e8536caaca88df9fd51b66c2d5ef46..8519453ad63f6ec24e586153de5d98ae2208d270 100644 --- a/templates/backports.j2 +++ b/templates/backports.j2 @@ -1 +1,3 @@ -{# assume backports_priority is defined #} +Package: * +Pin: release a={{ ansible_distribution_release }}-backports +Pin-Priority: 500 diff --git a/vars/main.yml b/vars/main.yml index c1824e9f4844be7307f88f8fdf8b8132997fe51f..466d35218eb5814a751667fbf86ac17575b9a4e5 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -12,6 +12,8 @@ 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 debian_init: 'systemd-sysv': systemd