Execute task on the same host >1 time #633
Closed
Comments
bitprophet
added a commit
that referenced
this issue
May 9, 2012
Implemented in 9ca78a7. |
This was referenced May 10, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently host lists are fully deduped in order to prevent unwanted duplicity when merging different host list sources. E.g. specifying a role containing
host1
and at the same time also using a@hosts('host1')
decorator would, without deduping, run twice onhost1
, which is not usually the desired effect.However, this protective feature disables any wanted duplicity, i.e. running a task multiple times on the same server on purpose. (This has become especially important for some folks with the advent of parallelism.)
I see two solutions:
Task.get_hosts
IIRC) and if set, does not do any deduping, but simply adds all sources together.-H
and@hosts
) would get deduped, but identical host strings in the same source (e.g.env.hosts = ['host1', 'host1', 'host1']
) would not get deduped.I don't see any serious downsides to going with the simpler approach. Users wanting this feature are more likely to be advanced enough that they know to search for and activate nondefault options; and they're also more likely to understand the tradeoff and/or not specify multiple sources simultaneously.
The text was updated successfully, but these errors were encountered: