mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-14 07:04:27 -04:00
consolidate ansible setup into roles dir
This commit is contained in:
parent
25db6826ec
commit
c55cd46ecb
27 changed files with 763 additions and 91 deletions
42
archivebox/builtin_plugins/ytdlp/install_ytdlp.yml
Executable file
42
archivebox/builtin_plugins/ytdlp/install_ytdlp.yml
Executable file
|
@ -0,0 +1,42 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- name: "Install YT-DLP"
|
||||
hosts: localhost
|
||||
gather_facts: no
|
||||
vars:
|
||||
YTDLP_VERSION_MIN: '2024.8.6'
|
||||
tasks:
|
||||
- include_role:
|
||||
name: setup_lib_pip
|
||||
vars:
|
||||
MIN_PYTHON_VERSION: '3.10.0'
|
||||
MIN_PIP_VERSION: '22.0'
|
||||
|
||||
- name: "Install pip packages: {{install_pip}}"
|
||||
ansible.builtin.pip:
|
||||
name: 'yt-dlp'
|
||||
state: "present"
|
||||
virtualenv: '{{BINPROVIDERS.pip.virtualenv}}'
|
||||
virtualenv_python: "{{BINPROVIDERS.pip.virtualenv_python}}"
|
||||
virtualenv_site_packages: yes
|
||||
|
||||
- name: Load YTDLP binary
|
||||
import_role:
|
||||
name: load_binary
|
||||
vars:
|
||||
name: ytdlp
|
||||
|
||||
- name: Load ffmpeg binary
|
||||
import_role:
|
||||
name: load_binary
|
||||
vars:
|
||||
name: ffmpeg
|
||||
version_cmd: 'ffmpeg -version'
|
||||
|
||||
- name: Check that installed YT-DLP matches expected version
|
||||
assert:
|
||||
that: BINARIES.ytdlp.version is version(YTDLP_VERSION_MIN, '>=')
|
||||
quiet: true
|
||||
|
||||
- debug:
|
||||
msg: "{{ {'BINARIES': BINARIES, 'BINPROVIDERS': BINPROVIDERS} }}"
|
1
archivebox/builtin_plugins/ytdlp/roles
Symbolic link
1
archivebox/builtin_plugins/ytdlp/roles
Symbolic link
|
@ -0,0 +1 @@
|
|||
../ansible/roles
|
Loading…
Add table
Add a link
Reference in a new issue