Re: [ansible-project] What's really the purpose of pre_tasks and post_tasks?

2020-04-23 Thread Ricardo Amaral
So, in other words, with include_role, import_role, and tasks, one can do pretty much anything that roles, pre_tasks and post_tasks can do as well, right? Thank you so much for your help, that clarifies things for me :) Stay safe! On Thu, 23 Apr 2020, 22:16 Matt Martz, wrote: > `roles:`

Re: [ansible-project] What's really the purpose of pre_tasks and post_tasks?

2020-04-23 Thread Matt Martz
`roles:` existed long before `include_role` and `import_role`. Many on the core team would say that `import_role` and `include_role` are the future. I personally would like to see `pre_tasks`, `roles`, and `post_tasks` deprecated. Time will tell... On Thu, Apr 23, 2020 at 4:11 PM Ricardo Amaral

Re: [ansible-project] What's really the purpose of pre_tasks and post_tasks?

2020-04-23 Thread Ricardo Amaral
What exactly is the purpose of roles then?  I mean, is there a difference between roles and use include_role / import_role inside tasks? On Thu, 23 Apr 2020, 22:08 Matt Martz, wrote: > Primarily they were introduced to provide execution order when using > `roles:`. `post_tasks` is probably

Re: [ansible-project] What's really the purpose of pre_tasks and post_tasks?

2020-04-23 Thread Matt Martz
Primarily they were introduced to provide execution order when using `roles:`. `post_tasks` is probably mostly useless. The execution order is: pre_tasks roles tasks post_tasks On Thu, Apr 23, 2020 at 4:05 PM Ricardo Amaral wrote: > What exactly is the purpose of pre_tasks/post_tasks when

[ansible-project] What's really the purpose of pre_tasks and post_tasks?

2020-04-23 Thread Ricardo Amaral
What exactly is the purpose of pre_tasks/post_tasks when one can just put "pre" tasks before the main tasks and "post" tasks after the main tasks in the "tasks" directive? I've read the documentation many times and I can't understand the need for them. I must be missing something here, right?