25 lines
443 B
YAML
25 lines
443 B
YAML
---
|
|
- name: Install web server
|
|
hosts: 7-ubuntu
|
|
tasks:
|
|
- name: Install web server
|
|
package:
|
|
name: "apache2"
|
|
state: present
|
|
|
|
- name: Set homepage
|
|
template:
|
|
src: ./index.html.j2
|
|
dest: /var/www/html/index
|
|
register: homepage
|
|
|
|
- name: Look into homepage var
|
|
debug:
|
|
var: homepage
|
|
|
|
- name: Reload apache2
|
|
systemd:
|
|
name: "apache2"
|
|
state: "reloaded"
|
|
when: homepage is changed
|