You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 27, 2024. It is now read-only.
is it possible to make an example of import_tasks, and an example of strategy, and an example of them together?
I had an original problem with the code, but the docs and debugging tools and examples were unhelpful.
what I was trying to solve
wanted to set a strategy for tasks to free (like usual) but import a bunch of tasks into a main task in a role. maybe this is a bad pattern or that's supposed to be set inside the playbook itself (along with which tasks of a role to run... but then... why do roles have a main.yml??
the errors I had
ansible shows a conflicting action statement during a run of a playbook:
yaml-schema shows "matches a schema that is not allowed", but doesn't give the error
an example file
filename: roles/something/tasks/main.yml
- name: examplestrategy: freetasks:
- import_tasks: subtask.yml # done because I couldn't set strategy in the other task. should I be setting this in the playbook?# alternatively:
- name: examplestrategy: freeimport_tasks: subtask.yml # done because I couldn't set strategy in the other task. should I be setting this in the playbook?
the debug process
tried re-reading docs (it's been a while since I messed with playbooks and didn't have any old code) - this stuff is at least trying to have examples which is better than auto-generated docs for rust/golang/openapi3...
is it possible to make an example of import_tasks, and an example of strategy, and an example of them together?
I had an original problem with the code, but the docs and debugging tools and examples were unhelpful.
what I was trying to solve
wanted to set a strategy for tasks to free (like usual) but import a bunch of tasks into a main task in a role. maybe this is a bad pattern or that's supposed to be set inside the playbook itself (along with which tasks of a role to run... but then... why do roles have a main.yml??
the errors I had
ansible shows a conflicting action statement during a run of a playbook:
ERROR! conflicting action statements: strategy, import_tasks
the example in the docs for import_tasks doesn't tell you what yaml file the code is (a common problem throughout the docs) - I'm not sure if this is a playbook, a task, what have you: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/import_tasks_module.html
yaml-schema shows "matches a schema that is not allowed", but doesn't give the error
an example file
filename: roles/something/tasks/main.yml
the debug process
import_tasks
orstrategy
conclusion
...maybe a longterm fix is to have the ansible docs website show what each code snippet is (playbook, task, etc)...
is it possible to make a correct example using both??
The text was updated successfully, but these errors were encountered: