added ytdlp state

This commit is contained in:
Paul 2022-04-17 20:27:57 +02:00
parent 1b95933c09
commit 12c2d1dc63
3 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,4 @@
---
ytdlp:
install_dir: /usr/bin
version: 2022.04.08

11
states/ytdlp/init.sls Normal file
View File

@ -0,0 +1,11 @@
---
{%- from "ytdlp/map.jinja" import ytdlp with context %}
ytdlp-bin:
file.managed:
- name: {{ ytdlp.install_dir }}/yt-dlp
- source: https://github.com/yt-dlp/yt-dlp/releases/download/{{ ytdlp.version }}/yt-dlp
- user: root
- group: root
- mode: 0775
- template: jinja
- skip_verify: true

3
states/ytdlp/map.jinja Normal file
View File

@ -0,0 +1,3 @@
{%- import_yaml "ytdlp/defaults.yaml" as defaults %}
{%- set ytdlp = salt['pillar.get']('ytdlp', default=defaults.ytdlp, merge=True) %}