Use apt_repository module instead of handling apt-get update ourself
The apt_repository module already handles apt-get updating after install of a repo, so use that instead of handling it ourself. Also, ansible-lint didn't like our approach. The change also requires Ansible >= 2.1 due to the filename option to apt_repository.master
parent
b6b4e312b1
commit
c5317f1bca
@ -1,2 +0,0 @@
|
||||
deb http://ftp.de.debian.org/debian jessie-backports main
|
||||
deb-src http://ftp.de.debian.org/debian jessie-backports main
|
@ -1,7 +1,9 @@
|
||||
- name: install jessie-backports apt list
|
||||
copy: src=jessie-backports.list dest=/etc/apt/sources.list.d/
|
||||
register: jessie_backports_list
|
||||
apt_repository:
|
||||
filename: jessie-backports
|
||||
repo: "deb http://ftp.de.debian.org/debian jessie-backports main"
|
||||
|
||||
- name: apt-get update
|
||||
apt: update_cache=yes
|
||||
when: jessie_backports_list|changed
|
||||
- name: install jessie-backports sources apt list
|
||||
apt_repository:
|
||||
filename: jessie-backports
|
||||
repo: "deb-src http://ftp.de.debian.org/debian jessie-backports main"
|
||||
|
Loading…
Reference in New Issue