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
000d3832
Commit
000d3832
authored
Nov 01, 2012
by
Daniel Hokka Zakrisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make ansible.utils a package
parent
4c156e4d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
17 deletions
+2
-17
lib/ansible/utils/__init__.py
+1
-17
lib/ansible/utils/template.py
+0
-0
setup.py
+1
-0
No files found.
lib/ansible/utils.py
→
lib/ansible/utils
/__init__
.py
View file @
000d3832
...
...
@@ -23,7 +23,7 @@ import optparse
import
operator
from
ansible
import
errors
from
ansible
import
__version__
from
ansible
import
template
as
ans_template
from
ansible
.utils.template
import
*
import
ansible.constants
as
C
import
time
import
StringIO
...
...
@@ -216,22 +216,6 @@ def parse_json(raw_data):
return
{
"failed"
:
True
,
"parsed"
:
False
,
"msg"
:
orig_data
}
return
results
def
varReplace
(
raw
,
vars
,
depth
=
0
,
expand_lists
=
False
):
''' Perform variable replacement of $variables in string raw using vars dictionary '''
return
ans_template
.
varReplace
(
raw
,
vars
,
depth
=
depth
,
expand_lists
=
expand_lists
)
def
varReplaceWithItems
(
basedir
,
varname
,
vars
):
''' helper function used by with_items '''
return
ans_template
.
varReplaceWithItems
(
basedir
,
varname
,
vars
)
def
template
(
basedir
,
text
,
vars
,
expand_lists
=
False
):
''' run a text buffer through the templating engine until it no longer changes '''
return
ans_template
.
template
(
basedir
,
text
,
vars
,
expand_lists
=
expand_lists
)
def
template_from_file
(
basedir
,
path
,
vars
):
''' run a file through the templating engine '''
return
ans_template
.
template_from_file
(
basedir
,
path
,
vars
)
def
parse_yaml
(
data
):
''' convert a yaml string to a data structure '''
return
yaml
.
load
(
data
)
...
...
lib/ansible/template.py
→
lib/ansible/
utils/
template.py
View file @
000d3832
File moved
setup.py
View file @
000d3832
...
...
@@ -25,6 +25,7 @@ setup(name='ansible',
package_dir
=
{
'ansible'
:
'lib/ansible'
},
packages
=
[
'ansible'
,
'ansible.utils'
,
'ansible.inventory'
,
'ansible.inventory.vars_plugins'
,
'ansible.playbook'
,
...
...
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