New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserve type in ActionChain publish variables #1231
Comments
The same is for actions, right? Wanted to edit load.yml: ---
name: "load"
runner_type: "local-shell-cmd"
description: "Action that reloads all st2 content."
enabled: true
entry_point: ""
parameters:
sudo:
immutable: true
cmd:
immutable: true
# this line :(
# 'register' is a string, man: ["actions", "aliases", "sensors"]
default: "st2 reload{% for item in register %} --register-{{item}}{% endfor %}"
register:
type: "array"
items:
type: "string"
default:
- "actions"
- "aliases"
- "sensors"
description: "Possible options are all, sensors, actions, rules, aliases."
kwarg_op:
immutable: true And cried here: cmd:
immutable: true
default: "echo '{{ register|join('-') }}'"
register:
type: "array"
items:
type: "string"
default:
- "actions"
- "aliases"
- "sensors" -> Or I'm doing something wrong? |
@armab I am not sure what you want the cmd as in simple text? |
@lakshmi-kannan I expected I can work with |
{% for item in register %} --register-{{item}}{% endfor %} like in original load.yaml is a sequence, right? |
@armab Not sure why this borked when you tried to use an array. Most likely the jinja template. |
Confirming still a problem. Potential solution might be to use |
Since ActionChain publishing uses Jinja the types for published variables are not preserved and everything gets a string representation.
Fix either by switch all this to YAQL or some other post-jinja magic.
The text was updated successfully, but these errors were encountered: