Files
ArchiveBox/archivebox/playbooks/install_singlefile.yml
2024-09-13 04:55:40 -07:00

35 lines
899 B
YAML

---
- import_playbook: install_npm.yml
vars:
install_npm:
singlefile: {packages: ['single-file-cli@1.1.54']}
state: 'present'
- import_playbook: load_binaries.yml
vars:
load_binaries:
singlefile: {bin_name: 'single-file', version_cmd: 'single-file --version', PATH: '{{BINPROVIDERS.npm.PATH}}'}
- name: "Install Singlefile"
hosts: localhost
gather_facts: no
vars:
SINGLEFILE_VERSION_EXACT: '1.1.54'
tasks:
- name: Make sure Node and NPM are installed
assert:
that:
- BINARIES.node.version
- BINARIES.npm.version
quiet: true
- name: Check that installed Singlefile version matches expected version
assert:
that: SINGLEFILE_VERSION_EXACT is version(BINARIES.singlefile.version, '==')
quiet: true
- debug:
msg: "{{ {'BINARIES': BINARIES, 'BINPROVIDERS': BINPROVIDERS} }}"