To check the version of Ansible that is installed on a Linux or Unix system, you can use the ansible --version
command. This command will display the version number of the ansible package, as well as the version numbers of the required dependencies.
For example:
ansible --version
This will display the version of ansible that is installed on the system, as well as the version numbers of the required dependencies such as Python and Jinja2.
You can also use the pip
command to check the version of the ansible package that is installed on the system. pip
is a package manager for Python packages, and it is used to install, update, and manage Python packages, including ansible.
To check the version of the ansible package using pip
, use the following command:
pip show ansible
This will display the version of the ansible package that is installed on the system, as well as the location of the package and its dependencies.
Note that you may need to use sudo
to run these commands, depending on your system configuration and your user permissions.