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:
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!
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
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
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…
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'
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'
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.