--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### # Copyright (c) Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later - name: Install uv shell: | curl -LsSf https://astral.sh/uv/install.sh | sh environment: UV_INSTALL_DIR: /usr/local/bin - name: Install python 3.14 uv_python: version: 3.14 state: present - name: Re-install python 3.14 # installs latest patch version for 3.14 uv_python: version: 3.14 state: present - name: Install python 3.13.5 uv_python: version: 3.13.5 state: present - name: Re-install python 3.13.5 uv_python: version: 3.13.5 state: present - name: Remove unexisting python 3.15 # removes latest patch version for 3.15 if exists uv_python: version: 3.15 state: absent - name: Remove globally existing python 3.8 uv_python: version: 3.8 state: absent - name: Remove python 3.13.5 uv_python: version: 3.13.5 state: absent - name: Remove python 3.13.5 again uv_python: version: 3.13.5 state: absent - name: Install python 3 uv_python: version: 3 state: present register: result ignore_errors: true - name: Assert invalid version failed ansible.builtin.assert: that: - result is failed - "'Expected X.Y or X.Y.Z' in result.msg"