ansible-skoleni/play-4.yml
2025-03-27 13:34:31 +01:00

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