diff --git a/roles/wordpress/tasks/letsencrypt.yml b/roles/wordpress/tasks/letsencrypt.yml index 990c52a..b9c3574 100644 --- a/roles/wordpress/tasks/letsencrypt.yml +++ b/roles/wordpress/tasks/letsencrypt.yml @@ -50,7 +50,7 @@ - name: "Implement http-01 challenge files" copy: content: "{{ acme_challenge_domain['challenge_data'][item]['http-01']['resource_value'] }}" - dest: "/var/www/html/{{ acme_challenge_domain['challenge_data'][item]['http-01']['resource'] }}" + dest: "/var/www/html/{{ site_url }}/{{ acme_challenge_domain['challenge_data'][item]['http-01']['resource'] }}" owner: root group: root mode: u=rw,g=r,o=r diff --git a/roles/wordpress/tasks/setup.yml b/roles/wordpress/tasks/setup.yml index 4d1193e..fcb01a2 100644 --- a/roles/wordpress/tasks/setup.yml +++ b/roles/wordpress/tasks/setup.yml @@ -5,7 +5,7 @@ - name: Get LetsEncrypt Certificates import_tasks: letsencrypt.yml - when: (stat_results.stat.mtime is defined and (ansible_date_time.epoch|int - stat_results.stat.mtime) > (90 * 60 * 60 * 24)) + when: (stat_results.stat.mtime is undefined or (ansible_date_time.epoch|int - stat_results.stat.mtime) > (90 * 60 * 60 * 24)) - name: Copy Apache config template: diff --git a/vars.yml b/vars.yml index 134217c..7ca4276 100644 --- a/vars.yml +++ b/vars.yml @@ -2,6 +2,7 @@ # Website Configurations site_urls: - psm.msolidariti.org + - partisosialis.org admin_email: naresh@msolidariti.org # LetsEncrypt Configuration @@ -18,4 +19,5 @@ letsencrypt_account_key: /etc/letsencrypt/account/account.key # FirewallD firewalld_public_services: - https + - http