From 332ff79f6122ca024753e9bf9f7438039ae1e45c Mon Sep 17 00:00:00 2001 From: nick Date: Tue, 24 Jan 2017 14:33:05 +0200 Subject: [PATCH] Fix .travis error: add certbot_webserver in default config --- defaults/main.yml | 1 + tasks/main.yml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 4d87d75..c69a2cf 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -14,6 +14,7 @@ certbot_auto_renew_hour: 3 certbot_auto_renew_minute: 30 # Install certificates +certbot_webserver: apache certbot_email: "" certbot_domain: "" certbot_subdomains: [] diff --git a/tasks/main.yml b/tasks/main.yml index a20b7af..65cb40d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -15,19 +15,19 @@ service: name: nginx state: stopped - when: drupalvm_webserver == 'nginx' + when: certbot_webserver == 'nginx' - name: Stop apache2 service: name: apache2 state: stopped - when: drupalvm_webserver == 'apache' and ansible_os_family == 'Debian' + when: certbot_webserver == 'apache' and ansible_os_family == 'Debian' - name: Stop httpd service: name: httpd state: stopped - when: drupalvm_webserver == 'apache' and ansible_os_family == 'RedHat' + when: certbot_webserver == 'apache' and ansible_os_family == 'RedHat' - name: Check if letsencrypt certificate file exists stat: path="/etc/letsencrypt/live/{{ certbot_domain }}/privkey.pem" @@ -46,19 +46,19 @@ service: name: nginx state: started - when: drupalvm_webserver == 'nginx' + when: certbot_webserver == 'nginx' - name: Start apache2 service: name: apache2 state: started - when: drupalvm_webserver == 'apache' and ansible_os_family == 'Debian' + when: certbot_webserver == 'apache' and ansible_os_family == 'Debian' - name: Start httpd service: name: httpd state: started - when: drupalvm_webserver == 'apache' and ansible_os_family == 'RedHat' + when: certbot_webserver == 'apache' and ansible_os_family == 'RedHat' - name: Add cron job for 'certbot-auto renew' (if configured). cron: @@ -68,7 +68,7 @@ hour: "{{ certbot_auto_renew_hour }}" user: "{{ certbot_auto_renew_user }}" cron_file: certbot-cron - when: certbot_auto_renew and drupalvm_webserver == 'nginx' + when: certbot_auto_renew and certbot_webserver == 'nginx' - name: Add cron job for 'certbot-auto renew' (if configured). cron: @@ -78,7 +78,7 @@ hour: "{{ certbot_auto_renew_hour }}" user: "{{ certbot_auto_renew_user }}" cron_file: certbot-cron - when: certbot_auto_renew and drupalvm_webserver == 'apache' and ansible_os_family == 'Debian' + when: certbot_auto_renew and certbot_webserver == 'apache' and ansible_os_family == 'Debian' - name: Add cron job for 'certbot-auto renew' (if configured). cron: @@ -88,4 +88,4 @@ hour: "{{ certbot_auto_renew_hour }}" user: "{{ certbot_auto_renew_user }}" cron_file: certbot-cron - when: certbot_auto_renew and drupalvm_webserver == 'apache' and ansible_os_family == 'RedHat' + when: certbot_auto_renew and certbot_webserver == 'apache' and ansible_os_family == 'RedHat'