question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ansible galaxy project naming

See original GitHub issue

Bug Report

SUMMARY

With the current changes from #779 and #820 I’ll have now a follow up problem: we used to maintain our github stuff with:

  • github repository name: ansible-role-mycooltool
  • galaxy name: name-space.mycooltool

After changing and applying #820 we now have the

  • galaxy name: name_space.ansible_role_mycooltool and have no possibility to change that?
STEPS TO REPRODUCE
  1. create namespace
  2. create github role ansible-role-my-cool-tool
  3. import that in ansible galaxy
  4. wonder about name_space.ansible_role_my_cool_tool
EXPECTED RESULTS

First: I don’t get which namespace is to use now. name_space or name-space for the existing project.

ansible-galaxy install while-true-do.my-cool-tool

or

ansible-galaxy install while_true_do.my_cool_tool
ACTUAL RESULTS
ansible-galaxy install while_true_do.ansible_role_my_cool_tool

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
chouseknechtcommented, Jul 9, 2018

Your namespace is donvipre, which exists, but has no content associated with it.

If you start adding repositories to your namespace, you’ll see, as the documentation states, repository and role names will get ‘-’ converted to ‘_’. Using your example, ansible-role-my-cool-tool will get converted to ansible_role_my_cool_tool.

If you want to alter the name, to just my_coole_tool, you can set the galaxy_ino.role_name value in meta/main.yml.

0reactions
chouseknechtcommented, Aug 11, 2018

@donvipre @daniel-wtd

Renamed while-true-do to while_true_do, as requested. Apologies for not getting back to this.

Tested an install of one of your roles, see output below. You’ll need to update your role dependencies with the new namespace.

ansible-galaxy install while_true_do.ansible
- downloading role 'ansible', owned by while_true_do
- downloading role from https://github.com/while-true-do/ansible-role-ansible/archive/master.tar.gz
- extracting while_true_do.ansible to /Users/chouseknecht/roles/while_true_do.ansible
- while_true_do.ansible (master) was installed successfully
- adding dependency: while-true-do.repo-epel
- downloading role 'repo-epel', owned by while-true-do
 [WARNING]: - while-true-do.repo-epel was NOT installed successfully: - sorry, while-true-do.repo-epel was not found on https://galaxy.ansible.com.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating Roles — Ansible Documentation
Topics. Creating Roles. Roles; Role Metadata; Role Names. This topic describes how to create Ansible roles that can be imported into Galaxy.
Read more >
An Ansible role for managing a Galaxy server - GitHub
Galaxy. An Ansible role for installing and managing Galaxy servers. Despite the name confusion, Galaxy bears no relation to Ansible Galaxy.
Read more >
Galaxy Installation with Ansible
Here we'll see how to install a Galaxy server using an Ansible playbook. ... For our project, Ansible is even more fitting due...
Read more >
ics-ansible-galaxy / ics-ans-naming · GitLab
ics-ans-naming · 64 Commits · 2 Branches · 0 Tags · 2.5 MB Project Storage.
Read more >
Ansible III: Ansible Galaxy — Big Data Classes - Cloudmesh
It is a “helloworld” project only meant to get us familiar with Ansible Galaxy project ... cd roles $ ansible-galaxy init <to-be-created-role-name>.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found