utask icon indicating copy to clipboard operation
utask copied to clipboard

Allow to retrieve current resolution watchers

Open rclsilver opened this issue 5 years ago • 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.

rclsilver avatar Oct 06 '20 07:10 rclsilver

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

loopfz avatar Oct 07 '20 15:10 loopfz

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

wI2L avatar Oct 07 '20 15:10 wI2L

Yes, both solutions would make me happier

rclsilver avatar Oct 07 '20 16:10 rclsilver