25 lines
653 B
YAML
25 lines
653 B
YAML
---
|
|
|
|
- name: Apache2 Install
|
|
ansible.builtin.include_tasks: httpd_install.yml
|
|
- name: Apache2 Default Config
|
|
ansible.builtin.include_tasks: httpd_default_config.yml
|
|
|
|
- name: Ensure Apache is running and enabled
|
|
ansible.builtin.service:
|
|
name: apache2
|
|
state: started
|
|
enabled: true
|
|
|
|
- name: Obtain Let's Encrypt certificate using certbot
|
|
ansible.builtin.command: >
|
|
certbot --apache -n --agree-tos --redirect
|
|
-d {{ httpd_site_name }}
|
|
--email {{ admin_email }}
|
|
args:
|
|
creates: "/etc/letsencrypt/live/{{ httpd_site_name }}/fullchain.pem"
|
|
|
|
- name: PHP Application
|
|
when: httpd_php
|
|
ansible.builtin.include_tasks: php.yml
|