Open bcoca opened 6 years ago
-removed-
@urusha I'm not sure what you mean, those seem like unrelated issues.
Unrelated. Sorry, wrong tab :)
@bcoca does this proposal allow for defining the tasks entry point or does this only work with main.yml
entry point should not matter, it would affect the role as a whole, but if we make it an option, it will let the user mix/match how he wants it to work in either case
updated proposal and example with 'simple_output'' to clarify my meaning
@bcoca
Seems like a reasonable idea.
If we do this and the role arg spec stuff and contentpath with fully qualified names for roles, that would be really close to allowing:
hosts: myhosts
vars:
some_var: some_value
some_other_var: some_other_value
tasks:
- name: some debug task
debug:
var: some_other_var
# just a regular task
- file:
state: dir
path: /dev/null/somepathwhatever
# dont get hung up on this particular name format, just need some name/id that
# identifies this as a role and a particular role. much like 'file:' means the file module
- roles.mygithubuser.mycollection.myrole:
some_role_var: blippy
some_option: "{{some_other_var}}"
register: the_result_of_myrole
@alikins that was something i proposed in the past, a bit different as i was using @ to signify 'its a role':,
- @rolname:
tasks_from: x
vars:
x: y
It is not something I'm currently aiming for, at this point i just want to take small steps that are useful by themselves but as a whole make roles a lot more reusable.
Can we also have 'until' for include_X?
Can we also have 'until' for include_X?
I tend to use a recursive include when I need this functionality.
@bcoca
Is this still in the works or abandoned?
neither, its on wishlist, but no immediate plan
This is required, hopefully will be looked into and implemented next year
Proposal: make include_X behave more like normal tasks
Author: Brian Coca <@bcoca> IRC: bcoca
Date: 2018-13-01
Motivation
make task lists are roles more reusable
Problems
Solution proposal
Implement a couple of new featuers to the include:
Allow to register a result (aggregate of all tasks + top level that reflects above)
feel free to bikeshed on 'single_output' i just can't think of anything better at this moment
Dependencies
Testing
yes, normal integration tests should suffice
Documentation
in the modules affected
Problems
register:
is set