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
f40b66d8
Commit
f40b66d8
authored
Jul 12, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure the basedir is unicode
Fixes #10773
parent
ba929656
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
lib/ansible/parsing/__init__.py
+2
-1
lib/ansible/playbook/role/definition.py
+1
-1
lib/ansible/plugins/__init__.py
+2
-1
No files found.
lib/ansible/parsing/__init__.py
View file @
f40b66d8
...
@@ -31,6 +31,7 @@ from ansible.parsing.splitter import unquote
...
@@ -31,6 +31,7 @@ from ansible.parsing.splitter import unquote
from
ansible.parsing.yaml.loader
import
AnsibleLoader
from
ansible.parsing.yaml.loader
import
AnsibleLoader
from
ansible.parsing.yaml.objects
import
AnsibleBaseYAMLObject
,
AnsibleUnicode
from
ansible.parsing.yaml.objects
import
AnsibleBaseYAMLObject
,
AnsibleUnicode
from
ansible.utils.path
import
unfrackpath
from
ansible.utils.path
import
unfrackpath
from
ansible.utils.unicode
import
to_unicode
class
DataLoader
():
class
DataLoader
():
...
@@ -175,7 +176,7 @@ class DataLoader():
...
@@ -175,7 +176,7 @@ class DataLoader():
''' sets the base directory, used to find files when a relative path is given '''
''' sets the base directory, used to find files when a relative path is given '''
if
basedir
is
not
None
:
if
basedir
is
not
None
:
self
.
_basedir
=
basedir
self
.
_basedir
=
to_unicode
(
basedir
)
def
path_dwim
(
self
,
given
):
def
path_dwim
(
self
,
given
):
'''
'''
...
...
lib/ansible/playbook/role/definition.py
View file @
f40b66d8
...
@@ -129,7 +129,7 @@ class RoleDefinition(Base, Become, Conditional, Taggable):
...
@@ -129,7 +129,7 @@ class RoleDefinition(Base, Become, Conditional, Taggable):
return
(
role_name
,
role_path
)
return
(
role_name
,
role_path
)
else
:
else
:
# we always start the search for roles in the base directory of the playbook
# we always start the search for roles in the base directory of the playbook
role_search_paths
=
[
os
.
path
.
join
(
self
.
_loader
.
get_basedir
(),
'roles'
),
'./roles'
,
'./'
]
role_search_paths
=
[
os
.
path
.
join
(
self
.
_loader
.
get_basedir
(),
u'roles'
),
u'./roles'
,
u
'./'
]
# also search in the configured roles path
# also search in the configured roles path
if
C
.
DEFAULT_ROLES_PATH
:
if
C
.
DEFAULT_ROLES_PATH
:
...
...
lib/ansible/plugins/__init__.py
View file @
f40b66d8
...
@@ -29,6 +29,7 @@ import sys
...
@@ -29,6 +29,7 @@ import sys
from
ansible
import
constants
as
C
from
ansible
import
constants
as
C
from
ansible.utils.display
import
Display
from
ansible.utils.display
import
Display
from
ansible.utils.unicode
import
to_unicode
from
ansible
import
errors
from
ansible
import
errors
MODULE_CACHE
=
{}
MODULE_CACHE
=
{}
...
@@ -38,7 +39,7 @@ _basedirs = []
...
@@ -38,7 +39,7 @@ _basedirs = []
def
push_basedir
(
basedir
):
def
push_basedir
(
basedir
):
# avoid pushing the same absolute dir more than once
# avoid pushing the same absolute dir more than once
basedir
=
os
.
path
.
realpath
(
basedir
)
basedir
=
to_unicode
(
os
.
path
.
realpath
(
basedir
)
)
if
basedir
not
in
_basedirs
:
if
basedir
not
in
_basedirs
:
_basedirs
.
insert
(
0
,
basedir
)
_basedirs
.
insert
(
0
,
basedir
)
...
...
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