Skip to content

Commit

Permalink
add-ping-package (kubernetes-sigs#9284)
Browse files Browse the repository at this point in the history
  • Loading branch information
yankay authored and enneitex committed Jan 25, 2023
1 parent 9e8907d commit 0e8eb18
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions roles/kubernetes/preinstall/tasks/0020-verify-settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,20 @@
- not ignore_assert_errors
- ip is defined

- name: Ensure ping package
package:
name: >-
{%- if ansible_os_family in ['RedHat', 'Suse'] -%}
iputils
{%- else -%}
iputils-ping
{%- endif -%}
state: present
when:
- access_ip is defined
- not ignore_assert_errors
- ping_access_ip

- name: Stop if access_ip is not pingable
command: ping -c1 {{ access_ip }}
when:
Expand Down

0 comments on commit 0e8eb18

Please sign in to comment.