Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

ansible-galaxy

ANSIBLE VERSION

$ ansible-galaxy --version
ansible-galaxy 2.3.0.0
config file = /Users/<snip>/fathom/git/mdm-prime-1.5.9/ansible.cfg
configured module search path = [u'library']
python version = 2.7.8 (default, Oct 3 2016, 16:28:19) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)]

With ansible-galaxy 2.3 I ran:

ansible-galaxy install -r requirements.yml -p ./roles-g23 -f

And ansible-galaxy 2.2 I ran:

ansible-galaxy install -r requirements.yml -p ./roles-g22 -f

And then compared the output with:

diff -r roles-g22 roles-g23

And it appears that every file that ansible-galaxy downloaded that has the role name as part of the filename gets that removed from the filename:

$ diff -r roles-g22 roles-g23
Only in roles-g23/ada/files: _plr_gw_cons_group_metric.sql
Only in roles-g22/ada/files: ada_plr_gw_cons_group_metric.sql
diff -r roles-g22/ada/meta/.galaxy_install_info roles-g23/ada/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:30:41 2017', version: v1.4.1}
---
> {install_date: 'Sat Apr 15 00:32:46 2017', version: v1.4.1}
Only in roles-g23/ada/tasks: install__debs.yml
Only in roles-g22/ada/tasks: install_ada_debs.yml
Only in roles-g23/ada/templates: .application.ini.j2
Only in roles-g23/ada/templates: _db.properties.j2
Only in roles-g22/ada/templates: ada.application.ini.j2
Only in roles-g22/ada/templates: ada_db.properties.j2
Only in roles-g23/apache2/library: _conf.py
Only in roles-g23/apache2/library: _site.py
Only in roles-g22/apache2/library: apache2_conf.py
Only in roles-g22/apache2/library: apache2_site.py
diff -r roles-g22/apache2/meta/.galaxy_install_info roles-g23/apache2/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:30:50 2017', version: v0.1.3}
---
> {install_date: 'Sat Apr 15 00:32:55 2017', version: v0.1.3}
diff -r roles-g22/artifactory-client/meta/.galaxy_install_info roles-g23/artifactory-client/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:31:01 2017', version: v0.3.0}
---
> {install_date: 'Sat Apr 15 00:33:05 2017', version: v0.3.0}
diff -r roles-g22/cassandra/meta/.galaxy_install_info roles-g23/cassandra/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:30:33 2017', version: v0.1.4}
---
> {install_date: 'Sat Apr 15 00:32:38 2017', version: v0.1.4}
Only in roles-g23/cassandra/tasks: .yml
Only in roles-g22/cassandra/tasks: cassandra.yml
Only in roles-g23/cassandra/templates: -2.1.yaml.j2
Only in roles-g23/cassandra/templates: -2.2.yaml.j2
Only in roles-g23/cassandra/templates: -env-2.1.sh.j2
Only in roles-g23/cassandra/templates: -env-2.2.sh.j2
Only in roles-g22/cassandra/templates: cassandra-2.1.yaml.j2
Only in roles-g22/cassandra/templates: cassandra-2.2.yaml.j2
Only in roles-g22/cassandra/templates: cassandra-env-2.1.sh.j2
Only in roles-g22/cassandra/templates: cassandra-env-2.2.sh.j2
diff -r roles-g22/cis/meta/.galaxy_install_info roles-g23/cis/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:30:46 2017', version: v0.6.1}
---
> {install_date: 'Sat Apr 15 00:32:51 2017', version: v0.6.1}
diff -r roles-g22/cluster/meta/.galaxy_install_info roles-g23/cluster/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:30:38 2017', version: v0.3.1}
---
> {install_date: 'Sat Apr 15 00:32:43 2017', version: v0.3.1}
diff -r roles-g22/common-apt-tools/meta/.galaxy_install_info roles-g23/common-apt-tools/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:30:20 2017', version: v0.1.0}
---
> {install_date: 'Sat Apr 15 00:32:25 2017', version: v0.1.0}
diff -r roles-g22/disk/meta/.galaxy_install_info roles-g23/disk/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:31:05 2017', version: v0.1.1}
---
> {install_date: 'Sat Apr 15 00:33:09 2017', version: v0.1.1}
Only in roles-g23/disk/tasks: -old.yml
Only in roles-g23/disk/tasks: .yml
Only in roles-g22/disk/tasks: disk-old.yml
Only in roles-g22/disk/tasks: disk.yml
diff -r roles-g22/file_slurper/meta/.galaxy_install_info roles-g23/file_slurper/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:30:36 2017', version: v0.7.2}
---
> {install_date: 'Sat Apr 15 00:32:41 2017', version: v0.7.2}
diff -r roles-g22/ldap_client/meta/.galaxy_install_info roles-g23/ldap_client/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:31:04 2017', version: v1.1.2}
---
> {install_date: 'Sat Apr 15 00:33:07 2017', version: v1.1.2}
Only in roles-g23/mdm/files: -env
Only in roles-g22/mdm/files: mdm-env
diff -r roles-g22/mdm/meta/.galaxy_install_info roles-g23/mdm/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:30:48 2017', version: v0.7.5}
---
> {install_date: 'Sat Apr 15 00:32:53 2017', version: v0.7.5}
diff -r roles-g22/mdm-service-user/meta/.galaxy_install_info roles-g23/mdm-service-user/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:30:22 2017', version: v0.15.0}
---
> {install_date: 'Sat Apr 15 00:32:28 2017', version: v0.15.0}
diff -r roles-g22/mds/meta/.galaxy_install_info roles-g23/mds/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:30:43 2017', version: v0.7.1}
---
> {install_date: 'Sat Apr 15 00:32:48 2017', version: v0.7.1}
diff -r roles-g22/oracle-jdk/meta/.galaxy_install_info roles-g23/oracle-jdk/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:30:29 2017', version: v0.2.1}
---
> {install_date: 'Sat Apr 15 00:32:34 2017', version: v0.2.1}
diff -r roles-g22/postgresql/meta/.galaxy_install_info roles-g23/postgresql/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:30:31 2017', version: v0.7.0}
---
> {install_date: 'Sat Apr 15 00:32:36 2017', version: v0.7.0}
Only in roles-g23/postgresql/templates: .conf-9.3.j2
Only in roles-g23/postgresql/templates: .conf-9.3.orig
Only in roles-g23/postgresql/templates: .conf-9.4.j2
Only in roles-g23/postgresql/templates: .conf-9.4.orig
Only in roles-g23/postgresql/templates: etc_apt_preferences.d_apt__org_pub_repos_apt.pref.j2
Only in roles-g22/postgresql/templates: etc_apt_preferences.d_apt_postgresql_org_pub_repos_apt.pref.j2
Only in roles-g23/postgresql/templates: etc_monit_conf.d_.j2
Only in roles-g22/postgresql/templates: etc_monit_conf.d_postgresql.j2
Only in roles-g22/postgresql/templates: postgresql.conf-9.3.j2
Only in roles-g22/postgresql/templates: postgresql.conf-9.3.orig
Only in roles-g22/postgresql/templates: postgresql.conf-9.4.j2
Only in roles-g22/postgresql/templates: postgresql.conf-9.4.orig
diff -r roles-g22/set-timezone/meta/.galaxy_install_info roles-g23/set-timezone/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:30:26 2017', version: v0.2.0}
---
> {install_date: 'Sat Apr 15 00:32:31 2017', version: v0.2.0}
diff -r roles-g22/sftp-user/meta/.galaxy_install_info roles-g23/sftp-user/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:30:59 2017', version: v0.8.0}
---
> {install_date: 'Sat Apr 15 00:33:03 2017', version: v0.8.0}
Only in roles-g23/sftp-user/test/integration/default/inspec: README.md
Only in roles-g23/sftp-user/test/integration/default/inspec: controls
Only in roles-g23/sftp-user/test/integration/default/inspec: inspec.yml
Only in roles-g23/sftp-user/test/integration/default/inspec: libraries
Only in roles-g22/sftp-user/test/integration/default/inspec: sftp-user
diff -r roles-g22/swap/meta/.galaxy_install_info roles-g23/swap/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:30:24 2017', version: v1.1.0}
---
> {install_date: 'Sat Apr 15 00:32:29 2017', version: v1.1.0}
diff -r roles-g22/u2you/meta/.galaxy_install_info roles-g23/u2you/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:30:54 2017', version: v0.8.7}
---
> {install_date: 'Sat Apr 15 00:32:58 2017', version: v0.8.7}
Only in roles-g23/u2you/tasks: deploy__artifact.yml
Only in roles-g22/u2you/tasks: deploy_u2you_artifact.yml
Only in roles-g23/u2you/test/integration/files: star..gwfathom.com.cert.pem
Only in roles-g23/u2you/test/integration/files: star..gwfathom.com.csr.pem
Only in roles-g23/u2you/test/integration/files: star..gwfathom.com.key.pem
Only in roles-g22/u2you/test/integration/files: star.u2you.gwfathom.com.cert.pem
Only in roles-g22/u2you/test/integration/files: star.u2you.gwfathom.com.csr.pem
Only in roles-g22/u2you/test/integration/files: star.u2you.gwfathom.com.key.pem
diff -r roles-g22/u2you-backend/meta/.galaxy_install_info roles-g23/u2you-backend/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:30:56 2017', version: v0.1.3}
---
> {install_date: 'Sat Apr 15 00:33:00 2017', version: v0.1.3}
diff -r roles-g22/zabbix-agent/meta/.galaxy_install_info roles-g23/zabbix-agent/meta/.galaxy_install_info
1c1
< {install_date: 'Sat Apr 15 00:31:08 2017', version: v0.1.3}
---
> {install_date: 'Sat Apr 15 00:33:11 2017', version: v0.1.3}

I haven't had time yet to debug why, but just wanted to report this. If I have time over the weekend I will try to narrow down what change caused this.

Issue 2:
ISSUE TYPE

Bug Report

Feature Idea

Documentation Report

COMPONENT NAME

ANSIBLE VERSION

ansible 2.3.0 (devel 8b6d786cff) last updated 2017/03/13 09:15:01 (GMT -400)
config file = /home/adrian/.ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.13 (default, Jan 12 2017, 17:59:37) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)]

CONFIGURATION

[defaults]
# though role path is always specified with -p for these case
roles_path = $HOME/ansible/galaxy-roles:$HOME/ansible/roles:/etc/ansible/roles

OS / ENVIRONMENT

SUMMARY

Looking at #22562 and trying to reproduce it

(ala https://github.com/alikins/ansible-bug-repro/tree/master/role_sudo_22562)

I noticed the weird behavior when ansible-galaxy tries to install https://github.com/jlund/ansible-go from a requirements.yml

It seems like the git repo being named 'ansible-go' is confusing it. The role that gets installed

ends up being installed with the name 'go'.

[fedora-25:github_roles (master %)]$ ansible-galaxy -vvv install -r requirements.yml -p roles_external/
Using /home/adrian/.ansible.cfg as config file
Opened /home/adrian/.ansible_galaxy
found role {'scm': 'git', 'src': 'https://github.com/jlund/ansible-go', 'version': 'cfeba7c4db16aac3fa3db775d01ea911b21f828d', 'name': 'go'} in yaml file
Installing role go
- extracting go to roles_external/go
- go (cfeba7c4db16aac3fa3db775d01ea911b21f828d) was installed successfully

Compared to installing via a scm url without the requirements.yml

[fedora-25:github_roles (master %)]$ ansible-galaxy -vvvvv install git+ssh://git@github.com/jlund/ansible-go -p roles_external/
Using /home/adrian/.ansible.cfg as config file
Opened /home/adrian/.ansible_galaxy
Installing role ansible-go
- extracting ansible-go to roles_external/ansible-go
- ansible-go was installed successfully
[fedora-25:github_roles (master %)]$ ls roles_external/
ansible-go

But the odder part is that the file names in the 'files/' section get changed.

as in the upstream git repo:

[fedora-25:github_roles (master %)]$ ls upstream_git/ansible-go/files/
go-bin.sh go-path.sh

as installed via requirements.yml:

[fedora-25:github_roles (master %)]$ ls roles_via_requirements/go/files/
-bin.sh -path.sh

Presumably something is attempting to strip 'ansible' off the repo url for the role name. And maybe something is stripping the role name off of files/* for some reason??

STEPS TO REPRODUCE

[fedora-25:github_roles (master %)]$ mkdir upstream_git
[fedora-25:github_roles (master %)]$ cd upstream_git/
[fedora-25:upstream_git (master %)]$ git clone https://github.com/jlund/ansible-go
Cloning into 'ansible-go'...
remote: Counting objects: 166, done.
remote: Total 166 (delta 0), reused 0 (delta 0), pack-reused 166
Receiving objects: 100% (166/166), 21.25 KiB | 0 bytes/s, done.
Resolving deltas: 100% (50/50), done.
Checking connectivity... done.
[fedora-25:upstream_git (master %)]$ ls ansible-go/files/
go-bin.sh go-path.sh
[fedora-25:upstream_git (master %)]$ cd ..
[fedora-25:github_roles (master %)]$ ls
ansible-go requirements2.yml requirements_example.yml requirements.yml roles_external upstream_git
[fedora-25:github_roles (master %)]$ rm -rf ansible-go/
[fedora-25:github_roles (master %)]$ cat requirements.yml
---
- name: go
src: https://github.com/jlund/ansible-go
version: cfeba7c4db16aac3fa3db775d01ea911b21f828d
[fedora-25:github_roles (master %)]$ rm -rf roles_external/*
[fedora-25:github_roles (master %)]$ ansible-galaxy -vvvvv install -r requirements.yml -p roles_external/
Using /home/adrian/.ansible.cfg as config file
Opened /home/adrian/.ansible_galaxy
found role {'scm': 'git', 'src': 'https://github.com/jlund/ansible-go', 'version': 'cfeba7c4db16aac3fa3db775d01ea911b21f828d', 'name': 'go'} in yaml file
Installing role go
- extracting go to roles_external/go
- go (cfeba7c4db16aac3fa3db775d01ea911b21f828d) was installed successfully
[fedora-25:github_roles (master %)]$ ls roles_external/go/
defaults files meta README.md tasks vars
[fedora-25:github_roles (master %)]$ ls roles_external/go/files/
-bin.sh -path.sh

EXPECTED RESULTS

I guess the same behavior as if installing it via git scm url:

[fedora-25:github_roles (master %)]$ ansible-galaxy -vvvvv install git+ssh://git@github.com/jlund/ansible-go -p roles_external/
Using /home/adrian/.ansible.cfg as config file
Opened /home/adrian/.ansible_galaxy
Installing role ansible-go
- extracting ansible-go to roles_external/ansible-go
- ansible-go was installed successfully
[fedora-25:github_roles (master %)]$ ls roles_external/
ansible-go
[fedora-25:github_roles (master %)]$ ls roles_external/ansible-go/files/
go-bin.sh go-path.sh

ACTUAL RESULTS

[fedora-25:github_roles (master %)]$ ansible-galaxy -vvv install -r requirements.yml -p roles_via_requirements/
Using /home/adrian/.ansible.cfg as config file
Opened /home/adrian/.ansible_galaxy
found role {'scm': 'git', 'src': 'https://github.com/jlund/ansible-go', 'version': 'cfeba7c4db16aac3fa3db775d01ea911b21f828d', 'name': 'go'} in yaml file
Installing role go
- extracting go to roles_via_requirements/go
- go (cfeba7c4db16aac3fa3db775d01ea911b21f828d) was installed successfully