This commit is contained in:
Stef
2026-07-29 10:48:30 -05:00
committed by GitHub
4 changed files with 84 additions and 11 deletions
+40
View File
@@ -0,0 +1,40 @@
---
# Pip-in-venv install — EFF's recommended path now that certbot-auto is gone.
# https://certbot.eff.org/instructions?os=pip
# Debian-family only; RedHat goes through setup-RedHat.yml + package install.
- name: Install certbot pip prerequisites.
ansible.builtin.apt:
name:
- python3
- python3-dev
- python3-venv
- libaugeas-dev
- gcc
state: present
update_cache: true
cache_valid_time: 3600
- name: Install certbot in a venv via pip.
ansible.builtin.pip:
name: certbot
state: "{{ 'latest' if certbot_keep_updated else 'present' }}"
virtualenv: "{{ certbot_dir }}"
virtualenv_command: python3 -m venv
- name: Install certbot pip plugins.
ansible.builtin.pip:
name: "{{ certbot_pip_extra_packages }}"
state: "{{ 'latest' if certbot_keep_updated else 'present' }}"
virtualenv: "{{ certbot_dir }}"
when: certbot_pip_extra_packages | length > 0
- name: Symlink certbot binary onto PATH.
ansible.builtin.file:
src: "{{ certbot_dir }}/bin/certbot"
dest: /usr/local/bin/certbot
state: link
- name: Set Certbot script variable.
ansible.builtin.set_fact:
certbot_script: "{{ certbot_dir }}/bin/certbot"
+3
View File
@@ -13,6 +13,9 @@
- import_tasks: install-from-source.yml
when: certbot_install_method == 'source'
- import_tasks: install-with-pip.yml
when: certbot_install_method == 'pip'
- include_tasks: create-cert-standalone.yml
with_items: "{{ certbot_certs }}"
when: