ovh/utask

Allow to retrieve current resolution watchers

Closed this issue · 3 comments

Is your feature request related to a problem? Please describe.
In a template, i'm creating a subtask. I would like to define watcher_usernames with the main template value.

Describe the solution you'd like

...
inputs:
...
steps:
...
  install-servers:
    foreach: '{{ field `step` `wait-scale` `output` `result` `result` | toJson }}'
    description: Follow server installation and do post-installation steps
    action:
      type: subtask
      configuration:
        template: install-server
        input:
          ...
        watcher_usernames: '{{ .watcher_usernames | toJson }}'
...

Describe alternatives you've considered
Currently, when i create a new task, i've an input with a list of usernames.

This is a good idea.
For your specific need (forwarding from parent), how about this:

  • if no watcher_usernames is set, the subtask inherits the watchers from the parent by default. Sounds good?
    @rbeuque74 @wI2L @rclsilver
wI2L commented

Sound good to me, and make .watcher_usernames available in .task templating object as well.

Yes, both solutions would make me happier