Fix resource name to avoid conflicting IDtags/v0.7.0
remove_sources_list: true | remove_sources_list: true | ||||
clean_sources_list_d: true | clean_sources_list_d: true | ||||
repositories: | repositories: | ||||
debian-jessie-source: | |||||
debian-jessie: | |||||
distro: jessie | distro: jessie | ||||
url: http://httpredir.debian.org/debian | url: http://httpredir.debian.org/debian | ||||
type: [source] | type: [source] | ||||
comps: [main, contrib, non-free] | comps: [main, contrib, non-free] | ||||
dropbox-repo: | |||||
dropbox: | |||||
distro: jessie | distro: jessie | ||||
url: http://linux.dropbox.com/debian | url: http://linux.dropbox.com/debian | ||||
arch: [i386, amd64] | arch: [i386, amd64] |
{%- for type in args.type|d(['binary']) %} | {%- for type in args.type|d(['binary']) %} | ||||
{%- set r_type = 'deb-src' if type == 'source' else 'deb' %} | {%- set r_type = 'deb-src' if type == 'source' else 'deb' %} | ||||
{{ repo }}: | |||||
{{ repo }}{{ type }}: | |||||
pkgrepo.managed: | pkgrepo.managed: | ||||
- name: {{ r_type }} {{ r_arch }} {{ r_url }} {{ r_distro }} {{ r_comps }} | - name: {{ r_type }} {{ r_arch }} {{ r_url }} {{ r_distro }} {{ r_comps }} | ||||
- file: {{ sources_list_dir }}/{{ repo }}.list | |||||
- file: {{ sources_list_dir }}/{{ repo }}-{{ type }}.list | |||||
{# You can use either keyid+keyserver or key_url. If both are provided | {# You can use either keyid+keyserver or key_url. If both are provided | ||||
the latter will be used. #} | the latter will be used. #} | ||||
{% if args.key_url is defined %} | {% if args.key_url is defined %} |
its(:content) { should match('deb-src http://httpredir.debian.org/debian jessie contrib non-free main') } | its(:content) { should match('deb-src http://httpredir.debian.org/debian jessie contrib non-free main') } | ||||
end | end | ||||
describe file('/etc/apt/sources.list.d/dropbox-repo.list') do | |||||
describe file('/etc/apt/sources.list.d/dropbox-binary.list') do | |||||
it { should exist } | it { should exist } | ||||
it { should be_mode 644 } | it { should be_mode 644 } | ||||
it { should be_owned_by 'root' } | it { should be_owned_by 'root' } |