This role check the ansible-playbook version and will fail, if it is to old. This should help prevent bigger issues with to old ansible installations
This anisble role should be executet on localhost
.
With ansible galaxy:
# install role
ansible-galaxy install do1jlr.ansible_version
Example playbook:
---
- hosts: localhost
roles:
- {role: do1jlr.ansible_version, tags: [version, always], gather_facts: false}
Without ansible galaxy:
Add this role to your roles as ansible_version
. Example:
git clone https://github.com/roles-ansible/ansible_role_versioncheck.git roles/ansible_version
Your Playbook could look like this:
---
- name: check if ansible is not to old
hosts: localhost
tags:
- default
- version
- always
roles:
- ansible_version
gather_facts: false
For possible modifications please have a look into the default
Folder!
This role is developed on github. Feel free to add any Issues or PullRequests there. Thanks <3
This role is tested with these github-action tests for different versions of debian and ubuntu. Linting is tested via travis-ci and the official ansible github action. If you want to find out more about our tests, please have a look at the github marketplace.