---
- hosts: web
remote_user: root
tasks:
- name: install one specific version of Apache
yum:
name: httpd
state: install
- lineinfile:
path: /etc/httpd/conf/httpd.conf
regexp: '^Listen'
line: 'Listen 8080'
- service:
name: httpd
enabled: yes
state: restarted
- copy:
src: /root/index.html
dest: /var/www/html/index.html
网友评论