2020-01-15 21:41:26 +01:00
|
|
|
Check Ansible Version
|
2019-10-01 23:15:15 +02:00
|
|
|
========================
|
2020-01-15 23:29:50 +01:00
|
|
|
[![Build Status](https://travis-ci.org/chaos-bodensee/role-ansible_version.svg?branch=master)](https://travis-ci.org/chaos-bodensee/role-ansible_version)
|
2019-10-01 23:15:15 +02:00
|
|
|
|
2020-01-15 21:41:26 +01:00
|
|
|
What is it doing?
|
|
|
|
--------------
|
2019-10-01 23:15:15 +02:00
|
|
|
|
2020-01-15 21:41:26 +01:00
|
|
|
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
|
2019-10-01 23:15:15 +02:00
|
|
|
|
2020-01-15 21:41:26 +01:00
|
|
|
How to use?
|
|
|
|
-----------
|
|
|
|
This anisble role should be executet on ``localhost``.
|
2019-10-01 23:15:15 +02:00
|
|
|
|
2020-01-15 21:41:26 +01:00
|
|
|
### Example playbook:
|
2020-01-15 21:50:35 +01:00
|
|
|
**With ansible galaxy:**
|
2020-01-15 21:41:26 +01:00
|
|
|
|
2020-01-15 22:05:00 +01:00
|
|
|
```bash
|
|
|
|
# install role
|
|
|
|
ansible-galaxy install do1jlr.ansible_version
|
|
|
|
```
|
|
|
|
|
|
|
|
Example playbook:
|
|
|
|
```
|
|
|
|
---
|
|
|
|
- hosts: localhost
|
|
|
|
roles:
|
|
|
|
- do1jlr.ansible_version
|
|
|
|
```
|
2020-01-15 21:41:26 +01:00
|
|
|
|
2020-01-15 21:50:35 +01:00
|
|
|
**Without ansible galaxy:**
|
2020-01-15 21:57:15 +01:00
|
|
|
|
|
|
|
Add this role to your roles as ``ansible_version``. *Example:*
|
2020-01-15 21:50:35 +01:00
|
|
|
```bash
|
|
|
|
git clone https://github.com/chaos-bodensee/role-ansible_version.git roles/ansible_version
|
|
|
|
```
|
|
|
|
|
|
|
|
Your Playbook could look like this:
|
|
|
|
```ini
|
|
|
|
---
|
2020-01-15 23:55:28 +01:00
|
|
|
- name: check if ansible is not to old
|
2020-01-15 21:50:35 +01:00
|
|
|
hosts: localhost
|
|
|
|
tags:
|
|
|
|
- default
|
|
|
|
roles:
|
|
|
|
- ansible_version
|
2020-01-16 00:09:42 +01:00
|
|
|
gather_facts: no
|
2020-01-15 21:50:35 +01:00
|
|
|
```
|
|
|
|
|
2020-01-15 21:41:26 +01:00
|
|
|
Modifications
|
|
|
|
------------
|
|
|
|
|
|
|
|
For possible modifications please have a look into the ``default`` Folder!
|
2020-01-15 23:21:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
Participation
|
|
|
|
-------------
|
|
|
|
This role is developed on [github](https://github.com/chaos-bodensee/role-ansible_version.git).
|
|
|
|
Feel free to add any Issues or PullRequests there. Thanks <3
|
|
|
|
|
2020-01-15 23:55:28 +01:00
|
|
|
|
|
|
|
### Testing
|
|
|
|
|
|
|
|
*This role is tested via travis-ci and docker. To test this role manual simply execute the ``.ansible-test.yml`` playbook inside this role.*
|