Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

ansible-galaxy

ANSIBLE VERSION

ansible 2.5.0 (devel 33c4351a35) last updated 2018/01/23 14:32:52 (GMT -700)
config file = None
configured module search path = [u'/home/benb/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /home/benb/dev/ansible/ansible/lib/ansible
executable location = /home/benb/dev/ansible/ansible/bin/ansible
python version = 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]

CONFIGURATION

OS / ENVIRONMENT

Ubuntu 16.04

SUMMARY

If a role has been installed in the default role path, it cannot be installed in another path using -p or --roles-path

STEPS TO REPRODUCE

$ ansible-galaxy install jdauphant.nginx
- downloading role 'nginx', owned by jdauphant
- downloading role from https://github.com/jdauphant/ansible-role-nginx/archive/v2.13.tar.gz
- extracting jdauphant.nginx to /home/benb/.ansible/roles/jdauphant.nginx
- jdauphant.nginx (v2.13) was installed successfully
$ ansible-galaxy install jdauphant.nginx -p ~/test
[WARNING]: - jdauphant.nginx (v2.13) is already installed - use --force to change version to unspecified

$ ansible-galaxy install jdauphant.nginx -p ~/test --force
- changing role jdauphant.nginx from v2.13 to unspecified
- downloading role 'nginx', owned by jdauphant
- downloading role from https://github.com/jdauphant/ansible-role-nginx/archive/v2.13.tar.gz
- extracting jdauphant.nginx to /home/benb/.ansible/roles/jdauphant.nginx
- jdauphant.nginx (v2.13) was installed successfully

EXPECTED RESULTS

jdauphant.nginx should be installed in ~/test and /home/benb/.ansible/roles/

ACTUAL RESULTS

jdauphant.nginx is installed only in /home/benb/.ansible/roles/

Issue 2:
ISSUE TYPE

Bug Report

COMPONENT NAME

ansible-vault

ANSIBLE VERSION

ansible 2.3.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]

CONFIGURATION

export ANSIBLE_VAULT_PASSWORD_FILE=~/.vault_pass.txt

OS / ENVIRONMENT

Ubuntu 16.04.2 LTS managing Ubuntu 12.04 LTS

SUMMARY

I was trying to use the Single Encrypted Variable feature for storing a password for new user creation, but I could not log in with the supplied password.

I used the debug module to show the output of the password_hash. Realizing that I could not be sure that the hash function had the proper input, I used to_nice_json instead. The resulting output was the encrypted ANSIBLE_VAULT string.

To verify I tried using the entire string as the password input when I ssh into the target host and it worked.

STEPS TO REPRODUCE

---
# vars file
upasswd: !vault |
$ANSIBLE_VAULT;1.1;AES256
33356630336539323036653532366332363230663664363839656230366462326162336538393065
6533663030353564663133646636396561383365383061610a353632376561303564626630616162
31616439613431333937643835653261616666653365333732366463616339316464616635353564
6236383732386636380a626130373936626639373861623263306435386639383839666261663434
3461

---
- debug:
msg: "{{ upasswd | to_nice_json }}"

EXPECTED RESULTS

TASK [adduser : debug] *********************************************************************************************
task path: /home/abonaparte/src/git/ansible/roles/adduser/tasks/adduser.yaml:2
ok: [app] => {
"msg": "\"testpw\""
}

ACTUAL RESULTS

TASK [adduser : debug] *********************************************************************************************
task path: /home/abonaparte/src/git/ansible/roles/adduser/tasks/adduser.yaml:2
ok: [app] => {
"msg": "\"$ANSIBLE_VAULT;1.1;AES256\\n33356630336539323036653532366332363230663664363839656230366462326162336538393065\\n6533663030353564663133646636396561383365383061610a353632376561303564626630616162\\n31616439613431333937643835653261616666653365333732366463616339316464616635353564\\n6236383732386636380a626130373936626639373861623263306435386639383839666261663434\\n3461\\n\""
}