Skip to content

Instantly share code, notes, and snippets.

@mgedmin
Created April 16, 2018 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgedmin/ce998e61f71a548ada645c8efb0903aa to your computer and use it in GitHub Desktop.
Save mgedmin/ce998e61f71a548ada645c8efb0903aa to your computer and use it in GitHub Desktop.
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