more ansible fixes

This commit is contained in:
Nick Sweeting 2024-09-17 01:12:49 -07:00
parent c55cd46ecb
commit 5c0aa6fe59
No known key found for this signature in database
15 changed files with 63 additions and 617 deletions

View file

@ -1 +0,0 @@
../../playbooks/install_singlefile.yml

View file

@ -0,0 +1,40 @@
#!/usr/bin/env ansible-playbook
---
- import_playbook: ../puppeteer/install_puppeteer.yml
when: not BINARIES.chrome.version|default('')
- name: "Install Singlefile"
hosts: localhost
gather_facts: no
vars:
SINGLEFILE_VERSION_EXACT: '1.1.54'
tasks:
- include_role:
name: setup_lib_npm
vars:
MIN_NODE_VERSION: '20.0.0'
MIN_NPM_VERSION: '10.0.0'
- name: "Install npm packages: [single-file-cli]"
community.general.npm:
name: 'single-file-cli@1.1.54'
state: "present"
path: '{{BINPROVIDERS.npm.root_path}}'
- name: Load single-file binary from installed NPM package
include_role:
name: load_binary
vars:
name: singlefile
bin_name: 'single-file'
version_cmd: 'single-file --version'
PATH: '{{BINPROVIDERS.npm.PATH}}'
- 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} }}"