check ansible version with playbook

# ansible_version.yml: show ansible version on localhost
# execution example: ansible-playbook ansible_version.yml

- hosts: localhost

  tasks:

  - name: show ansible version
    debug:
      msg: "Ansible version is {{ ansible_version.full }}"

Leave a comment