Ansible 2.0.0 alpha is ready for testing!

377 views
Skip to first unread message

James Cammarata

unread,
Aug 27, 2015, 2:34:58 PM8/27/15
to ansible...@googlegroups.com, ansible-...@googlegroups.com, ansibl...@googlegroups.com
Hi all, I'm proud to announce that Ansible 2.0 alpha1 is available for download and testing today!

This alpha release is the culmination of many months of work to not only refactor the code base to increase stability, but to add some amazing new features:

* Blocks, which allow playbooks to do some basic try/except/finally style error handling
* Execution strategy plugins, which allow tasks to run in ways that differ from classic Ansible.
* Dynamic include statements, which bring back the ability to use include + with_* loops. In
  1.9.x   and before, includes function simply as a pre-processor macro, in which tasks are
  expanded before any task execution starts. Now, in 2.0 and beyond, includes are executed 
  as any other task is and expanded only at the point it is executed.
* A multitude of bug fixes - well over 200 issues were closed in just the main Ansible repository
  as part of the refactoring and cleanup.
* Over 140 new modules, including the new style Openstack modules, new VMware and 
  Cloudstack modules, and many more!

The full list of changes can be found here:


One thing you might notice is the release name - as of the 2.0 release we will now be tracking Led Zeppelin songs, with the first release being "Over the Hills and Far Away". Michael and I had discussed this all the way back in December of 2014, so it's nice being able to make it official :)

What will break?
----------------------------------------------------------------------

As we have noted in the past, we strove to maintain 100% backwards compatibility for playbooks, and where appropriate we have decided to deprecate some language features. These will continue to work, however you may notice an increase in deprecation messages.

The main issue some users may run into is the internal APIs for some plugins have changed (especially for Lookups and Action plugins), for which we will be writing a migration guide before the final 2.0 release.

How do you get it?
----------------------------------------------------------------------

The tar.gz of the release can be found here:

SHA256: d66578277595dd60083e63ee7b1f251903f8aefea50ea931054d4bf9bd29002b

You can also test against the git repository as follows:

$ cd ansible
$ git checkout v2.0.0-0.1.alpha1
$ git submodule update --init

You can then source our testing script:

$ . hacking/env-setup

or you can build your own .tar.gz (output will be dist/ansible-2.0.0.tar.gz):

$ make sdist

Thanks to everyone who has contributed to making this day possible!

James Cammarata
Director, Ansible Core Engineering
github: jimi-c

Bob Tanner

unread,
Aug 27, 2015, 6:16:49 PM8/27/15
to Ansible Development, ansible...@googlegroups.com, ansible-...@googlegroups.com
Does this mean v1 stuff is gone from devel branch?

First, rewinding head to replay your work on top of it...
warning: unable to rmdir v1/ansible/modules/core: Directory not empty
warning: unable to rmdir v1/ansible/modules/extras: Directory not empty

This is from my normal git clone via

git pull --rebase 
git submodule update --init --recursive

And not the above clone/checkout.

Brian Coca

unread,
Aug 27, 2015, 6:18:35 PM8/27/15
to Bob Tanner, Ansible Development, Ansible Project, ansible-...@googlegroups.com
yes
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-deve...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Brian Coca

Trond Hindenes

unread,
Aug 30, 2015, 5:55:35 AM8/30/15
to Ansible Development, basicth...@gmail.com, ansible...@googlegroups.com, ansible-...@googlegroups.com
Any plans to expand docs.ansible.com to include the new v2 functionality such as try blocks and similar? The only documentation I've seen so far is from a few slideshare prezos...

Abhijit Menon-Sen

unread,
Aug 30, 2015, 5:58:39 AM8/30/15
to Trond Hindenes, Ansible Development, basicth...@gmail.com, ansible...@googlegroups.com, ansible-...@googlegroups.com
At 2015-08-30 02:55:27 -0700, tr...@hindenes.com wrote:
>
> Any plans to expand docs.ansible.com to include the new v2
> functionality such as try blocks and similar?

It's been there for weeks now, e.g.:

http://docs.ansible.com/ansible/playbooks_blocks.html

-- Abhijit

Alex Leonhardt

unread,
Aug 30, 2015, 7:57:45 AM8/30/15
to ansible...@googlegroups.com, Trond Hindenes, Ansible Development, basicth...@gmail.com, ansible-...@googlegroups.com
There was talk of it being changed to a more pythonic way and use try: except: finally: and so on ? Was that dropped ?

Regards,
Alex
> --
> 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/20150830095830.GA7002%40toroid.org.
signature.asc

haad

unread,
Aug 31, 2015, 4:41:32 AM8/31/15
to James Cammarata, ansible...@googlegroups.com, ansibl...@googlegroups.com
Hi,

I tried to make some tests but it looks like ansible galaxy is broken for now

caracal:ansible (devel*) $ source hacking/env-setup
running egg_info
creating lib/ansible.egg-info
writing requirements to lib/ansible.egg-info/requires.txt
writing lib/ansible.egg-info/PKG-INFO
writing top-level names to lib/ansible.egg-info/top_level.txt
writing dependency_links to lib/ansible.egg-info/dependency_links.txt
writing manifest file 'lib/ansible.egg-info/SOURCES.txt'
reading manifest file 'lib/ansible.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'v2'
no previously-included directories found matching 'docsite'
no previously-included directories found matching 'ticket_stubs'
no previously-included directories found matching 'packaging'
no previously-included directories found matching 'test'
no previously-included directories found matching 'hacking'
warning: no files found matching 'contrib/inventory'
no previously-included directories found matching
'lib/ansible/modules/core/.git'
no previously-included directories found matching
'lib/ansible/modules/extras/.git'
writing manifest file 'lib/ansible.egg-info/SOURCES.txt'

Setting up Ansible to run out of checkout...

PATH=/Users/haad/Desktop/ansible-repos/ansible/bin:/Users/haad/.pythonz/bin:/Users/haad/.rvm/gems/ruby-2.1.1/bin:/Users/haad/.rvm/gems/ruby-2.1.1@global/bin:/Users/haad/.rvm/rubies/ruby-2.1.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/haad/.rvm/bin
PYTHONPATH=/Users/haad/Desktop/ansible-repos/ansible/lib:
MANPATH=/Users/haad/Desktop/ansible-repos/ansible/docs/man:

Remember, you may wish to specify your host file with -i

Done!

caracal:ansible (devel*) $ rm -rf /tmp/roles; ansible-galaxy install
-vvvvvv aeriscloud.dynamodb -p /tmp/roles
Using /Users/haad/.ansible.cfg as config file
Base API: https://galaxy.ansible.com/api/v1
96210 1441010353.70632: Installing role aeriscloud.dynamodb from
/tmp/roles/aeriscloud.dynamodb
- downloading role 'dynamodb', owned by aeriscloud
- https://galaxy.ansible.com/api/v1/roles/?owner__username=aeriscloud&name=dynamodb
- downloading role from
https://github.com/AerisCloud/ansible-dynamodb/archive/v1.0.0.tar.gz
- extracting aeriscloud.dynamodb to /tmp/roles/aeriscloud.dynamodb
- aeriscloud.dynamodb was installed successfully
96210 1441010355.68532: Installing dep aeriscloud.yum
Unexpected Exception: 'module' object has no attribute 'role_spec_parse'
the full traceback was:

Traceback (most recent call last):
File "/Users/haad/Desktop/ansible-repos/ansible/bin/ansible-galaxy",
line 79, in <module>
sys.exit(cli.run())
File "/Users/haad/Desktop/ansible-repos/ansible/lib/ansible/cli/galaxy.py",
line 125, in run
self.execute()
File "/Users/haad/Desktop/ansible-repos/ansible/lib/ansible/cli/__init__.py",
line 97, in execute
fn()
File "/Users/haad/Desktop/ansible-repos/ansible/lib/ansible/cli/galaxy.py",
line 454, in execute_install
dep = ansible.utils.role_spec_parse(dep)
AttributeError: 'module' object has no attribute 'role_spec_parse'

This happens on devel branch.
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-deve...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--


Regards.

Adam

James Cammarata

unread,
Sep 4, 2015, 5:19:35 PM9/4/15
to ansible...@googlegroups.com, Trond Hindenes, Ansible Development, Bob Tanner, ansible-...@googlegroups.com
Yes, we decided to stick with the block/rescue/always syntax so as not to confuse things, and it does make things a bit easier internally to python to not use reserved keywords for variable names.

James Cammarata
Director, Ansible Core Engineering
github: jimi-c

Reply all
Reply to author
Forward
0 new messages