Regression: ansible level branch unable to resolve playbook_dir?

83 views
Skip to first unread message

Mirko Friedenhagen

unread,
Nov 23, 2014, 3:24:46 PM11/23/14
to ansible...@googlegroups.com
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

Michael DeHaan

unread,
Nov 24, 2014, 5:36:26 PM11/24/14
to ansible...@googlegroups.com
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/

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!

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9d517e1c-f0d3-49bf-a448-0c572eff61d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mirko Friedenhagen

unread,
Nov 25, 2014, 3:27:49 AM11/25/14
to ansible-project
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
git clone https://github.com/ansible/ansible-modules-core
git clone 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):
File "HOME/workspace/foss/ansible-no-playbook/venv/bin/ansible-doc",
line 324, in <module>
main()
File "HOME/workspace/foss/ansible-no-playbook/venv/bin/ansible-doc",
line 266, in main
pager(get_module_list_text(module_list))
File "HOME/workspace/foss/ansible-no-playbook/venv/bin/ansible-doc",
line 169, in get_module_list_text
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
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/
> https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgyW%2B9DuX%3DhhWQAiYcnJT6vXuwsU_RkF3B_2c__b-27jkg%40mail.gmail.com.

Mirko Friedenhagen

unread,
Nov 25, 2014, 7:37:44 AM11/25/14
to ansible-project
Reply all
Reply to author
Forward
0 new messages