Comments (6)
Maybe i have misunderstood something then, because i have uploaded it as namespace files, but used WorkingDirectory to access them, i believed you needed that to access them.
But here is my workflow with the ansible playbook.
prod_files.zip
just ask if you need anything else :)
from kestra.
Thanks for the help.
from kestra.
could you provide a reproducer flow that shows the issue when using WorkingDirectory with Ansible?
There are also some alternative options for storing the Ansible files e.g. you can upload those as Namespace Files and this way you don't need to use the WorkingDirectory task
from kestra.
this should work:
feel free to close the issue if this works for you 👍
id: Check-Diskspace
namespace: company.myteam
description: "Check if the disk usage is over 80% and if send notfy."
tasks:
- id: ansible_task
type: io.kestra.plugin.ansible.cli.AnsibleCLI
inputFiles:
inventory.ini: "{{ read('ansible-inventories/Main-Servers.ini') }}"
playbook.yml: "{{ read('ansible-playbooks/check-diskspace.yml') }}"
id_rsa: "{{ secret('DEFAULT_KEY') }}"
namespaceFiles:
enabled: true
docker:
image: cytopia/ansible:latest-tools
pullPolicy: IF_NOT_PRESENT
user: "1000"
commands:
- ansible-playbook -i inventory.ini --key-file id_rsa --extra-vars "hosts=default" playbook.yml
env:
ANSIBLE_HOST_KEY_CHECKING: "False"
ANSIBLE_REMOTE_USER: "tohjuler"
triggers:
- id: daily-runner
type: io.kestra.plugin.core.trigger.Schedule
cron: 0 1 * * *
errors:
- id: Ntfy-Error
type: io.kestra.plugin.core.http.Request
body: A error happend with the Check-Diskspace workflow.
method: POST
uri: <url>
disabled: false
```
from kestra.
btw if you want to avoid taking into account {
, you can use the raw
tag https://kestra.io/docs/concepts/expression/tag#raw
it's used by Pebble as a template separator
from kestra.
Didn't work with the new version, same error as before Unable to find `hosts` used in the expression `- hosts: "{{ hosts }}"
.
But it worked added the raw
tag around the read
for the playbook.
playbook.yml: "{% raw %}{{ read('ansible-playbooks/check-diskspace.yml') }}{% endraw %}"
from kestra.
Related Issues (20)
- Icon for alias class are not displayed anymore
- Missing filter on Flows > Logs
- Add a `values` filter
- JSON defaults are not show as json on create execution
- The flow or execution you are looking for does not exist.
- Make it easier to use data stored in ION format in DuckDB HOT 1
- Add ability to accept rows as an input for io.kestra.plugin.serdes.csv.IonToCsv task
- "interpreter" and "beforeCommands" fields not visible on python scripts but mandatory
- feat: add yaml scalars to more properties HOT 2
- Some task logs are not displayed in the UI even though they are captured by the JDBC backend
- When migrating to 0.17.3 from 0.18.0 snapshot, namespace files stored in local internal storage are lost
- Dynamic Input Defaults (Allow Pebble Templating Language in Inputs) HOT 4
- Disabled flows seems to be able to still create new executions HOT 2
- [UI] The calls to the API for the logs widget on the dashboard are made twice
- Input is required when validator is present, despite require: false
- Replace ENUM with SELECT
- Add a core BatchWebhook trigger plugin
- Prefilling execution with `null` inputs fills with 'null' as string
- Subflow attempts don't have a RUNNING state on the attempts
- Kafka trigger produces an error: Worker Evaluate Failed with error 'Cannot invoke "java.util.Optional.map(java.util.function.Function)" because "evaluate" is null'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kestra.