mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2026-09-17 02:21:11 +02:00
Add option to install from pypi
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
---
|
||||
- name: Install latest Certbot from pypi
|
||||
when:
|
||||
- certbot_pypi_version == "latest"
|
||||
pip:
|
||||
name: "{{ item }}"
|
||||
state: latest
|
||||
with_items:
|
||||
- certbot
|
||||
- certbot-nginx
|
||||
|
||||
- name: Install latest Certbot from pypi
|
||||
when:
|
||||
- certbot_pypi_version != "latest"
|
||||
pip:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
version: "{{ certbot_pypi_version }}"
|
||||
with_items:
|
||||
- certbot
|
||||
- certbot-nginx
|
||||
|
||||
- name: Set Certbot script variable.
|
||||
set_fact:
|
||||
certbot_script: "/usr/local/bin/certbot"
|
||||
+20
-1
@@ -1,11 +1,26 @@
|
||||
---
|
||||
- import_tasks: include-vars.yml
|
||||
tags:
|
||||
- certbot
|
||||
|
||||
- import_tasks: install-with-package.yml
|
||||
when: not certbot_install_from_source
|
||||
when:
|
||||
- not certbot_install_from_source
|
||||
- not certbot_install_from_pypi
|
||||
tags:
|
||||
- certbot
|
||||
|
||||
- import_tasks: install-from-source.yml
|
||||
when: certbot_install_from_source
|
||||
tags:
|
||||
- certbot
|
||||
|
||||
- import_tasks: install-from-pypi.yml
|
||||
when:
|
||||
- not certbot_install_from_source
|
||||
- certbot_install_from_pypi
|
||||
tags:
|
||||
- certbot
|
||||
|
||||
- include_tasks: create-cert-standalone.yml
|
||||
with_items: "{{ certbot_certs }}"
|
||||
@@ -14,6 +29,10 @@
|
||||
- certbot_create_method == 'standalone'
|
||||
loop_control:
|
||||
loop_var: cert_item
|
||||
tags:
|
||||
- certbot
|
||||
|
||||
- import_tasks: renew-cron.yml
|
||||
when: certbot_auto_renew
|
||||
tags:
|
||||
- certbot
|
||||
|
||||
Reference in New Issue
Block a user