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:
- 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 }}:
file.absent:
@ -79,18 +79,15 @@ packages-archive-wanted-install-{{ package }}:
- options: {{ archive.options }}
- enforce_toplevel: {{ 'False' if 'strip-components' in archive.options else 'True' }}
{%- endif %}
- unless: test -d {{ archive.dest }}
- onlyif: test -d {{ archive.dest }}
- require:
- packages-archive-wanted-download-{{ package }}
- module: packages-archive-wanted-{{ package }}-check-hashsum
- require_in:
- packages-archive-wanted-cleanup-{{ package }}
packages-archive-wanted-cleanup-{{ package }}:
file.absent:
- name: {{ packages.tmpdir }}/{{ archivename }}
- onchanges:
- packages-archive-wanted-install-{{ package }}
- archive: packages-archive-wanted-install-{{ package }}
{%- else %}

View file

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

View file

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