ansible-practice/register.yml
2023-11-08 14:58:46 +00:00

16 lines
292 B
YAML

---
- name: register
hosts: all
gather_facts: no
tasks:
- name: starting httpd
service: name=httpd state=started enabled=yes
- name: httpd status
command: service httpd status
register: httpd_status
- name: httpd status output
debug:
var: httpd_status