<h5 dir="auto">ISSUE TYPE</h5>

<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">Included / imported plays and group_vars loading</p>
<h5 dir="auto">ANSIBLE VERSION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ PYTHONPATH=~/ansible-2.4.0.0/lib ~/ansible-2.4.0.0/bin/ansible --version
ansible 2.4.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/centos/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/centos/ansible-2.4.0.0/lib/ansible
  executable location = /home/centos/ansible-2.4.0.0/bin/ansible
  python version = 2.7.5 (default, Nov 20 2015, 02:00:19) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
$"><pre class="notranslate"><code class="notranslate">$ PYTHONPATH=~/ansible-2.4.0.0/lib ~/ansible-2.4.0.0/bin/ansible --version
ansible 2.4.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/centos/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/centos/ansible-2.4.0.0/lib/ansible
  executable location = /home/centos/ansible-2.4.0.0/bin/ansible
  python version = 2.7.5 (default, Nov 20 2015, 02:00:19) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
$
</code></pre></div>
<p dir="auto">This is Ansible 2.4.0 RC2.</p>
<h5 dir="auto">CONFIGURATION</h5>

<p dir="auto">Nothing altered.</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>

<p dir="auto">Centos 7.2</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">The behavior of group_vars loading for included plays has changed between 2.3 and 2.4.  Previously the group_vars would load based on the initial playbook directory;  in 2.4 the group_vars loads from the included playbook's directory.  The behavior difference is a breaking change, leading to failures with existing playbooks structured in particular ways.</p>
<p dir="auto">I recognize that this breaking change may have been intended at 2.4.  The documentation (<a href="http://docs.ansible.com/ansible/latest/intro_inventory.html#splitting-out-host-and-group-specific-data" rel="nofollow">http://docs.ansible.com/ansible/latest/intro_inventory.html#splitting-out-host-and-group-specific-data</a>) refers only to "the playbook directory", which is unclear about whether that's the entry playbook or the included playbook.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>


<p dir="auto">entry.yml</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---
- hosts: all
  tasks:
  - name: From entry.yml
    debug:
      var: INSTALL_USER

- include: internal/testing.yml"><pre class="notranslate">---
- <span class="pl-ent">hosts</span>: <span class="pl-s">all</span>
  <span class="pl-ent">tasks</span>:
  - <span class="pl-ent">name</span>: <span class="pl-s">From entry.yml</span>
    <span class="pl-ent">debug</span>:
      <span class="pl-ent">var</span>: <span class="pl-s">INSTALL_USER</span>

- <span class="pl-ent">include</span>: <span class="pl-s">internal/testing.yml</span></pre></div>
<p dir="auto">internal/testing.yml</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---
- hosts: all
  tasks:
  - name: From internal/testing.yml
    debug:
      var: INSTALL_USER"><pre class="notranslate">---
- <span class="pl-ent">hosts</span>: <span class="pl-s">all</span>
  <span class="pl-ent">tasks</span>:
  - <span class="pl-ent">name</span>: <span class="pl-s">From internal/testing.yml</span>
    <span class="pl-ent">debug</span>:
      <span class="pl-ent">var</span>: <span class="pl-s">INSTALL_USER</span></pre></div>
<p dir="auto">group_vars/all</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---
INSTALL_USER: testing"><pre class="notranslate">---
<span class="pl-ent">INSTALL_USER</span>: <span class="pl-s">testing</span></pre></div>
<p dir="auto">inventories/inventory.ini</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="host ansible_connection=local"><pre class="notranslate"><code class="notranslate">host ansible_connection=local
</code></pre></div>
<p dir="auto">Execution:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible-playbook -i inventories/inventory.ini entry.yml"><pre class="notranslate"><code class="notranslate">ansible-playbook -i inventories/inventory.ini entry.yml
</code></pre></div>

<h5 dir="auto">EXPECTED RESULTS</h5>

<p dir="auto">I expected the same behavior I see in 2.3, where the group_vars/all entries are present for internal.testing.yml:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ 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.5 (default, Nov 20 2015, 02:00:19) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]

$ ansible-playbook -i inventories/inventory.ini entry.yml

PLAY [all] *************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************
ok: [host]

TASK [From entry.yml] **************************************************************************************************************************
ok: [host] =&gt; {
    &quot;INSTALL_USER&quot;: &quot;testing&quot;
}

PLAY [all] *************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************
ok: [host]

TASK [From internal/testing.yml] ***************************************************************************************************************
ok: [host] =&gt; {
    &quot;INSTALL_USER&quot;: &quot;testing&quot;
}

PLAY RECAP *************************************************************************************************************************************
host                       : ok=4    changed=0    unreachable=0    failed=0


$"><pre class="notranslate"><code class="notranslate">$ 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.5 (default, Nov 20 2015, 02:00:19) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]

$ ansible-playbook -i inventories/inventory.ini entry.yml

PLAY [all] *************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************
ok: [host]

TASK [From entry.yml] **************************************************************************************************************************
ok: [host] =&gt; {
    "INSTALL_USER": "testing"
}

PLAY [all] *************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************
ok: [host]

TASK [From internal/testing.yml] ***************************************************************************************************************
ok: [host] =&gt; {
    "INSTALL_USER": "testing"
}

PLAY RECAP *************************************************************************************************************************************
host                       : ok=4    changed=0    unreachable=0    failed=0


$
</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>


<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ PYTHONPATH=~/ansible-2.4.0.0/lib ~/ansible-2.4.0.0/bin/ansible --version
ansible 2.4.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/centos/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/centos/ansible-2.4.0.0/lib/ansible
  executable location = /home/centos/ansible-2.4.0.0/bin/ansible
  python version = 2.7.5 (default, Nov 20 2015, 02:00:19) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]

$ PYTHONPATH=~/ansible-2.4.0.0/lib ~/ansible-2.4.0.0/bin/ansible-playbook -i inventories/inventory.ini entry.yml
[DEPRECATION WARNING]: 'include' for playbook includes. You should use 'import_playbook' instead. This feature will be removed in version 2.8.
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

PLAY [all] *************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************
ok: [host]

TASK [From entry.yml] **************************************************************************************************************************
ok: [host] =&gt; {
    &quot;INSTALL_USER&quot;: &quot;testing&quot;
}

PLAY [all] *************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************
ok: [host]

TASK [From internal/testing.yml] ***************************************************************************************************************
ok: [host] =&gt; {
    &quot;INSTALL_USER&quot;: &quot;VARIABLE IS NOT DEFINED!&quot;
}

PLAY RECAP *************************************************************************************************************************************
host                       : ok=4    changed=0    unreachable=0    failed=0


$"><pre class="notranslate"><code class="notranslate">$ PYTHONPATH=~/ansible-2.4.0.0/lib ~/ansible-2.4.0.0/bin/ansible --version
ansible 2.4.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/centos/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/centos/ansible-2.4.0.0/lib/ansible
  executable location = /home/centos/ansible-2.4.0.0/bin/ansible
  python version = 2.7.5 (default, Nov 20 2015, 02:00:19) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]

$ PYTHONPATH=~/ansible-2.4.0.0/lib ~/ansible-2.4.0.0/bin/ansible-playbook -i inventories/inventory.ini entry.yml
[DEPRECATION WARNING]: 'include' for playbook includes. You should use 'import_playbook' instead. This feature will be removed in version 2.8.
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

PLAY [all] *************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************
ok: [host]

TASK [From entry.yml] **************************************************************************************************************************
ok: [host] =&gt; {
    "INSTALL_USER": "testing"
}

PLAY [all] *************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************
ok: [host]

TASK [From internal/testing.yml] ***************************************************************************************************************
ok: [host] =&gt; {
    "INSTALL_USER": "VARIABLE IS NOT DEFINED!"
}

PLAY RECAP *************************************************************************************************************************************
host                       : ok=4    changed=0    unreachable=0    failed=0


$
</code></pre></div>
<p dir="auto">If I create internal/testing/group_vars/all with a different INSTALL_USER value, then 2.4 uses that value while 2.3 does not:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ mkdir internal/group_vars

$ echo &quot;INSTALL_USER: different&quot; &gt; internal/group_vars/all

$ PYTHONPATH=~/ansible-2.4.0.0/lib ~/ansible-2.4.0.0/bin/ansible-playbook -i inventories/inventory.ini entry.yml
[DEPRECATION WARNING]: 'include' for playbook includes. You should use 'import_playbook' instead. This feature will be removed in version 2.8.
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

PLAY [all] *************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************
ok: [host]

TASK [From entry.yml] **************************************************************************************************************************
ok: [host] =&gt; {
    &quot;INSTALL_USER&quot;: &quot;testing&quot;
}

PLAY [all] *************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************
ok: [host]

TASK [From internal/testing.yml] ***************************************************************************************************************
ok: [host] =&gt; {
    &quot;INSTALL_USER&quot;: &quot;different&quot;
}

PLAY RECAP *************************************************************************************************************************************
host                       : ok=4    changed=0    unreachable=0    failed=0


$ ansible-playbook -i inventories/inventory.ini entry.yml

PLAY [all] *************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************
ok: [host]

TASK [From entry.yml] **************************************************************************************************************************
ok: [host] =&gt; {
    &quot;INSTALL_USER&quot;: &quot;testing&quot;
}

PLAY [all] *************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************
ok: [host]

TASK [From internal/testing.yml] ***************************************************************************************************************
ok: [host] =&gt; {
    &quot;INSTALL_USER&quot;: &quot;testing&quot;
}

PLAY RECAP *************************************************************************************************************************************
host                       : ok=4    changed=0    unreachable=0    failed=0


$"><pre class="notranslate"><code class="notranslate">$ mkdir internal/group_vars

$ echo "INSTALL_USER: different" &gt; internal/group_vars/all

$ PYTHONPATH=~/ansible-2.4.0.0/lib ~/ansible-2.4.0.0/bin/ansible-playbook -i inventories/inventory.ini entry.yml
[DEPRECATION WARNING]: 'include' for playbook includes. You should use 'import_playbook' instead. This feature will be removed in version 2.8.
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

PLAY [all] *************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************
ok: [host]

TASK [From entry.yml] **************************************************************************************************************************
ok: [host] =&gt; {
    "INSTALL_USER": "testing"
}

PLAY [all] *************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************
ok: [host]

TASK [From internal/testing.yml] ***************************************************************************************************************
ok: [host] =&gt; {
    "INSTALL_USER": "different"
}

PLAY RECAP *************************************************************************************************************************************
host                       : ok=4    changed=0    unreachable=0    failed=0


$ ansible-playbook -i inventories/inventory.ini entry.yml

PLAY [all] *************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************
ok: [host]

TASK [From entry.yml] **************************************************************************************************************************
ok: [host] =&gt; {
    "INSTALL_USER": "testing"
}

PLAY [all] *************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************
ok: [host]

TASK [From internal/testing.yml] ***************************************************************************************************************
ok: [host] =&gt; {
    "INSTALL_USER": "testing"
}

PLAY RECAP *************************************************************************************************************************************
host                       : ok=4    changed=0    unreachable=0    failed=0


$
</code></pre></div>
<h5 dir="auto">ISSUE TYPE</h5>

<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">Core / import_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.4.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/renji/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  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.4.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/renji/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  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>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[defaults]
log_path                        = ./logs/ansible.log
roles_path                      = /etc/ansible/roles/:roles/
jinja2_extensions               = jinja2.ext.do,jinja2.ext.i18n

host_key_checking               = no
retry_files_enabled             = no"><pre class="notranslate"><code class="notranslate">[defaults]
log_path                        = ./logs/ansible.log
roles_path                      = /etc/ansible/roles/:roles/
jinja2_extensions               = jinja2.ext.do,jinja2.ext.i18n

host_key_checking               = no
retry_files_enabled             = no
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>

<p dir="auto">Distributor ID:	Ubuntu<br>
Description:	Ubuntu 16.04.3 LTS<br>
Release:	16.04<br>
Codename:	xenial</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Vars scope is broken for a playbook imported with import_playbook and when this playbook is located in a sub directory.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>


<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---
- name: Test VARS
  hosts: all
  connection: local
  gather_facts: no
  tasks:
    - name: debug 1
      debug: var=backup

- import_playbook: test/pb__test_import.yml"><pre class="notranslate"><code class="notranslate">---
- name: Test VARS
  hosts: all
  connection: local
  gather_facts: no
  tasks:
    - name: debug 1
      debug: var=backup

- import_playbook: test/pb__test_import.yml
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---
- name: Test VARS
  hosts: all
  connection: local
  gather_facts: no
  tasks:
    - name: debug 2
      debug: var=backup"><pre class="notranslate"><code class="notranslate">---
- name: Test VARS
  hosts: all
  connection: local
  gather_facts: no
  tasks:
    - name: debug 2
      debug: var=backup
</code></pre></div>

<h5 dir="auto">EXPECTED RESULTS</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible-playbook 2.4.0
  config file = /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/ansible.cfg
  configured module search path = [u'/home/renji/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible-playbook
  python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
Using /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/ansible.cfg as config file
Vault password: 
setting up inventory plugins
Set default localhost to localhost
Parsed /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/inventories/int5 inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python2.7/dist-packages/ansible/plugins/callback/__init__.pyc

PLAYBOOK: pb__test.yml ****************************************************************************************************************************************************************************************************************
2 plays in pb__test.yml

PLAY [Test VARS] **********************************************************************************************************************************************************************************************************************
META: ran handlers
Found a vault_id (default) in the vaulttext
We have a secret associated with vault id (default), will try to use to decrypt /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/group_vars/all.yaml
Trying to use vault secret=(&lt;ansible.parsing.vault.PromptVaultSecret object at 0x7fadaafbc290&gt;) id=default to decrypt /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/group_vars/all.yaml
Trying secret &lt;ansible.parsing.vault.PromptVaultSecret object at 0x7fadaafbc290&gt; for vault_id=default
decrypt succesful with secret=&lt;ansible.parsing.vault.PromptVaultSecret object at 0x7fadaafbc290&gt; and vault_id=default
Found a vault_id (default) in the vaulttext
We have a secret associated with vault id (default), will try to use to decrypt /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/group_vars/int5.yaml
Trying to use vault secret=(&lt;ansible.parsing.vault.PromptVaultSecret object at 0x7fadaafbc290&gt;) id=default to decrypt /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/group_vars/int5.yaml
Trying secret &lt;ansible.parsing.vault.PromptVaultSecret object at 0x7fadaafbc290&gt; for vault_id=default
decrypt succesful with secret=&lt;ansible.parsing.vault.PromptVaultSecret object at 0x7fadaafbc290&gt; and vault_id=default

TASK [debug 1] ************************************************************************************************************************************************************************************************************************
task path: /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/pb__test_vars.yml:7
ok: [asa-aub-i-fwloob-0000] =&gt; {
    &quot;backup&quot;: {
        &quot;diff&quot;: {
            &quot;parts&quot;: &quot;tmp/gitDiff/&quot;, 
            &quot;report&quot;: &quot;tmp/git.diff&quot;
        }, 
        &quot;git&quot;: {
            &quot;repository&quot;: &quot;https://git.corp.cloudwatt.com/noc/backup-int5.git&quot;
        }, 
        &quot;location&quot;: &quot;../backups/int5&quot;, 
        &quot;log&quot;: {
            &quot;down&quot;: &quot;logs/down.log&quot;
        }
    }
}
META: ran handlers
META: ran handlers

PLAY [Test VARS] **********************************************************************************************************************************************************************************************************************
META: ran handlers

TASK [debug 2] ************************************************************************************************************************************************************************************************************************
task path: /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/pb__test_import.yml:7
ok: [asa-aub-i-fwloob-0000] =&gt; {
    &quot;backup&quot;: {
        &quot;diff&quot;: {
            &quot;parts&quot;: &quot;tmp/gitDiff/&quot;, 
            &quot;report&quot;: &quot;tmp/git.diff&quot;
        }, 
        &quot;git&quot;: {
            &quot;repository&quot;: &quot;https://git.corp.cloudwatt.com/noc/backup-int5.git&quot;
        }, 
        &quot;location&quot;: &quot;../backups/int5&quot;, 
        &quot;log&quot;: {
            &quot;down&quot;: &quot;logs/down.log&quot;
        }
    }
}
META: ran handlers
META: ran handlers

PLAY RECAP ****************************************************************************************************************************************************************************************************************************
asa-aub-i-fwloob-0000      : ok=2    changed=0    unreachable=0    failed=0"><pre class="notranslate"><code class="notranslate">ansible-playbook 2.4.0
  config file = /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/ansible.cfg
  configured module search path = [u'/home/renji/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible-playbook
  python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
Using /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/ansible.cfg as config file
Vault password: 
setting up inventory plugins
Set default localhost to localhost
Parsed /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/inventories/int5 inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python2.7/dist-packages/ansible/plugins/callback/__init__.pyc

PLAYBOOK: pb__test.yml ****************************************************************************************************************************************************************************************************************
2 plays in pb__test.yml

PLAY [Test VARS] **********************************************************************************************************************************************************************************************************************
META: ran handlers
Found a vault_id (default) in the vaulttext
We have a secret associated with vault id (default), will try to use to decrypt /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/group_vars/all.yaml
Trying to use vault secret=(&lt;ansible.parsing.vault.PromptVaultSecret object at 0x7fadaafbc290&gt;) id=default to decrypt /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/group_vars/all.yaml
Trying secret &lt;ansible.parsing.vault.PromptVaultSecret object at 0x7fadaafbc290&gt; for vault_id=default
decrypt succesful with secret=&lt;ansible.parsing.vault.PromptVaultSecret object at 0x7fadaafbc290&gt; and vault_id=default
Found a vault_id (default) in the vaulttext
We have a secret associated with vault id (default), will try to use to decrypt /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/group_vars/int5.yaml
Trying to use vault secret=(&lt;ansible.parsing.vault.PromptVaultSecret object at 0x7fadaafbc290&gt;) id=default to decrypt /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/group_vars/int5.yaml
Trying secret &lt;ansible.parsing.vault.PromptVaultSecret object at 0x7fadaafbc290&gt; for vault_id=default
decrypt succesful with secret=&lt;ansible.parsing.vault.PromptVaultSecret object at 0x7fadaafbc290&gt; and vault_id=default

TASK [debug 1] ************************************************************************************************************************************************************************************************************************
task path: /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/pb__test_vars.yml:7
ok: [asa-aub-i-fwloob-0000] =&gt; {
    "backup": {
        "diff": {
            "parts": "tmp/gitDiff/", 
            "report": "tmp/git.diff"
        }, 
        "git": {
            "repository": "https://git.corp.cloudwatt.com/noc/backup-int5.git"
        }, 
        "location": "../backups/int5", 
        "log": {
            "down": "logs/down.log"
        }
    }
}
META: ran handlers
META: ran handlers

PLAY [Test VARS] **********************************************************************************************************************************************************************************************************************
META: ran handlers

TASK [debug 2] ************************************************************************************************************************************************************************************************************************
task path: /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/pb__test_import.yml:7
ok: [asa-aub-i-fwloob-0000] =&gt; {
    "backup": {
        "diff": {
            "parts": "tmp/gitDiff/", 
            "report": "tmp/git.diff"
        }, 
        "git": {
            "repository": "https://git.corp.cloudwatt.com/noc/backup-int5.git"
        }, 
        "location": "../backups/int5", 
        "log": {
            "down": "logs/down.log"
        }
    }
}
META: ran handlers
META: ran handlers

PLAY RECAP ****************************************************************************************************************************************************************************************************************************
asa-aub-i-fwloob-0000      : ok=2    changed=0    unreachable=0    failed=0
</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>


<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible-playbook 2.4.0
  config file = /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/ansible.cfg
  configured module search path = [u'/home/renji/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible-playbook
  python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
Using /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/ansible.cfg as config file
Vault password: 
setting up inventory plugins
Set default localhost to localhost
Parsed /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/inventories/int5 inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python2.7/dist-packages/ansible/plugins/callback/__init__.pyc

PLAYBOOK: pb__test.yml ****************************************************************************************************************************************************************************************************************
2 plays in pb__test.yml

PLAY [Test VARS] **********************************************************************************************************************************************************************************************************************
META: ran handlers
Found a vault_id (default) in the vaulttext
We have a secret associated with vault id (default), will try to use to decrypt /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/group_vars/all.yaml
Trying to use vault secret=(&lt;ansible.parsing.vault.PromptVaultSecret object at 0x7f3d160de290&gt;) id=default to decrypt /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/group_vars/all.yaml
Trying secret &lt;ansible.parsing.vault.PromptVaultSecret object at 0x7f3d160de290&gt; for vault_id=default
decrypt succesful with secret=&lt;ansible.parsing.vault.PromptVaultSecret object at 0x7f3d160de290&gt; and vault_id=default
Found a vault_id (default) in the vaulttext
We have a secret associated with vault id (default), will try to use to decrypt /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/group_vars/int5.yaml
Trying to use vault secret=(&lt;ansible.parsing.vault.PromptVaultSecret object at 0x7f3d160de290&gt;) id=default to decrypt /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/group_vars/int5.yaml
Trying secret &lt;ansible.parsing.vault.PromptVaultSecret object at 0x7f3d160de290&gt; for vault_id=default
decrypt succesful with secret=&lt;ansible.parsing.vault.PromptVaultSecret object at 0x7f3d160de290&gt; and vault_id=default

TASK [debug 1] ************************************************************************************************************************************************************************************************************************
task path: /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/pb__test_vars.yml:7
ok: [asa-aub-i-fwloob-0000] =&gt; {
    &quot;backup&quot;: {
        &quot;diff&quot;: {
            &quot;parts&quot;: &quot;tmp/gitDiff/&quot;, 
            &quot;report&quot;: &quot;tmp/git.diff&quot;
        }, 
        &quot;git&quot;: {
            &quot;repository&quot;: &quot;https://git.corp.cloudwatt.com/noc/backup-int5.git&quot;
        }, 
        &quot;location&quot;: &quot;../backups/int5&quot;, 
        &quot;log&quot;: {
            &quot;down&quot;: &quot;logs/down.log&quot;
        }
    }
}
META: ran handlers
META: ran handlers

PLAY [Test VARS] **********************************************************************************************************************************************************************************************************************
META: ran handlers

TASK [debug 2] ************************************************************************************************************************************************************************************************************************
task path: /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/test/pb__test_import.yml:7
ok: [asa-aub-i-fwloob-0000] =&gt; {
    &quot;backup&quot;: &quot;VARIABLE IS NOT DEFINED!&quot;
}
META: ran handlers
META: ran handlers

PLAY RECAP ****************************************************************************************************************************************************************************************************************************
asa-aub-i-fwloob-0000      : ok=2    changed=0    unreachable=0    failed=0"><pre class="notranslate"><code class="notranslate">ansible-playbook 2.4.0
  config file = /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/ansible.cfg
  configured module search path = [u'/home/renji/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible-playbook
  python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
Using /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/ansible.cfg as config file
Vault password: 
setting up inventory plugins
Set default localhost to localhost
Parsed /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/inventories/int5 inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python2.7/dist-packages/ansible/plugins/callback/__init__.pyc

PLAYBOOK: pb__test.yml ****************************************************************************************************************************************************************************************************************
2 plays in pb__test.yml

PLAY [Test VARS] **********************************************************************************************************************************************************************************************************************
META: ran handlers
Found a vault_id (default) in the vaulttext
We have a secret associated with vault id (default), will try to use to decrypt /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/group_vars/all.yaml
Trying to use vault secret=(&lt;ansible.parsing.vault.PromptVaultSecret object at 0x7f3d160de290&gt;) id=default to decrypt /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/group_vars/all.yaml
Trying secret &lt;ansible.parsing.vault.PromptVaultSecret object at 0x7f3d160de290&gt; for vault_id=default
decrypt succesful with secret=&lt;ansible.parsing.vault.PromptVaultSecret object at 0x7f3d160de290&gt; and vault_id=default
Found a vault_id (default) in the vaulttext
We have a secret associated with vault id (default), will try to use to decrypt /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/group_vars/int5.yaml
Trying to use vault secret=(&lt;ansible.parsing.vault.PromptVaultSecret object at 0x7f3d160de290&gt;) id=default to decrypt /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/group_vars/int5.yaml
Trying secret &lt;ansible.parsing.vault.PromptVaultSecret object at 0x7f3d160de290&gt; for vault_id=default
decrypt succesful with secret=&lt;ansible.parsing.vault.PromptVaultSecret object at 0x7f3d160de290&gt; and vault_id=default

TASK [debug 1] ************************************************************************************************************************************************************************************************************************
task path: /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/pb__test_vars.yml:7
ok: [asa-aub-i-fwloob-0000] =&gt; {
    "backup": {
        "diff": {
            "parts": "tmp/gitDiff/", 
            "report": "tmp/git.diff"
        }, 
        "git": {
            "repository": "https://git.corp.cloudwatt.com/noc/backup-int5.git"
        }, 
        "location": "../backups/int5", 
        "log": {
            "down": "logs/down.log"
        }
    }
}
META: ran handlers
META: ran handlers

PLAY [Test VARS] **********************************************************************************************************************************************************************************************************************
META: ran handlers

TASK [debug 2] ************************************************************************************************************************************************************************************************************************
task path: /home/renji/scripts/cloudwatt/network/ansible/ansible-backup/test/pb__test_import.yml:7
ok: [asa-aub-i-fwloob-0000] =&gt; {
    "backup": "VARIABLE IS NOT DEFINED!"
}
META: ran handlers
META: ran handlers

PLAY RECAP ****************************************************************************************************************************************************************************************************************************
asa-aub-i-fwloob-0000      : ok=2    changed=0    unreachable=0    failed=0
</code></pre></div>