l3d.ansile_version

Check Ansible Version

What does it do?

This role checks the version of the Ansible playbook. If the version is too old, it will fail. This helps avoid problems that can arise from using outdated Ansible installations.

How to use it?

Run this Ansible role on localhost.

Example playbook:

Using Ansible Galaxy:

# Install the 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:

Clone the role to your roles directory as ansible_version. Example:

git clone https://github.com/roles-ansible/ansible_role_versioncheck.git roles/ansible_version

Your playbook might look like this:

---
- name: Check if Ansible is not too old
  hosts: localhost
  tags:
    - default
    - version
    - always
  roles:
    - ansible_version
  gather_facts: false

Modifications

For changes or customizations, check the default folder.

Participation

This role is developed on GitHub. Feel free to add issues or pull requests there. Thank you! <3

Testing

This role is tested with GitHub Actions for various versions of Debian and Ubuntu. The linting is tested through Travis CI and the official Ansible GitHub action. For more details on the tests, check the GitHub Marketplace.

Test Status GitHub Marketplace
Ansible Lint check Ansible Lint Action
Yamllint GitHub Actions Yamllint GitHub Action
Galaxy Release Publish Ansible Role to Galaxy
Ansible check debian:stable Ansible Test with Debian Stable
Ansible check debian:sid Ansible Test with Debian Sid
Ansible check debian:buster Ansible Test with Debian Buster
Ansible check debian:stretch Ansible Test with Debian Stretch
Ansible check ubuntu:latest Ansible Test with Ubuntu Latest
Ansible check ubuntu:bionic Ansible Test with Ubuntu Bionic
Ansible check ubuntu:trusty Ansible Test with Ubuntu Trusty
Ansible check centos:centos7 Ansible Test with CentOS 7
Ansible check centos:centos8 Ansible Test with CentOS 8
Ansible check centos:latest Ansible Test with CentOS Latest
Informazioni sul progetto

Make sure you are only executing ansible with at least a specific ansible version.

Installa
ansible-galaxy install l3d.ansile_version
Licenza
mit
Download
36.9k
Proprietario
Ansible roles provide a framework for fully independent, or interdependent collections of variables,tasks,files,templates &modules. Here we maintain some. enjoy