I need to add one more name based on if condition. If If variable value from another .yml file is "yes" then add a new name in the list
I've the following code in my yaml file:
JsNames:
- name: 'jquery.min.js'
- name: 'script.js'
I need to add more name based on if condition. If variable value from another .yml file is "yes" then add a new name like this:
JsNames:
- name: 'jquery.min.js'
- name: 'script.js'
- name: 'new.js'
is this possible?
Tried the following:
JsNames:
- name: 'jquery.min.js'
- name: 'script.js'
- | # Test multiline yaml support
if [[ "site.data.settings.requiredjs" == "yes" ]]; then
name: 'new.js'
fi
I need to add more name based on if condition. If variable value from another .yml file is "yes" then add a new name like this:
JsNames:
- name: 'jquery.min.js'
- name: 'script.js'
- name: 'new.js'