Minor fixes to archives state

This commit is contained in:
N 2018-12-03 14:06:46 +00:00
parent 46b2e1fda9
commit e0d5304648
No known key found for this signature in database
GPG key ID: 93AFB6C0144D1A90
3 changed files with 5 additions and 8 deletions

View file

@ -39,7 +39,7 @@ packages-archive-wanted-target-{{ package }}-directory:
- require_in: - require_in:
- packages-archive-wanted-download-{{ package }} - packages-archive-wanted-download-{{ package }}
{%- if 'format' in archive.dl.format and archive.dl.format in packages.archives.types %} {%- if 'format' in archive.dl and archive.dl.format in packages.archives.types %}
packages-archive-wanted-remove-prev-{{ package }}: packages-archive-wanted-remove-prev-{{ package }}:
file.absent: file.absent:
@ -79,18 +79,15 @@ packages-archive-wanted-install-{{ package }}:
- options: {{ archive.options }} - options: {{ archive.options }}
- enforce_toplevel: {{ 'False' if 'strip-components' in archive.options else 'True' }} - enforce_toplevel: {{ 'False' if 'strip-components' in archive.options else 'True' }}
{%- endif %} {%- endif %}
- unless: test -d {{ archive.dest }} - onlyif: test -d {{ archive.dest }}
- require: - require:
- packages-archive-wanted-download-{{ package }} - packages-archive-wanted-download-{{ package }}
- module: packages-archive-wanted-{{ package }}-check-hashsum
- require_in:
- packages-archive-wanted-cleanup-{{ package }}
packages-archive-wanted-cleanup-{{ package }}: packages-archive-wanted-cleanup-{{ package }}:
file.absent: file.absent:
- name: {{ packages.tmpdir }}/{{ archivename }} - name: {{ packages.tmpdir }}/{{ archivename }}
- onchanges: - onchanges:
- packages-archive-wanted-install-{{ package }} - archive: packages-archive-wanted-install-{{ package }}
{%- else %} {%- else %}

View file

@ -36,7 +36,7 @@ packages:
archives: archives:
pkgs: pkgs:
required: ['curl', 'bzip2', 'gzip'] required: ['curl', 'bzip2', 'gzip']
types: ('tar','zip', 'rar',) types: ('tar', 'zip', 'rar',)
wanted: {} #note: dict wanted: {} #note: dict
unwanted: [] unwanted: []
required: required:

View file

@ -9,7 +9,7 @@ control 'Archive packages' do
%w( %w(
docker-compose.yml docker-compose.yml
phantomjs-2.1.1-linux-x86_64.tar.bz2 phantomjs-2.1.1-linux-x86_64/bin
).each do |f| ).each do |f|
describe file("/usr/local/src/#{f}") do describe file("/usr/local/src/#{f}") do
it { should exist } it { should exist }