mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2026-08-25 01:05:36 +02:00
Merge 84e0193e31 into c6e6679d42
This commit is contained in:
@@ -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"
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user