If possible we should ensure that we can run the playbooks using ansible 2.x as well as 1.9.z
one issue we have is that variables with leading underscores are not valid with ansible 2.0
Our organization has started to use version 2 for newer feature/modules ansible is providing. So this had started to hold us up. Unfortunately I'm not well into the world of python. I took a stab at this and ended up here:
TASK [Generate etcd instance names(s)] *****************************************
/Users/jskarbek/projects/openshift-ansible/lookup_plugins/sequence.py:18: RuntimeWarning: Parent module 'ansible.plugins.lookup' not found while handling absolute import
from ansible.errors import AnsibleError
/Users/jskarbek/projects/openshift-ansible/lookup_plugins/sequence.py:19: RuntimeWarning: Parent module 'ansible.plugins.lookup' not found while handling absolute import
import ansible.utils as utils
/Users/jskarbek/projects/openshift-ansible/lookup_plugins/sequence.py:20: RuntimeWarning: Parent module 'ansible.plugins.lookup' not found while handling absolute import
from re import compile as re_compile, IGNORECASE
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: __init__() takes exactly 2 arguments (1 given)
fatal: [localhost]: FAILED! => {"failed": true, "stdout": ""}
See my branch above for the changes made thus far. Aside from the error above, doesn't look too far away.
@jtslear thanks for digging into this.
The error you are seeing is because the sequence plugin in our repo (which we added as a workaround to a specific bug in one of the 1.9.x releases) is not compatible with 2.0.
Since the latest 1.9.4 release no longer needs this fix, I think we should just set the minimum supported version to 1.9.4 and then we can remove the sequence lookup plugin from our repo.
Ansible 2.0 support would be awesome. My team has to use SAML auth (which was never released into any Ansible 1.x branches) to deploy against a number of AWS accounts.
As it is, we are running Ansible from a git checkout that exists somewhere 1.9.x and 2.0, that has the SAML auth additions, but not the plugin breaking changes.
@benbarclay you may want to give https://github.com/openshift/openshift-ansible/pull/991 a try to see if it works for you.
I suspect there will be other issues along the way, but any testing we can get the better.
It'll probably be another few weeks before I get around to testing with 2.0
Would really like to use Ansible 2.x as well since they have fixed many issues regarding delegate_to logic.
This is done. There's a serious performance problem in Ansible 2.1 but the codebase should be compatible with both Ansible 2.1 and Ansible 2.2. Users interested in using Ansible 2.2 may get a build from https://copr.fedorainfracloud.org/coprs/abutcher/ansible/ until it's officially released.
Most helpful comment
Would really like to use Ansible 2.x as well since they have fixed many issues regarding delegate_to logic.