Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Upgrading all certbot dependencies given pip >= 10
- name: install letsencrypt
pip:
name: "{{ item }}"
virtualenv: /opt/letsencrypt
state: "{{ 'present' if ansible_check_mode else 'latest' }}"
extra_args: >-
{% if 'pip' not in item and not ansible_check_mode -%}
--upgrade-strategy=eager
{%- endif %}
with_items:
# upgrade setuptools because why not?
# upgrade pip because why not?
# upgrade nothing in --check mode because of https://github.com/ansible/ansible-modules-core/issues/3060
- "{{ ['pip', 'setuptools'] if not ansible_check_mode else [] }}"
- certbot
- certbot-apache
tags: [ letsencrypt, pip ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment