first commit

This commit is contained in:
변정훈
2023-06-28 16:06:04 +09:00
commit b0a10e3011
2 changed files with 23 additions and 0 deletions

3
ansible.cfg Normal file
View File

@@ -0,0 +1,3 @@
[defaults]
display_skipped_hosts = false

20
ipcheck.yaml Normal file
View File

@@ -0,0 +1,20 @@
---
- hosts: localhost
gather_facts: false
tasks:
- name: Check IP address availability
shell: ping -c 1 10.10.43.{{ item }}
register: ping_result
failed_when: false
changed_when: false
with_sequence: start=170 end=174
- name: Print IP address status
failed_when: false
changed_when: false
debug:
msg: "10.10.43.{{ item.item }} 이용 가능"
with_items: "{{ ping_result.results }}"
loop_control:
label: "{{ item.item }}"
when: "'100.0% packet loss' in item.stdout"