# Regression: ansible level branch unable to resolve playbook\_dir?

**URL:** <https://forum.ansible.com/t/regression-ansible-level-branch-unable-to-resolve-playbook-dir/16859>\
**Category:** Ansible Project\
**Created:** [November 23, 2014, 8:24pm UTC](https://forum.ansible.com/t/regression-ansible-level-branch-unable-to-resolve-playbook-dir/16859 "2014-11-23T20:24:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mirko\_Friedenhagen](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@Mirko\_Friedenhagen](https://forum.ansible.com/u/Mirko_Friedenhagen)\
**Post date:** [November 23, 2014, 8:24pm UTC](https://forum.ansible.com/t/regression-ansible-level-branch-unable-to-resolve-playbook-dir/16859/1 "2014-11-23T20:24:46Z")

</div>

Hello,

coming from 1.7.2 I just installed the devel branch (116109) via pip (git+https://github.com/ansible/ansible.git@devel#egg=ansible) (to get the omit feature). However a formerly working include:

- include: “{{playbook\_dir}}/roles/accounts/tasks/copy\_ssh\_keys\_for\_system.yml”

now does not work anymore, I get:  
ERROR: file could not read: /HOME/workspace/tooling/ci-setup/roles/ci/tasks/{{playbook\_dir}}/roles/accounts/tasks/copy\_ssh\_keys\_for\_system.yml

Is this a regression?  
Kind Regards  
Mirko

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [November 24, 2014, 10:36pm UTC](https://forum.ansible.com/t/regression-ansible-level-branch-unable-to-resolve-playbook-dir/16859/2 "2014-11-24T22:36:23Z")

</div>

A regression is a bug that was previously fixed that has reoccured, but does not apply to a new bug, which is simply a bug.

The Wise words of Will Woods here _almost_ get it right - [http://ohjeezlinux.wordpress.com/2013/01/03/new-rule-about-regressions/](http://ohjeezlinux.wordpress.com/2013/01/03/new-rule-about-regressions/)

It does seem that not having {{playbook\_dir}} defined is most definitely a bug however, so if you can file that on GitHub that would be great.

Thanks!

---

<div class="post-metadata">

**Author:** ![Mirko\_Friedenhagen](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@Mirko\_Friedenhagen](https://forum.ansible.com/u/Mirko_Friedenhagen)\
**Post date:** [November 25, 2014, 8:27am UTC](https://forum.ansible.com/t/regression-ansible-level-branch-unable-to-resolve-playbook-dir/16859/3 "2014-11-25T08:27:05Z")

</div>

Hello Michael,

thanks for your answer. I now tried to reproduce the bug with a tiny  
project. I now read that in 1.8 the modules are not part of ansible  
anymore, so I checked out the core and extras seperately.  
What I have done (this is on Mac OS X 10.10.1):

--- snip ---  
# PWD=$HOME/workspace/foss  
git clone [https://github.com/ansible/ansible](https://github.com/ansible/ansible)  
git clone [https://github.com/ansible/ansible-modules-core](https://github.com/ansible/ansible-modules-core)  
git clone [https://github.com/ansible/ansible-modules-extras](https://github.com/ansible/ansible-modules-extras)  
cd ansible  
make  
cd ..  
mkdir ansible-no-playbook  
cd ansible-no-playbook  
virtual-env2.7 /usr/bin/python2.7 venv  
. venv/bin/activate  
pip install ../ansible  
ansible --version (=1.8)  
echo 127.0.0.1 \> hosts  
--- snap ---

Now even running something like ansible-doc does no work correctly. I tried:  
./venv/bin/ansible-doc -M  
$HOME/workspace/foss/ansible-modules-core:$HOME/workspace/foss/ansible-modules-extras  
-l  
but nothing is shown.

I tried the following as well:

[default]  
hostfile=hosts  
library=HOME/workspace/foss/ansible-modules-core/:HOME/workspace/foss/ansible-modules-extras/

Now running ./venv/bin/ansible-doc -l throws an error:

Traceback (most recent call last):  
&nbsp;&nbsp;File "HOME/workspace/foss/ansible-no-playbook/venv/bin/ansible-doc",  
line 324, in \<module\>  
&nbsp;&nbsp;&nbsp;&nbsp;main()  
&nbsp;&nbsp;File "HOME/workspace/foss/ansible-no-playbook/venv/bin/ansible-doc",  
line 266, in main  
&nbsp;&nbsp;&nbsp;&nbsp;pager(get\_module\_list\_text(module\_list))  
&nbsp;&nbsp;File "HOME/workspace/foss/ansible-no-playbook/venv/bin/ansible-doc",  
line 169, in get\_module\_list\_text  
&nbsp;&nbsp;&nbsp;&nbsp;displace = max(len(x) for x in module\_list)  
ValueError: max() arg is an empty sequence

I even tried symlinking above repositories to  
venv/lib/python2.7/site-packages/ansible/modules as core and extras.

I am a little bit confused how to get this basically working?

Regards  
Mirko  
Regards Mirko

---

<div class="post-metadata">

**Author:** ![Mirko\_Friedenhagen](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@Mirko\_Friedenhagen](https://forum.ansible.com/u/Mirko_Friedenhagen)\
**Post date:** [November 25, 2014, 12:36pm UTC](https://forum.ansible.com/t/regression-ansible-level-branch-unable-to-resolve-playbook-dir/16859/4 "2014-11-25T12:36:57Z")

</div>

Bug filed: [https://github.com/ansible/ansible/issues/9618](https://github.com/ansible/ansible/issues/9618) 🙂  
Regards Mirko
