Discussion:
[ansible-project] Running from Source - callbacks error
Ethan Merrill
2015-07-06 19:39:57 UTC
Permalink
Hi...

I just setup a new ubuntu system to run from source using the "sudo make
install" command. When I try to run scripts that use "from ansible import
callbacks" Python gives an error that callbacks doesn't exist. If I just
try running the following from the command line I get the same:

***@precise64:~/ansible$ python
Python 2.7.3 (default, Jun 22 2015, 19:33:41)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ansible import callbacks
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name callbacks
However importing other things like ansible utils does work.

I notice that there are no longer any callback py or pyc files
in /usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/:

***@precise64:/usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible$
ll
total 112
drwxr-sr-x 18 root staff 4096 Jul 6 19:32 ./
drwxr-sr-x 4 root staff 4096 Jul 6 19:32 ../
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 cli/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 compat/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 config/
-rwxr-xr-x 1 root staff 15580 Jul 6 19:32 constants.py*
-rw-r--r-- 1 root staff 13616 Jul 6 19:32 constants.pyc
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 errors/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 executor/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 galaxy/
-rwxr-xr-x 1 root staff 765 Jul 6 19:32 __init__.py*
-rw-r--r-- 1 root staff 242 Jul 6 19:32 __init__.pyc
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 inventory/
drwxr-sr-x 4 root staff 4096 Jul 6 19:32 modules/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 module_utils/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 new_inventory/
drwxr-sr-x 5 root staff 4096 Jul 6 19:32 parsing/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 playbook/
drwxr-sr-x 12 root staff 4096 Jul 6 19:32 plugins/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 template/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 utils/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 vars/
***@precise64:/usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible$

Are callbacks being referenced differently now?

Ethan
--
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-project+***@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/daf6990b-e940-4096-ad97-9256a1a7d509%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brian Coca
2015-07-06 20:16:18 UTC
Permalink
they should be under plugins/callbacks
Post by Ethan Merrill
Hi...
I just setup a new ubuntu system to run from source using the "sudo make
install" command. When I try to run scripts that use "from ansible import
callbacks" Python gives an error that callbacks doesn't exist. If I just
Python 2.7.3 (default, Jun 22 2015, 19:33:41)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ansible import callbacks
File "<stdin>", line 1, in <module>
ImportError: cannot import name callbacks
However importing other things like ansible utils does work.
I notice that there are no longer any callback py or pyc files in
ll
total 112
drwxr-sr-x 18 root staff 4096 Jul 6 19:32 ./
drwxr-sr-x 4 root staff 4096 Jul 6 19:32 ../
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 cli/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 compat/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 config/
-rwxr-xr-x 1 root staff 15580 Jul 6 19:32 constants.py*
-rw-r--r-- 1 root staff 13616 Jul 6 19:32 constants.pyc
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 errors/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 executor/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 galaxy/
-rwxr-xr-x 1 root staff 765 Jul 6 19:32 __init__.py*
-rw-r--r-- 1 root staff 242 Jul 6 19:32 __init__.pyc
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 inventory/
drwxr-sr-x 4 root staff 4096 Jul 6 19:32 modules/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 module_utils/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 new_inventory/
drwxr-sr-x 5 root staff 4096 Jul 6 19:32 parsing/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 playbook/
drwxr-sr-x 12 root staff 4096 Jul 6 19:32 plugins/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 template/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 utils/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 vars/
Are callbacks being referenced differently now?
Ethan
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/daf6990b-e940-4096-ad97-9256a1a7d509%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Brian Coca
--
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-project+***@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/CAJ5XC8n0_E9Z5XNMf3jH5dY8gwyMVJO4coqtUbaMP%2BWF%2BLUJEg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Ethan Merrill
2015-07-06 20:25:29 UTC
Permalink
I see plugins/callback (notice it's singular) and the contents don't appear
to be the same as the callbacks py/pyc files from earlier.

Ethan
Post by Brian Coca
they should be under plugins/callbacks
Post by Ethan Merrill
Hi...
I just setup a new ubuntu system to run from source using the "sudo make
install" command. When I try to run scripts that use "from ansible
import
Post by Ethan Merrill
callbacks" Python gives an error that callbacks doesn't exist. If I
just
Post by Ethan Merrill
Python 2.7.3 (default, Jun 22 2015, 19:33:41)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ansible import callbacks
File "<stdin>", line 1, in <module>
ImportError: cannot import name callbacks
However importing other things like ansible utils does work.
I notice that there are no longer any callback py or pyc files in
ll
total 112
drwxr-sr-x 18 root staff 4096 Jul 6 19:32 ./
drwxr-sr-x 4 root staff 4096 Jul 6 19:32 ../
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 cli/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 compat/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 config/
-rwxr-xr-x 1 root staff 15580 Jul 6 19:32 constants.py*
-rw-r--r-- 1 root staff 13616 Jul 6 19:32 constants.pyc
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 errors/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 executor/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 galaxy/
-rwxr-xr-x 1 root staff 765 Jul 6 19:32 __init__.py*
-rw-r--r-- 1 root staff 242 Jul 6 19:32 __init__.pyc
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 inventory/
drwxr-sr-x 4 root staff 4096 Jul 6 19:32 modules/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 module_utils/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 new_inventory/
drwxr-sr-x 5 root staff 4096 Jul 6 19:32 parsing/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 playbook/
drwxr-sr-x 12 root staff 4096 Jul 6 19:32 plugins/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 template/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 utils/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 vars/
Are callbacks being referenced differently now?
Ethan
--
You received this message because you are subscribed to the Google
Groups
Post by Ethan Merrill
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send
an
<javascript:>.
Post by Ethan Merrill
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/daf6990b-e940-4096-ad97-9256a1a7d509%40googlegroups.com.
Post by Ethan Merrill
For more options, visit https://groups.google.com/d/optout.
--
Brian Coca
--
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-project+***@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/e4229b86-0dc0-47f3-aaf0-17677bfb17a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brian Coca
2015-07-06 20:28:38 UTC
Permalink
we have not finished porting allt he callbacks, the API has changed a
bit, but the default ones used by ansible and ansible-playbook should
be there
Post by Ethan Merrill
I see plugins/callback (notice it's singular) and the contents don't appear
to be the same as the callbacks py/pyc files from earlier.
Ethan
Post by Brian Coca
they should be under plugins/callbacks
Post by Ethan Merrill
Hi...
I just setup a new ubuntu system to run from source using the "sudo make
install" command. When I try to run scripts that use "from ansible import
callbacks" Python gives an error that callbacks doesn't exist. If I just
Python 2.7.3 (default, Jun 22 2015, 19:33:41)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ansible import callbacks
File "<stdin>", line 1, in <module>
ImportError: cannot import name callbacks
However importing other things like ansible utils does work.
I notice that there are no longer any callback py or pyc files in
ll
total 112
drwxr-sr-x 18 root staff 4096 Jul 6 19:32 ./
drwxr-sr-x 4 root staff 4096 Jul 6 19:32 ../
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 cli/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 compat/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 config/
-rwxr-xr-x 1 root staff 15580 Jul 6 19:32 constants.py*
-rw-r--r-- 1 root staff 13616 Jul 6 19:32 constants.pyc
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 errors/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 executor/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 galaxy/
-rwxr-xr-x 1 root staff 765 Jul 6 19:32 __init__.py*
-rw-r--r-- 1 root staff 242 Jul 6 19:32 __init__.pyc
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 inventory/
drwxr-sr-x 4 root staff 4096 Jul 6 19:32 modules/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 module_utils/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 new_inventory/
drwxr-sr-x 5 root staff 4096 Jul 6 19:32 parsing/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 playbook/
drwxr-sr-x 12 root staff 4096 Jul 6 19:32 plugins/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 template/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 utils/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 vars/
Are callbacks being referenced differently now?
Ethan
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/daf6990b-e940-4096-ad97-9256a1a7d509%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Brian Coca
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/e4229b86-0dc0-47f3-aaf0-17677bfb17a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Brian Coca
--
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-project+***@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/CAJ5XC8nCmmJ3bETJSXw-dKS%2BSw48enp9pu-tWX4axB1iX_EA4Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Ethan Merrill
2015-07-07 13:56:21 UTC
Permalink
Ok, can you please try this simple test and let me know if you see the same?

Start with new ubuntu machine
$ git clone git://github.com/ansible/ansible.git --recursive
$ cd ./ansible
$ sudo make install
$ python
Post by Brian Coca
Post by Ethan Merrill
from ansible import callbacks
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name callbacks
Post by Brian Coca
we have not finished porting allt he callbacks, the API has changed a
bit, but the default ones used by ansible and ansible-playbook should
be there
Post by Ethan Merrill
I see plugins/callback (notice it's singular) and the contents don't
appear
Post by Ethan Merrill
to be the same as the callbacks py/pyc files from earlier.
Ethan
they should be under plugins/callbacks
Post by Ethan Merrill
Hi...
I just setup a new ubuntu system to run from source using the "sudo
make
Post by Ethan Merrill
Post by Ethan Merrill
install" command. When I try to run scripts that use "from ansible import
callbacks" Python gives an error that callbacks doesn't exist. If I just
Python 2.7.3 (default, Jun 22 2015, 19:33:41)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
Post by Ethan Merrill
Post by Ethan Merrill
from ansible import callbacks
File "<stdin>", line 1, in <module>
ImportError: cannot import name callbacks
However importing other things like ansible utils does work.
I notice that there are no longer any callback py or pyc files in
ll
total 112
drwxr-sr-x 18 root staff 4096 Jul 6 19:32 ./
drwxr-sr-x 4 root staff 4096 Jul 6 19:32 ../
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 cli/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 compat/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 config/
-rwxr-xr-x 1 root staff 15580 Jul 6 19:32 constants.py*
-rw-r--r-- 1 root staff 13616 Jul 6 19:32 constants.pyc
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 errors/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 executor/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 galaxy/
-rwxr-xr-x 1 root staff 765 Jul 6 19:32 __init__.py*
-rw-r--r-- 1 root staff 242 Jul 6 19:32 __init__.pyc
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 inventory/
drwxr-sr-x 4 root staff 4096 Jul 6 19:32 modules/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 module_utils/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 new_inventory/
drwxr-sr-x 5 root staff 4096 Jul 6 19:32 parsing/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 playbook/
drwxr-sr-x 12 root staff 4096 Jul 6 19:32 plugins/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 template/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 utils/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 vars/
Are callbacks being referenced differently now?
Ethan
--
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
Post by Ethan Merrill
Post by Ethan Merrill
an
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/daf6990b-e940-4096-ad97-9256a1a7d509%40googlegroups.com.
Post by Ethan Merrill
Post by Ethan Merrill
For more options, visit https://groups.google.com/d/optout.
--
Brian Coca
--
You received this message because you are subscribed to the Google
Groups
Post by Ethan Merrill
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send
an
<javascript:>.
Post by Ethan Merrill
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/e4229b86-0dc0-47f3-aaf0-17677bfb17a7%40googlegroups.com.
Post by Ethan Merrill
For more options, visit https://groups.google.com/d/optout.
--
Brian Coca
--
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-project+***@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/473c5dea-5c5b-48cd-ab34-4de6002c7765%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brian Coca
2015-07-07 14:01:38 UTC
Permalink
"from ansible import callbacks" is not valid in v2
Post by Ethan Merrill
Ok, can you please try this simple test and let me know if you see the same?
Start with new ubuntu machine
$ git clone git://github.com/ansible/ansible.git --recursive
$ cd ./ansible
$ sudo make install
$ python
Post by Brian Coca
Post by Ethan Merrill
from ansible import callbacks
File "<stdin>", line 1, in <module>
ImportError: cannot import name callbacks
Post by Brian Coca
we have not finished porting allt he callbacks, the API has changed a
bit, but the default ones used by ansible and ansible-playbook should
be there
Post by Ethan Merrill
I see plugins/callback (notice it's singular) and the contents don't appear
to be the same as the callbacks py/pyc files from earlier.
Ethan
they should be under plugins/callbacks
Post by Ethan Merrill
Hi...
I just setup a new ubuntu system to run from source using the "sudo make
install" command. When I try to run scripts that use "from ansible import
callbacks" Python gives an error that callbacks doesn't exist. If I just
Python 2.7.3 (default, Jun 22 2015, 19:33:41)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ansible import callbacks
File "<stdin>", line 1, in <module>
ImportError: cannot import name callbacks
However importing other things like ansible utils does work.
I notice that there are no longer any callback py or pyc files in
ll
total 112
drwxr-sr-x 18 root staff 4096 Jul 6 19:32 ./
drwxr-sr-x 4 root staff 4096 Jul 6 19:32 ../
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 cli/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 compat/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 config/
-rwxr-xr-x 1 root staff 15580 Jul 6 19:32 constants.py*
-rw-r--r-- 1 root staff 13616 Jul 6 19:32 constants.pyc
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 errors/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 executor/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 galaxy/
-rwxr-xr-x 1 root staff 765 Jul 6 19:32 __init__.py*
-rw-r--r-- 1 root staff 242 Jul 6 19:32 __init__.pyc
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 inventory/
drwxr-sr-x 4 root staff 4096 Jul 6 19:32 modules/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 module_utils/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 new_inventory/
drwxr-sr-x 5 root staff 4096 Jul 6 19:32 parsing/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 playbook/
drwxr-sr-x 12 root staff 4096 Jul 6 19:32 plugins/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 template/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 utils/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 vars/
Are callbacks being referenced differently now?
Ethan
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/daf6990b-e940-4096-ad97-9256a1a7d509%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Brian Coca
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/e4229b86-0dc0-47f3-aaf0-17677bfb17a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Brian Coca
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/473c5dea-5c5b-48cd-ab34-4de6002c7765%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Brian Coca
--
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-project+***@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/CAJ5XC8k22H3knke571dvv8yXrjy3J%3Dz8DroDn7ZGbKLT699Z7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Ethan Merrill
2015-07-07 18:59:06 UTC
Permalink
Is there doc on how to do this in v2? The equivalent of:

from ansible import callbacks
from ansible import utils

stats = callbacks.AggregateStats()
playbook_cb = callbacks.PlaybookCallbacks(verbose=utils.VERBOSITY)
runner_cb = callbacks.PlaybookRunnerCallbacks(stats, verbose=utils.VERBOSITY)
Post by Brian Coca
"from ansible import callbacks" is not valid in v2
Post by Ethan Merrill
Ok, can you please try this simple test and let me know if you see the
same?
Post by Ethan Merrill
Start with new ubuntu machine
$ git clone git://github.com/ansible/ansible.git --recursive
$ cd ./ansible
$ sudo make install
$ python
Post by Brian Coca
Post by Ethan Merrill
from ansible import callbacks
File "<stdin>", line 1, in <module>
ImportError: cannot import name callbacks
Post by Brian Coca
we have not finished porting allt he callbacks, the API has changed a
bit, but the default ones used by ansible and ansible-playbook should
be there
Post by Ethan Merrill
I see plugins/callback (notice it's singular) and the contents don't appear
to be the same as the callbacks py/pyc files from earlier.
Ethan
they should be under plugins/callbacks
Post by Ethan Merrill
Hi...
I just setup a new ubuntu system to run from source using the
"sudo
Post by Ethan Merrill
Post by Brian Coca
Post by Ethan Merrill
Post by Ethan Merrill
make
install" command. When I try to run scripts that use "from
ansible
Post by Ethan Merrill
Post by Brian Coca
Post by Ethan Merrill
Post by Ethan Merrill
import
callbacks" Python gives an error that callbacks doesn't exist. If
I
Post by Ethan Merrill
Post by Brian Coca
Post by Ethan Merrill
Post by Ethan Merrill
just
Python 2.7.3 (default, Jun 22 2015, 19:33:41)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ansible import callbacks
File "<stdin>", line 1, in <module>
ImportError: cannot import name callbacks
However importing other things like ansible utils does work.
I notice that there are no longer any callback py or pyc files in
ll
total 112
drwxr-sr-x 18 root staff 4096 Jul 6 19:32 ./
drwxr-sr-x 4 root staff 4096 Jul 6 19:32 ../
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 cli/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 compat/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 config/
-rwxr-xr-x 1 root staff 15580 Jul 6 19:32 constants.py*
-rw-r--r-- 1 root staff 13616 Jul 6 19:32 constants.pyc
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 errors/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 executor/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 galaxy/
-rwxr-xr-x 1 root staff 765 Jul 6 19:32 __init__.py*
-rw-r--r-- 1 root staff 242 Jul 6 19:32 __init__.pyc
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 inventory/
drwxr-sr-x 4 root staff 4096 Jul 6 19:32 modules/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 module_utils/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 new_inventory/
drwxr-sr-x 5 root staff 4096 Jul 6 19:32 parsing/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 playbook/
drwxr-sr-x 12 root staff 4096 Jul 6 19:32 plugins/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 template/
drwxr-sr-x 3 root staff 4096 Jul 6 19:32 utils/
drwxr-sr-x 2 root staff 4096 Jul 6 19:32 vars/
Are callbacks being referenced differently now?
Ethan
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/daf6990b-e940-4096-ad97-9256a1a7d509%40googlegroups.com.
Post by Ethan Merrill
Post by Brian Coca
Post by Ethan Merrill
Post by Ethan Merrill
For more options, visit https://groups.google.com/d/optout.
--
Brian Coca
--
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
Post by Ethan Merrill
Post by Brian Coca
Post by Ethan Merrill
an
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/e4229b86-0dc0-47f3-aaf0-17677bfb17a7%40googlegroups.com.
Post by Ethan Merrill
Post by Brian Coca
Post by Ethan Merrill
For more options, visit https://groups.google.com/d/optout.
--
Brian Coca
--
You received this message because you are subscribed to the Google
Groups
Post by Ethan Merrill
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send
an
<javascript:>.
Post by Ethan Merrill
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/473c5dea-5c5b-48cd-ab34-4de6002c7765%40googlegroups.com.
Post by Ethan Merrill
For more options, visit https://groups.google.com/d/optout.
--
Brian Coca
--
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-project+***@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/b997fd59-ed62-4d49-9525-e0c41b4863b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brian Coca
2015-07-07 19:49:46 UTC
Permalink
no, we really never have had API docs, the changes in v2 are
substantial and you'll probably need to rewrite all that, for example
runner does not exist anymore.
--
Brian Coca
--
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-project+***@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/CAJ5XC8kqHVYjeeuiWCaKGmOb5kUcHdPNu3A8RX15z3x7j3QixA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...