35 lines
609 B
YAML
35 lines
609 B
YAML
---
|
|
- name: Install web server
|
|
hosts: 7-ubuntu
|
|
handlers:
|
|
- name: Reload apache
|
|
systemd:
|
|
name: "apache2"
|
|
state: "reloaded"
|
|
|
|
tasks:
|
|
- name: Install web server
|
|
package:
|
|
name: "apache2"
|
|
state: present
|
|
tags: install
|
|
|
|
- name: Set homepage
|
|
template:
|
|
src: ./index.html.j2
|
|
dest: /var/www/html/index.html
|
|
notify: Reload apache
|
|
tags:
|
|
- configure
|
|
- index
|
|
|
|
- name: Set homepage2
|
|
template:
|
|
src: ./index.html.j2
|
|
dest: /var/www/html/index7.html
|
|
notify: Reload apache
|
|
tags:
|
|
- configure
|
|
- index
|
|
|