apache_install.yaml
- hosts: 192.168.100.11
tasks:
- yum:
name: httpd
state: present
#-m yum -a "name=httpd state=present" -b μ κ°λ€ (Ad-hoc)
- service:
name: httpd
enabled: yes
state: started
# -m service -a "name=httpd state=started enabled=yes" -b (Ad-hoc)
ansible-playbook -i inventory.ini apache_install.yaml -b