You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.0 KiB

- name: Install LAMP stack
apt:
name: apache2, php, libapache2-mod-php, php-mysql, mariadb-server
state: present
update_cache: true
- name: Install Wordpress Pre-Reqs
apt:
name: php-curl, php-imagick, php-json, php-mbstring, php-xml, php-zip, php-gd, ghostscript, imagemagick
state: present
- name: Check Certificate Modify Dates
stat:
path: "{{ letsencrypt_certs_dir }}/{{ site_url }}.crt"
register: stat_results
- name: Get LetsEncrypt Certificates
import_tasks: letsencrypt.yml
when: ((ansible_date_time.epoch|int - stat_results.stat.mtime) > (90 * 60 * 60 * 24))
- name: Copy Apache config
template:
src: apache-site.conf
dest: /etc/apache2/sites-available/{{ site_url }}.conf
owner: root
group: root
mode: u=rw,g=r,o=r
- name: Enable Apache Modules
shell: a2enmod ssl rewrite
notify:
- Restart Apache
- name: Enable Apache site
shell: a2ensite {{ site_url }}
notify:
- Restart Apache