Allow installing from source using certbot-auto URL

This commit is contained in:
Ryan Pineo
2019-02-19 11:33:22 -05:00
parent 00dc226101
commit fcefeb513a
7 changed files with 84 additions and 11 deletions
+8
View File
@@ -0,0 +1,8 @@
---
- name: Clone Certbot into configured directory.
git:
repo: "{{ certbot_repo }}"
dest: "{{ certbot_dir }}"
version: "{{ certbot_version }}"
update: "{{ certbot_keep_updated }}"
force: true
+11
View File
@@ -0,0 +1,11 @@
---
- name: Create Certbot directory
file:
path: "{{ certbot_dir }}"
state: "directory"
- name: Download Certbot into configured directory
get_url:
url: "{{ certbot_source_url }}"
dest: "{{ certbot_script }}"
force: "{{ certbot_keep_updated }}"
+6 -8
View File
@@ -1,16 +1,14 @@
---
- name: Clone Certbot into configured directory.
git:
repo: "{{ certbot_repo }}"
dest: "{{ certbot_dir }}"
version: "{{ certbot_version }}"
update: "{{ certbot_keep_updated }}"
force: true
- name: Set Certbot script variable.
set_fact:
certbot_script: "{{ certbot_dir }}/certbot-auto"
- import_tasks: 'install-from-source-git.yml'
when: certbot_install_from_source_method == 'git'
- import_tasks: 'install-from-source-url.yml'
when: certbot_install_from_source_method == 'url'
- name: Ensure certbot-auto is executable.
file:
path: "{{ certbot_script }}"