Fix .travis error: add certbot_webserver in default config

This commit is contained in:
nick 2017-01-24 14:33:05 +02:00
parent 9e00589518
commit 332ff79f61
2 changed files with 10 additions and 9 deletions

View File

@ -14,6 +14,7 @@ certbot_auto_renew_hour: 3
certbot_auto_renew_minute: 30 certbot_auto_renew_minute: 30
# Install certificates # Install certificates
certbot_webserver: apache
certbot_email: "" certbot_email: ""
certbot_domain: "" certbot_domain: ""
certbot_subdomains: [] certbot_subdomains: []

View File

@ -15,19 +15,19 @@
service: service:
name: nginx name: nginx
state: stopped state: stopped
when: drupalvm_webserver == 'nginx' when: certbot_webserver == 'nginx'
- name: Stop apache2 - name: Stop apache2
service: service:
name: apache2 name: apache2
state: stopped state: stopped
when: drupalvm_webserver == 'apache' and ansible_os_family == 'Debian' when: certbot_webserver == 'apache' and ansible_os_family == 'Debian'
- name: Stop httpd - name: Stop httpd
service: service:
name: httpd name: httpd
state: stopped 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 - name: Check if letsencrypt certificate file exists
stat: path="/etc/letsencrypt/live/{{ certbot_domain }}/privkey.pem" stat: path="/etc/letsencrypt/live/{{ certbot_domain }}/privkey.pem"
@ -46,19 +46,19 @@
service: service:
name: nginx name: nginx
state: started state: started
when: drupalvm_webserver == 'nginx' when: certbot_webserver == 'nginx'
- name: Start apache2 - name: Start apache2
service: service:
name: apache2 name: apache2
state: started state: started
when: drupalvm_webserver == 'apache' and ansible_os_family == 'Debian' when: certbot_webserver == 'apache' and ansible_os_family == 'Debian'
- name: Start httpd - name: Start httpd
service: service:
name: httpd name: httpd
state: started 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). - name: Add cron job for 'certbot-auto renew' (if configured).
cron: cron:
@ -68,7 +68,7 @@
hour: "{{ certbot_auto_renew_hour }}" hour: "{{ certbot_auto_renew_hour }}"
user: "{{ certbot_auto_renew_user }}" user: "{{ certbot_auto_renew_user }}"
cron_file: certbot-cron 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). - name: Add cron job for 'certbot-auto renew' (if configured).
cron: cron:
@ -78,7 +78,7 @@
hour: "{{ certbot_auto_renew_hour }}" hour: "{{ certbot_auto_renew_hour }}"
user: "{{ certbot_auto_renew_user }}" user: "{{ certbot_auto_renew_user }}"
cron_file: certbot-cron 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). - name: Add cron job for 'certbot-auto renew' (if configured).
cron: cron:
@ -88,4 +88,4 @@
hour: "{{ certbot_auto_renew_hour }}" hour: "{{ certbot_auto_renew_hour }}"
user: "{{ certbot_auto_renew_user }}" user: "{{ certbot_auto_renew_user }}"
cron_file: certbot-cron 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'