Revert range change (#50155)

* Revert "Fix incorrect examples with random filter (#50137)"

This reverts commit 9a7dbd5213.

The correction is incomplete and also based on a 'fix' that was supposed to have been reverted already

* Revert "Added `+1` to the `end` in `random` filter so that it was inclusive (#27215)"

This reverts commit ea2b89c7ae.

reverted fix as agreed at the time, but missed by maintainers.
This commit is contained in:
Brian Coca
2018-12-19 12:12:32 -05:00
committed by Adam Miller
parent eab3b02cb3
commit b0c28f86de
2 changed files with 3 additions and 3 deletions

View File

@@ -213,7 +213,7 @@ def rand(environment, end, start=None, step=None, seed=None):
start = 0
if not step:
step = 1
return r.randrange(start, end + 1, step)
return r.randrange(start, end, step)
elif hasattr(end, '__iter__'):
if start or step:
raise AnsibleFilterError('start and step can only be used with integer values')