Use text_type instead of unicode
This commit is contained in:
parent
c6a30f7000
commit
fbc9553bd4
1 changed files with 2 additions and 2 deletions
|
@ -34,7 +34,7 @@ except ImportError:
|
||||||
|
|
||||||
from ansible import constants as C
|
from ansible import constants as C
|
||||||
from ansible.cli import CLI
|
from ansible.cli import CLI
|
||||||
from ansible.compat.six import string_types
|
from ansible.compat.six import string_types, text_type
|
||||||
from ansible.errors import AnsibleError, AnsibleParserError, AnsibleUndefinedVariable, AnsibleFileNotFound
|
from ansible.errors import AnsibleError, AnsibleParserError, AnsibleUndefinedVariable, AnsibleFileNotFound
|
||||||
from ansible.inventory.host import Host
|
from ansible.inventory.host import Host
|
||||||
from ansible.plugins import lookup_loader
|
from ansible.plugins import lookup_loader
|
||||||
|
@ -385,7 +385,7 @@ class VariableManager:
|
||||||
if task._role:
|
if task._role:
|
||||||
variables['role_name'] = task._role.get_name()
|
variables['role_name'] = task._role.get_name()
|
||||||
variables['role_path'] = task._role._role_path
|
variables['role_path'] = task._role._role_path
|
||||||
variables['role_uuid'] = unicode(task._role._uuid)
|
variables['role_uuid'] = text_type(task._role._uuid)
|
||||||
|
|
||||||
if self._inventory is not None:
|
if self._inventory is not None:
|
||||||
variables['inventory_dir'] = self._inventory.basedir()
|
variables['inventory_dir'] = self._inventory.basedir()
|
||||||
|
|
Loading…
Reference in a new issue