added ytdlp state
This commit is contained in:
parent
1b95933c09
commit
12c2d1dc63
4
states/ytdlp/defaults.yaml
Normal file
4
states/ytdlp/defaults.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
ytdlp:
|
||||||
|
install_dir: /usr/bin
|
||||||
|
version: 2022.04.08
|
11
states/ytdlp/init.sls
Normal file
11
states/ytdlp/init.sls
Normal 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
3
states/ytdlp/map.jinja
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{%- import_yaml "ytdlp/defaults.yaml" as defaults %}
|
||||||
|
|
||||||
|
{%- set ytdlp = salt['pillar.get']('ytdlp', default=defaults.ytdlp, merge=True) %}
|
Loading…
Reference in New Issue
Block a user