Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
3fe7d536
Commit
3fe7d536
authored
Jun 09, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7705 from smoothify/random-nocache
Ensure random jinja filter doesn't get cached in loops.
parents
2c9cba06
e3530dcb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
lib/ansible/runner/filter_plugins/core.py
+3
-1
No files found.
lib/ansible/runner/filter_plugins/core.py
View file @
3fe7d536
...
@@ -28,6 +28,7 @@ from ansible import errors
...
@@ -28,6 +28,7 @@ from ansible import errors
from
ansible.utils
import
md5s
from
ansible.utils
import
md5s
from
distutils.version
import
LooseVersion
,
StrictVersion
from
distutils.version
import
LooseVersion
,
StrictVersion
from
random
import
SystemRandom
from
random
import
SystemRandom
from
jinja2.filters
import
environmentfilter
def
to_nice_yaml
(
*
a
,
**
kw
):
def
to_nice_yaml
(
*
a
,
**
kw
):
'''Make verbose, human readable yaml'''
'''Make verbose, human readable yaml'''
...
@@ -185,7 +186,8 @@ def version_compare(value, version, operator='eq', strict=False):
...
@@ -185,7 +186,8 @@ def version_compare(value, version, operator='eq', strict=False):
except
Exception
,
e
:
except
Exception
,
e
:
raise
errors
.
AnsibleFilterError
(
'Version comparison:
%
s'
%
e
)
raise
errors
.
AnsibleFilterError
(
'Version comparison:
%
s'
%
e
)
def
rand
(
end
,
start
=
None
,
step
=
None
):
@environmentfilter
def
rand
(
environment
,
end
,
start
=
None
,
step
=
None
):
r
=
SystemRandom
()
r
=
SystemRandom
()
if
isinstance
(
end
,
(
int
,
long
)):
if
isinstance
(
end
,
(
int
,
long
)):
if
not
start
:
if
not
start
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment