feat(archive): make resource name the target path

This commit is contained in:
Michael Schmitt 2021-10-20 22:07:46 -06:00
parent 2bb9f283e5
commit ccfd42f7ee
No known key found for this signature in database
GPG key ID: 5145CC5841E00C15
2 changed files with 9 additions and 3 deletions

View file

@ -26,7 +26,11 @@ packages-archive-unwanted-{{ file_or_directory }}:
# wanted 'archive' software
{%- for package, archive in wanted_archives.items() %}
{%- set archivename = archive.dl.source.split('/')[-1] %}
{%- if archive.dl.format in ('bin',) %}
{%- set archivename = package %}
{%- else %}
{%- set archivename = archive.dl.source.split('/')[-1] %}
{%- endif %}
packages-archive-wanted-target-{{ package }}-directory:
file.directory:

View file

@ -146,12 +146,14 @@ packages:
# yamllint disable-line rule:line-length
source: https://raw.githubusercontent.com/openstack/cinder/master/contrib/block-box/docker-compose.yml
hashsum: 1751f8e4f6b4cddd8c4843a0f4473274
kubectl:
# If the format is "bin", the resource name will be used as the filename.
# Thus, the following block creates /usr/local/bin/yq
yq:
dest: /usr/local/bin
dl:
format: bin
# yamllint disable-line rule:line-length
source: https://storage.googleapis.com/kubernetes-release/release/v1.12.0/bin/darwin/amd64/kubectl
source: https://github.com/mikefarah/yq/releases/download/v4.13.4/yq_linux_amd64
unwanted:
- /usr/local/boring_archive_software