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
0edd0d47
Commit
0edd0d47
authored
Jul 16, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing template calls
parent
01f2c85a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
lib/ansible/runner/__init__.py
+4
-11
No files found.
lib/ansible/runner/__init__.py
View file @
0edd0d47
...
@@ -261,14 +261,7 @@ class Runner(object):
...
@@ -261,14 +261,7 @@ class Runner(object):
''' allows discovered variables to be used in templates and action statements '''
''' allows discovered variables to be used in templates and action statements '''
host
=
conn
.
host
host
=
conn
.
host
var_result
=
result
.
get
(
'ansible_facts'
,{})
self
.
setup_cache
[
host
]
=
result
.
get
(
'ansible_facts'
,
{})
# note: do not allow variables from playbook to be stomped on
# by variables coming up from facter/ohai/etc. They
# should be prefixed anyway
for
(
k
,
v
)
in
var_result
.
iteritems
():
if
not
k
in
self
.
setup_cache
[
host
]:
self
.
setup_cache
[
host
][
k
]
=
v
# *****************************************************
# *****************************************************
...
@@ -333,7 +326,7 @@ class Runner(object):
...
@@ -333,7 +326,7 @@ class Runner(object):
if
'first_available_file'
in
self
.
module_vars
:
if
'first_available_file'
in
self
.
module_vars
:
found
=
False
found
=
False
for
fn
in
self
.
module_vars
.
get
(
'first_available_file'
):
for
fn
in
self
.
module_vars
.
get
(
'first_available_file'
):
fn
=
utils
.
template
(
fn
,
inject
,
self
.
setup_cache
)
fn
=
utils
.
template
(
fn
,
inject
)
if
os
.
path
.
exists
(
fn
):
if
os
.
path
.
exists
(
fn
):
source
=
fn
source
=
fn
found
=
True
found
=
True
...
@@ -345,7 +338,7 @@ class Runner(object):
...
@@ -345,7 +338,7 @@ class Runner(object):
if
self
.
module_vars
is
not
None
:
if
self
.
module_vars
is
not
None
:
inject
.
update
(
self
.
module_vars
)
inject
.
update
(
self
.
module_vars
)
source
=
utils
.
template
(
source
,
inject
,
self
.
setup_cache
)
source
=
utils
.
template
(
source
,
inject
)
source
=
utils
.
path_dwim
(
self
.
basedir
,
source
)
source
=
utils
.
path_dwim
(
self
.
basedir
,
source
)
local_md5
=
utils
.
md5
(
source
)
local_md5
=
utils
.
md5
(
source
)
...
@@ -468,7 +461,7 @@ class Runner(object):
...
@@ -468,7 +461,7 @@ class Runner(object):
if
'first_available_file'
in
self
.
module_vars
:
if
'first_available_file'
in
self
.
module_vars
:
found
=
False
found
=
False
for
fn
in
self
.
module_vars
.
get
(
'first_available_file'
):
for
fn
in
self
.
module_vars
.
get
(
'first_available_file'
):
fn
=
utils
.
template
(
fn
,
inject
,
self
.
setup_cache
)
fn
=
utils
.
template
(
fn
,
inject
)
if
os
.
path
.
exists
(
fn
):
if
os
.
path
.
exists
(
fn
):
source
=
fn
source
=
fn
found
=
True
found
=
True
...
...
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