Slide 14
Slide 14 text
WFSJGZZNM ςετఆٛ
——-
- name: Verify
hosts: all
gather_facts: false
pre_tasks:
- name: get httpd statusɹ#httpdͷstatusΛget͢Δ
service_facts:
tasks:
- name: test port 80 openɹ#80൪ϙʔτ͕ۭ͍͍ͯΔ͔֬ೝ
wait_for:
port: 80
timeout: 5
- name: test http enabled and started #httpdͷstate͕running, status͕enabledʹͳ͍ͬͯΔ͜ͱΛ֬ೝ
assert:
that:
- ansible_facts.services['httpd.service'].state == "running"
- ansible_facts.services['httpd.service'].status == "enabled"