Fixing the blender.org blocking Python http lib issue
This commit is contained in:
+9
-9
@@ -1,13 +1,13 @@
|
|||||||
{% from "blender/map.jinja" import blender with context %}
|
{% from "blender/map.jinja" import blender with context %}
|
||||||
|
|
||||||
# 1. Download tarball to minion's local cache/tmp directory with custom User-Agent
|
# 1. Download tarball via system curl to preserve User-Agent across redirects
|
||||||
blender_download_tarball:
|
blender_download_tarball:
|
||||||
file.managed:
|
cmd.run:
|
||||||
- name: /var/tmp/blender-{{ blender.version }}-linux-x64.tar.xz
|
- name: |
|
||||||
- source: {{ blender.download_url }}
|
curl -sSL -A "Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0" \
|
||||||
- skip_verify: True
|
-o /var/tmp/blender-{{ blender.version }}-linux-x64.tar.xz \
|
||||||
- http_headers:
|
{{ blender.download_url }}
|
||||||
User-Agent: 'Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0'
|
- creates: /var/tmp/blender-{{ blender.version }}-linux-x64.tar.xz
|
||||||
- unless:
|
- unless:
|
||||||
- test -d {{ blender.archive_dir }}
|
- test -d {{ blender.archive_dir }}
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ blender_extract_tarball:
|
|||||||
- options: '--strip-components=1'
|
- options: '--strip-components=1'
|
||||||
- if_missing: {{ blender.archive_dir }}/blender
|
- if_missing: {{ blender.archive_dir }}/blender
|
||||||
- require:
|
- require:
|
||||||
- file: blender_download_tarball
|
- cmd: blender_download_tarball
|
||||||
|
|
||||||
# 3. Maintain generic symlink pointing to active version
|
# 3. Maintain generic symlink pointing to active version
|
||||||
blender_opt_symlink:
|
blender_opt_symlink:
|
||||||
@@ -56,7 +56,7 @@ blender_desktop_entry:
|
|||||||
- require:
|
- require:
|
||||||
- file: blender_opt_symlink
|
- file: blender_opt_symlink
|
||||||
|
|
||||||
# 6. Optional: Clean up cached tarball after extraction
|
# 6. Clean up cached tarball after extraction
|
||||||
blender_cleanup_tarball:
|
blender_cleanup_tarball:
|
||||||
file.absent:
|
file.absent:
|
||||||
- name: /var/tmp/blender-{{ blender.version }}-linux-x64.tar.xz
|
- name: /var/tmp/blender-{{ blender.version }}-linux-x64.tar.xz
|
||||||
|
|||||||
Reference in New Issue
Block a user