summaryrefslogtreecommitdiff
path: root/roles/apt-repo/backports/tasks/main.yml
blob: a18f9a1db28206b4c8433e112c8851efe33857c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
---
- name: add repository entry
  copy:
    content: |
      deb http://{{ apt_repo_providers[apt_repo_provider][(ansible_distribution | lower)].host }}{{ apt_repo_providers[apt_repo_provider][(ansible_distribution | lower)].path }} {{ ansible_distribution_release }}-backports {{ apt_repo_components | default(apt_repo_backports_components[(ansible_distribution | lower)]) | join(' ') }}
    dest: /etc/apt/sources.list.d/backports.list
  register: apt_repo_backports_sources

- name: update apt cache
  when: apt_repo_backports_sources is changed
  command: apt-get update
  args:
    warn: false