Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli/galaxy.py: "scm_archive_role is not defined" error #11920

Closed
palmerabollo opened this issue Aug 11, 2015 · 3 comments · Fixed by #12636
Closed

cli/galaxy.py: "scm_archive_role is not defined" error #11920

palmerabollo opened this issue Aug 11, 2015 · 3 comments · Fixed by #12636
Assignees
Labels
bug This issue/PR relates to a bug.
Milestone

Comments

@palmerabollo
Copy link
Contributor

It seems that scm_archive_role is not defined in lib/ansible/cli/galaxy.py.

This causes the an error with Ansible 2 when you run ansible-galaxy -r requirements.yml and you have a git repository as source such as:

- src: git+git@enterprisegithub.com/user/role.git
  version: develop

The exception I get is:

Unexpected Exception: global name 'scm_archive_role' is not defined
the full traceback was:

Traceback (most recent call last):
  File "/Users/guido/ansible/bin/ansible-galaxy", line 79, in <module>
    sys.exit(cli.run())
  File "/Users/guido/ansible/lib/ansible/cli/galaxy.py", line 136, in run
    self.execute()
  File "/Users/guido/ansible/lib/ansible/cli/__init__.py", line 97, in execute
    fn()
  File "/Users/guido/ansible/lib/ansible/cli/galaxy.py", line 369, in execute_install
    tmp_file = scm_archive_role(role.scm, role.src, role.version, role.name)
NameError: global name 'scm_archive_role' is not defined

The same command with the same requirements.yml file works with ansible 1.x

I might be related to @bcoca's changes some weeks ago, because I'm not using github.com, but a github enterprise instead.

@bcoca bcoca added this to the v2 milestone Aug 11, 2015
@bcoca bcoca added the P3 label Aug 11, 2015
@palmerabollo
Copy link
Contributor Author

Are you guys open to contributions in this regard?

@MichaelDrogalis
Copy link

Ran into this. Can't resolve any 3rd party roles automatically without a fix here.

MichaelDrogalis pushed a commit to LonoCloud/ansible-mesos that referenced this issue Aug 25, 2015
royaltm added a commit to royaltm/ansible-nodejs that referenced this issue Sep 20, 2015
bcoca added a commit to bcoca/ansible that referenced this issue Oct 5, 2015
better error reporting on fetching errors
use scm if it exists over src
unified functions in requirements
simplified logic
added verbose to tests
cleanup code refs, unused options and dead code
moved get_opt to base class
fixes ansible#11920
fixes ansible#12612
fixes ansible#10454
@bcoca bcoca mentioned this issue Oct 5, 2015
@jimi-c
Copy link
Member

jimi-c commented Oct 5, 2015

Closing This Ticket

Hi!

We believe the above commit should resolve this problem for you. This will also be included in the next major release.

If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:

Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved.

Thank you!

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants