mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-04-19 17:01:37 +02:00
* Truthy values should be true or false rather than yes or no * Linter won't allow hard-coded 'latest' package state
26 lines
533 B
YAML
26 lines
533 B
YAML
---
|
|
- name: Install latest Certbot from pypi
|
|
when:
|
|
- certbot_pypi_version == "latest"
|
|
pip:
|
|
name: "{{ item }}"
|
|
state: "{{ certbot_pypi_version }}"
|
|
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"
|