Browse Source

add-ping-package (#9284)

pull/9308/head
Kay Yan 2 years ago
committed by GitHub
parent
commit
5d3326b93f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions
  1. 14
      roles/kubernetes/preinstall/tasks/0020-verify-settings.yml

14
roles/kubernetes/preinstall/tasks/0020-verify-settings.yml

@ -100,6 +100,20 @@
- not ignore_assert_errors - not ignore_assert_errors
- ip is defined - 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 - name: Stop if access_ip is not pingable
command: ping -c1 {{ access_ip }} command: ping -c1 {{ access_ip }}
when: when:

Loading…
Cancel
Save