Skip to content

Commit

Permalink
Use run_once for checking ansible version instead of localhost (kuber…
Browse files Browse the repository at this point in the history
…netes-sigs#10908)

The `assert` module does not connect to the host anyway, and this avoids
skipping the assert when running with --limit.
  • Loading branch information
VannTen authored and pedromcpedro committed May 8, 2024
1 parent 1d68ee7 commit 667958e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions playbooks/ansible_version.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
- name: Check Ansible version
hosts: localhost
hosts: all
gather_facts: false
become: no
run_once: true
vars:
minimal_ansible_version: 2.15.5 # 2.15 versions before 2.15.5 are known to be buggy for kubespray
maximal_ansible_version: 2.17.0
ansible_connection: local
tags: always
tasks:
- name: "Check {{ minimal_ansible_version }} <= Ansible version < {{ maximal_ansible_version }}"
Expand Down

0 comments on commit 667958e

Please sign in to comment.