Use slurp module to fetch remote file content
The slurp module will fetch as b64 the content of remote file. Using slurp allows working in relative path like other modules, instead of trying absolute paths in a lookup. Change-Id: I773819d1d17fb6faaedacf73dea8f645b3cb9699
This commit is contained in:
parent
75f5dc5a7b
commit
dabd9d676c
@ -37,10 +37,17 @@
|
||||
dest: "{{ zuul.project.src_dir }}/{{ charm_build_name }}"
|
||||
remote_src: true
|
||||
|
||||
- name: Read metadata.yaml
|
||||
slurp:
|
||||
src: "{{ zuul.project.src_dir }}/{{ charm_build_name }}/metadata.yaml"
|
||||
register: metadata_file
|
||||
|
||||
- name: Parse metadata.yaml
|
||||
set_fact:
|
||||
metadata: "{{ metadata_file.content | b64decode | from_yaml }}"
|
||||
|
||||
- name: Upload oci-image to charmhub
|
||||
register: upload_oci_image_output
|
||||
vars:
|
||||
metadata: "{{ lookup('file', zuul.executor.work_root + '/' + zuul.project.src_dir + '/' + charm_build_name + '/metadata.yaml') | from_yaml }}"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
shell: |
|
||||
|
Loading…
Reference in New Issue
Block a user