<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">ansible-galaxy</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="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]"><pre class="notranslate"><code class="notranslate">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]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Ubuntu 16.04</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">If a role has been installed in the default role path, it cannot be installed in another path using -p or --roles-path</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ 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"><pre class="notranslate"><code class="notranslate">$ 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
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">jdauphant.nginx should be installed in <code class="notranslate">~/test</code> and <code class="notranslate">/home/benb/.ansible/roles/</code></p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">jdauphant.nginx is installed only in <code class="notranslate">/home/benb/.ansible/roles/</code></p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">ansible-vault</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="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]"><pre class="notranslate"><code class="notranslate">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]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>

<p dir="auto">export ANSIBLE_VAULT_PASSWORD_FILE=~/.vault_pass.txt</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Ubuntu 16.04.2 LTS managing Ubuntu 12.04 LTS</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">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.</p>
<p dir="auto">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.</p>
<p dir="auto">To verify I tried using the entire string as the password input when I ssh into the target host and it worked.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>


<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---
# vars file
upasswd: !vault |
          $ANSIBLE_VAULT;1.1;AES256
          33356630336539323036653532366332363230663664363839656230366462326162336538393065
          6533663030353564663133646636396561383365383061610a353632376561303564626630616162
          31616439613431333937643835653261616666653365333732366463616339316464616635353564
          6236383732386636380a626130373936626639373861623263306435386639383839666261663434
          3461

---
- debug:
    msg: &quot;{{ upasswd | to_nice_json }}&quot;"><pre class="notranslate">---
<span class="pl-c"><span class="pl-c">#</span> vars file</span>
<span class="pl-ent">upasswd</span>: <span class="pl-k">!vault</span> <span class="pl-s">|</span>
<span class="pl-s">          $ANSIBLE_VAULT;1.1;AES256</span>
<span class="pl-s">          33356630336539323036653532366332363230663664363839656230366462326162336538393065</span>
<span class="pl-s">          6533663030353564663133646636396561383365383061610a353632376561303564626630616162</span>
<span class="pl-s">          31616439613431333937643835653261616666653365333732366463616339316464616635353564</span>
<span class="pl-s">          6236383732386636380a626130373936626639373861623263306435386639383839666261663434</span>
<span class="pl-s">          3461</span>
<span class="pl-s"></span>
<span class="pl-s"></span>---
- <span class="pl-ent">debug</span>:
    <span class="pl-ent">msg</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ upasswd | to_nice_json }}<span class="pl-pds">"</span></span></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [adduser : debug] *********************************************************************************************
task path: /home/abonaparte/src/git/ansible/roles/adduser/tasks/adduser.yaml:2
ok: [app] =&gt; {
    &quot;msg&quot;: &quot;\&quot;testpw\&quot;&quot;
}"><pre class="notranslate"><code class="notranslate">TASK [adduser : debug] *********************************************************************************************
task path: /home/abonaparte/src/git/ansible/roles/adduser/tasks/adduser.yaml:2
ok: [app] =&gt; {
    "msg": "\"testpw\""
}
</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [adduser : debug] *********************************************************************************************
task path: /home/abonaparte/src/git/ansible/roles/adduser/tasks/adduser.yaml:2
ok: [app] =&gt; {
    &quot;msg&quot;: &quot;\&quot;$ANSIBLE_VAULT;1.1;AES256\\n33356630336539323036653532366332363230663664363839656230366462326162336538393065\\n6533663030353564663133646636396561383365383061610a353632376561303564626630616162\\n31616439613431333937643835653261616666653365333732366463616339316464616635353564\\n6236383732386636380a626130373936626639373861623263306435386639383839666261663434\\n3461\\n\&quot;&quot;
}"><pre class="notranslate"><code class="notranslate">TASK [adduser : debug] *********************************************************************************************
task path: /home/abonaparte/src/git/ansible/roles/adduser/tasks/adduser.yaml:2
ok: [app] =&gt; {
    "msg": "\"$ANSIBLE_VAULT;1.1;AES256\\n33356630336539323036653532366332363230663664363839656230366462326162336538393065\\n6533663030353564663133646636396561383365383061610a353632376561303564626630616162\\n31616439613431333937643835653261616666653365333732366463616339316464616635353564\\n6236383732386636380a626130373936626639373861623263306435386639383839666261663434\\n3461\\n\""
}
</code></pre></div>