-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ansible deprecations #187
Fix ansible deprecations #187
Conversation
Some of this breaks compatibility for versions earlier than Ansible 2.8. For example, adding
The As stated in our Ansible documentation page, we currently target Ansible 2.5 as our minimum supported version. We also provide an alternative (running via Docker) for people who can't get that. Even our alternative method doesn't support Ansible 2.8, since Alpine Linux doesn't have it yet (not even on I guess this forces us to either:
It's incredibly silly how Ansible makes it hard to migrate.. New arguments would be introduced and it would cry like a baby if you don't use them.. But then if you add extra arguments, old versions which don't recognize them would completely break. It looks like something like this might work: - name: Ensure postgres Docker image is pulled (Ansible < 2.8)
docker_image:
name: "{{ matrix_postgres_docker_image_to_use }}"
when: "matrix_postgres_enabled and (ansible_version.major <= 2 and ansible_version.minor < 8)"
- name: Ensure postgres Docker image is pulled (Ansible >= 2.8)
docker_image:
name: "{{ matrix_postgres_docker_image_to_use }}"
source: pull
when: "matrix_postgres_enabled and (ansible_version.major > 2 or ansible_version.minor > 7)" That's a little ugly though.. We have 10+ invocations of the I don't see anything about not being able to use dashes in group names ( Thankfully, your commit message pointed me to I noticed that you're casting a lot of the Reading about
I suppose with Ansible 2.8+, anyone sane will always use I guess we should keep what you've done so far as a good initial thing which pleases the finicky Ansible 2.8, and we should proceed to add Wow, I'm appalled at how awful Ansible 2.8 is.. More magical than ever, having bad porting guide and (as always) giving the middle finger to easily making playbooks backward compatible. Hopefully, they know what they're doing and this is all for the better. Unfortunately, we are using Ansible (for lack of better alternative), so we have to follow it wherever it goes. I guess it's just the |
Wow, I had no idea ansible's backwards compatibility was so bad. I found an alternative solution for the source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" I tested it this time on both 2.8.0 and 2.7.10. |
Oh, that Merged! 👍 I've added a changelog note about the necessary manually changes to |
Ansible 2.8.0 added several deprecation warnings which affect this playbook, this fixes them.