Closed n0one42 closed 2 months ago
@anna-geller As a hint because you changed the name: It has not only to do with ansible playbooks but also with docker compose files. This is why I actually upload the docker compose files first to the remote server.
The example was for Ansible, can you share other examples where you see that issue?
@anna-geller
It does not matter if its an ansible, an docker compose or what ever. It has to do with the interpretation of yml files by itself. More over with the io.kestra.plugin.core.flow.WorkingDirectory
id: yaml_test
namespace: homelab.dev
description: Testing yml files
labels:
project: Test
variables:
host: "xxx"
ssh_port: xxx
primary_user_name: "xxx"
tasks:
- id: wdir
type: io.kestra.plugin.core.flow.WorkingDirectory
inputFiles:
myfile.yml: |
Do not interpret it... {% raw %}{{ item }}{% endraw %}
outputFiles:
- "*"
tasks:
- id: showContent
type: io.kestra.plugin.scripts.shell.Commands
commands:
- ls {{ workingDir }}
- echo "Task is needed here... so placeholdertask"
- id: upload
type: io.kestra.plugin.fs.sftp.Upload
host: "{{ vars.host }}"
username: "{{ vars.primary_user_name }}"
keyfile: "{{ read('shared/secrets/xxx') }}"
port: "{{ vars.ssh_port }}"
from: "{{ outputs.wdir.outputFiles['myfile.yml'] }}"
to: "myfile.yml"
Results:
myfile.yml: |
Do not interpret it... {% raw %}{{ item }}{% endraw %}
Failed preExecuteTasks on WorkingDirectory: Unable to find `item` used in the expression `Do not interpret it... {{ item }}
` at line 1
myfile.yml: |
{% raw %}Do not interpret it... {{ item }}{% endraw %}
Failed preExecuteTasks on WorkingDirectory: Unable to find `item` used in the expression `Do not interpret it... {{ item }}
` at line 1
yes, I'm just asking for more examples, this will help us identify the right solution
hey @n0one42, I talked to the team and there seems to be a misunderstanding about when the fix will be available. Your first issue https://github.com/kestra-io/kestra/issues/4093 was closed after the fix was done. However, the fix hasn't been released yet. It will be released by the latest in Kestra 0.18 planned for the 6th of August.
@anna-geller but he wrote:
So the issue was that we render twice the file content, I fixed it, it will be backported for our next bugfix release on 0.17
so the v0.17 was already out... Anyway. I think, this could be a pretty cool software but atm. for me and the companies I support, it is not worth it yet the hassle. There are to many issues. Lets hope for the best.
It has been backported to 0.17.11.
@n0one42 sorry to hear, I respect your decision though. If you want to discuss your use cases with a real human, feel free to talk to our product expert @Ben8t - I'm sure that frustrations with expressions are solvable
Hello @n0one42 , would be happy to talk about your case over call - here is my schedule slots
Describe the issue
Like I already wrote in this post: https://github.com/kestra-io/kestra/issues/4093 which was instantly closed again... without even waiting for an answer.
@gregoir does it works now for you?
Does not matter if like:
Error:
@loicmathieu
Environment