<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<br>
ansible-playbook</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.0.0
  config file =
  configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.2.0.0
  config file =
  configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Darwin junction.local 16.1.0 Darwin Kernel Version 16.1.0: Wed Oct 19 20:31:56 PDT 2016; root:xnu-3789.21.4~4/RELEASE_X86_64 x86_64</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">In ansible 2.1 we were using an encrypted inventory to do deployments, see the project here: <a href="https://github.com/MindLeaps/tracker/tree/master/deploy">https://github.com/MindLeaps/tracker/tree/master/deploy</a></p>
<p dir="auto">In ansible 2.2 with the same command, ansible appears to no longer decrypt the inventory. The playbook doesn't match any hosts. If we change the playbook to match <code class="notranslate">all</code> we get an error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [38303030316563383161373464373362663333376565313664316663336337316131]: UNREACHABLE! =&gt; {
    &quot;changed&quot;: false,
    &quot;msg&quot;: &quot;Failed to connect to the host via ssh: ControlPath too long\r\n&quot;,
    &quot;unreachable&quot;: true
}"><pre class="notranslate"><code class="notranslate">fatal: [38303030316563383161373464373362663333376565313664316663336337316131]: UNREACHABLE! =&gt; {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: ControlPath too long\r\n",
    "unreachable": true
}
</code></pre></div>
<p dir="auto">It appears to be treating the inventory in its encrypted form as a list of hosts.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Use an encrypted inventory to deploy.</p>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Expect 2.2 to work as 2.1 did. Encrypted inventories should be decrypted when supplied with the correct password.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="No config file found; using defaults
[DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default).
This feature will be removed in a future release. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.

PLAYBOOK: playbook.yml *********************************************************
1 plays in playbook.yml

PLAY RECAP *********************************************************************"><pre class="notranslate"><code class="notranslate">No config file found; using defaults
[DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default).
This feature will be removed in a future release. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.

PLAYBOOK: playbook.yml *********************************************************
1 plays in playbook.yml

PLAY RECAP *********************************************************************
</code></pre></div>
<p dir="auto">Playbook does not match expected hosts, ignores inventory.</p>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>

<p dir="auto">Ansible Version: ansible 2.2.0.0<br>
Cofiguration: ansible.cfg(in present directory)</p>
<p dir="auto">OS: Ubuntu 14.04 LTS</p>
<p dir="auto">ansible-playbook not able to decrypt the files which encrypted with ansible 2.1.0.0 &amp; below.</p>
<p dir="auto">Steps to reproduce:</p>
<ol dir="auto">
<li>Install ansible 2.1.0.0 or below</li>
<li>Encrypt an inventory file</li>
<li>Add vault_password_file in ansible.cfg</li>
<li>Run, ansible-playbook -i inventory/qa site.yml which works fine.</li>
<li>Now install ansible 2.2.0.0</li>
<li>Run, ansible-playbook -i inventory/qa site.yml which gives below error.</li>
</ol>
<p dir="auto">fatal: [$ANSIBLE_VAULT;1.1;AES256]: UNREACHABLE! =&gt; {<br>
"changed": false,<br>
"msg": "Failed to connect to the host via ssh: ssh: Could not resolve hostname $ansible_vault;1.1;aes256: Name or service not known\r\n",<br>
"unreachable": true<br>
}</p>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Plays has to start executing.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">Get below error:<br>
fatal: [$ANSIBLE_VAULT;1.1;AES256]: UNREACHABLE! =&gt; {<br>
"changed": false,<br>
"msg": "Failed to connect to the host via ssh: ssh: Could not resolve hostname $ansible_vault;1.1;aes256: Name or service not known\r\n",<br>
"unreachable": true<br>
}</p>