feat(archive): make resource name the target path (#82)

* feat(archive): add destname pillar value for binary archive
This commit is contained in:
Michael Schmitt 2022-04-28 15:38:41 -06:00 committed by GitHub
parent 5465d4adb2
commit 9390741d5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

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

View file

@ -141,6 +141,7 @@ packages:
# yamllint enable rule:line-length
kubectl:
dest: /usr/local/bin
destname: kubectl # optional destination filename
dl:
format: bin
# yamllint disable-line rule:line-length