howtos/Ansible/ansible_curso/facts/apache_facts.yml

31 lines
553 B
YAML

---
- hosts: grupo1
tasks:
- name: Instalando Apache
yum:
name: httpd
state: latest
- name: Arrancando servicios
service:
name: httpd
state: started
enabled: true
- name: Abrir firewall
firewalld:
service: http
immediate: true
permanent: true
state: enabled
- name: Contenido del index
copy:
content: "Bienvenido a mi web. Yo soy {{ ansible_hostname }} y mi ip es la {{ ansible_default_ipv4.address }}"
dest: /var/www/html/index.html
mode: 0644
...