diff options
author | James Cammarata <jcammarata@ansibleworks.com> | 2014-01-06 16:40:47 +0100 |
---|---|---|
committer | James Cammarata <jcammarata@ansibleworks.com> | 2014-01-06 16:42:41 +0100 |
commit | ccbc99fe4fa415a7d30ab173a3d5d8733cd50ef8 (patch) | |
tree | fa489e61dc61dfd96a6e6bee015a29cc28f6a456 /bin/ansible-galaxy | |
parent | Update latest released version of ansible to 1.4.4 on docsite (diff) | |
download | ansible-ccbc99fe4fa415a7d30ab173a3d5d8733cd50ef8.tar.xz ansible-ccbc99fe4fa415a7d30ab173a3d5d8733cd50ef8.zip |
Fixed splitting of role/user name when username has a '.' in it
This may still be an issue if users create roles with a '.' in the name though.
We will probably have to disallow that in the role naming convention.
Diffstat (limited to 'bin/ansible-galaxy')
-rwxr-xr-x | bin/ansible-galaxy | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/ansible-galaxy b/bin/ansible-galaxy index a6845fc86e..7fbc404921 100755 --- a/bin/ansible-galaxy +++ b/bin/ansible-galaxy @@ -241,7 +241,10 @@ def api_lookup_role_by_name(api_server, role_name): role_name = urllib.quote(role_name) try: - user_name,role_name = role_name.split(".", 1) + parts = role_name.split(".") + user_name = ".".join(parts[0:-1]) + role_name = parts[-1] + print " downloading role '%s', owned by %s" % (role_name, user_name) except: print "Invalid role name (%s). You must specify username.rolename" % role_name sys.exit(1) |