1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_versioncheck.git synced 2024-08-16 15:59:49 +02:00
ansible_role_versioncheck/README.md

85 lines
6.7 KiB
Markdown
Raw Normal View History

2021-03-12 00:55:10 +01:00
[![Ansible Galaxy](https://raw.githubusercontent.com/roles-ansible/ansible_role_versioncheck/master/.github/galaxy.svg?sanitize=true)](https://galaxy.ansible.com/do1jlr/ansible_version/) [![MIT License](https://raw.githubusercontent.com/roles-ansible/ansible_role_versioncheck/master/.github/license.svg?sanitize=true)](https://github.com/roles-ansible/ansible_role_versioncheck/blob/master/LICENSE)
2020-03-03 12:50:37 +01:00
2020-01-15 21:41:26 +01:00
Check 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:
2021-03-12 00:51:23 +01:00
- {role: do1jlr.ansible_version, tags: [version, always], gather_facts: false}
2020-01-15 22:05:00 +01:00
```
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
2021-03-12 00:55:10 +01:00
git clone https://github.com/roles-ansible/ansible_role_versioncheck.git roles/ansible_version
2020-01-15 21:50:35 +01:00
```
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
- version
- always
2020-01-15 21:50:35 +01:00
roles:
- ansible_version
gather_facts: false
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!
Participation
-------------
2021-03-12 00:55:10 +01:00
This role is developed on [github](https://github.com/roles-ansible/ansible_role_versioncheck.git).
Feel free to add any Issues or PullRequests there. Thanks <3
2020-01-15 23:55:28 +01:00
2020-03-03 12:50:37 +01:00
Testing
---------
This role is tested with [these github-action](https://github.com/search?q=topic%3Acheck-ansible+topic%3Agithub-actions+org%3Aroles-ansible&type=Repositories) 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.
| test status | Github Marketplace |
| :--------- | :---------------- |
2021-03-12 00:55:10 +01:00
| [![Ansible Lint check](https://github.com/roles-ansible/ansible_role_versioncheck/workflows/Ansible%20Lint%20check/badge.svg)](https://github.com/roles-ansible/ansible_role_versioncheck/actions?query=workflow%3A%22Ansible+Lint+check%22) | [ansible-lint action](https://github.com/marketplace/actions/ansible-lint) |
| [![Yamllint GitHub Actions](https://github.com/roles-ansible/ansible_role_versioncheck/actions/workflows/yamllint.yaml/badge.svg)](https://github.com/roles-ansible/ansible_role_versioncheck/actions/workflows/yamllint.yaml) | [yamllint-github-action](https://github.com/marketplace/actions/yamllint-github-action) |
| [![Galaxy Release](https://github.com/roles-ansible/ansible_role_versioncheck/actions/workflows/galaxy.yml/badge.svg)](https://github.com/roles-ansible/ansible_role_versioncheck/actions/workflows/galaxy.yml) | [publish-ansible-role-to-galaxy](https://github.com/marketplace/actions/publish-ansible-role-to-galaxy) |
| [![Ansible check debian:stable](https://github.com/roles-ansible/ansible_role_versioncheck/workflows/Ansible%20check%20debian:stable/badge.svg)](https://github.com/roles-ansible/ansible_role_versioncheck/actions?query=workflow%3A%22Ansible+check+debian%3Astable%22) | [ansible test with debian stable](https://github.com/marketplace/actions/check-ansible-debian-stable) |
| [![Ansible check debian:sid](https://github.com/roles-ansible/ansible_role_versioncheck/workflows/Ansible%20check%20debian:sid/badge.svg)](https://github.com/roles-ansible/ansible_role_versioncheck/actions?query=workflow%3A%22Ansible+check+debian%3Asid%22) | [ansible test with debian sid](https://github.com/marketplace/actions/check-ansible-debian-sid) |
| [![Ansible check debian:buster](https://github.com/roles-ansible/ansible_role_versioncheck/workflows/Ansible%20check%20debian:buster/badge.svg)](https://github.com/roles-ansible/ansible_role_versioncheck/actions?query=workflow%3A%22Ansible+check+debian%3Abuster%22) | [ansible test with debian buster](https://github.com/marketplace/actions/check-ansible-debian-buster) |
| [![Ansible check debian:stretch](https://github.com/roles-ansible/ansible_role_versioncheck/workflows/Ansible%20check%20debian:stretch/badge.svg)](https://github.com/roles-ansible/ansible_role_versioncheck/actions?query=workflow%3A%22Ansible+check+debian%3Astretch%22) | [ansible test with debian stretch](https://github.com/marketplace/actions/check-ansible-debian-stretch) |
| [![Ansible check ubuntu:latest](https://github.com/roles-ansible/ansible_role_versioncheck/workflows/Ansible%20check%20ubuntu:latest/badge.svg)](https://github.com/roles-ansible/ansible_role_versioncheck/actions?query=workflow%3A%22Ansible+check+ubuntu%3Alatest%22) | [ansible test with ubuntu latest](https://github.com/marketplace/actions/check-ansible-ubuntu-latest) |
| [![Ansible check ubuntu:bionic](https://github.com/roles-ansible/ansible_role_versioncheck/workflows/Ansible%20check%20ubuntu:bionic/badge.svg)](https://github.com/roles-ansible/ansible_role_versioncheck/actions?query=workflow%3A%22Ansible+check+ubuntu%3Abionic%22) | [ansible test with ubuntu bionic](https://github.com/marketplace/actions/check-ansible-ubuntu-bionic) |
| [![Ansible check ubuntu:trusty](https://github.com/roles-ansible/ansible_role_versioncheck/workflows/Ansible%20check%20ubuntu:trusty/badge.svg)](https://github.com/roles-ansible/ansible_role_versioncheck/actions?query=workflow%3A%22Ansible+check+ubuntu%3Atrusty%22) | [ansible test with ubuntu trusty](https://github.com/marketplace/actions/check-ansible-ubuntu-trusty) |
| [![Ansible check centos:centos7](https://github.com/roles-ansible/ansible_role_versioncheck/workflows/Ansible%20check%20centos:centos7/badge.svg)](https://github.com/roles-ansible/ansible_role_versioncheck/actions?query=workflow%3A%22Ansible+check+centos%3Acentos7%22) | [ansible test with ubuntu xenial](https://github.com/marketplace/actions/check-ansible-centos-centos7) |
| [![Ansible check centos:centos8](https://github.com/roles-ansible/ansible_role_versioncheck/workflows/Ansible%20check%20centos:centos8/badge.svg)](https://github.com/roles-ansible/ansible_role_versioncheck/actions?query=workflow%3A%22Ansible+check+centos%3Acentos8%22) | [ansible test with ubuntu xenial](https://github.com/marketplace/actions/check-ansible-centos-centos8) |
| [![Ansible check centos:latest](https://github.com/roles-ansible/ansible_role_versioncheck/workflows/Ansible%20check%20centos:latest/badge.svg)](https://github.com/roles-ansible/ansible_role_versioncheck/actions?query=workflow%3A%22Ansible+check+centos%3Alatest%22) | [ansible test with ubuntu xenial](https://github.com/marketplace/actions/check-ansible-centos-latest) |