roles/nginx: Separate Ubuntu 16.04 "Xenial" Let's Encrypt deps

Instead of iterating over fifteen packages with a loop that does fifteen
separate apt transactions, it is better to give the apt module a list so
it can install them all in one transaction. This is both quicker and te-
chnically more safe for dependency resolution.
This commit is contained in:
Alan Orth 2018-04-25 20:01:39 +03:00
parent 12711afac9
commit f427350feb
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 44 additions and 41 deletions

View File

@ -30,6 +30,46 @@ letsencrypt_certbot_dest: /opt/certbot-auto
# mainline is 1.15.x
nginx_version: mainline
# Dependencies of certbot-auto on Ubuntu 16.04 "xenial"
# taken after running certbot-auto on a clean install
letsencrypt_ubuntu_xenial_deps:
- augeas-doc
- augeas-tools
- binutils
- cpp
- cpp-5
- dialog
- gcc
- gcc-5
- libasan2
- libatomic1
- libcc1-0
- libcilkrts5
- libexpat1-dev
- libffi-dev
- libgcc-5-dev
- libgomp1
- libisl15
- libitm1
- liblsan0
- libmpc3
- libmpx0
- libpython-dev
- libpython2.7
- libpython2.7-dev
- libquadmath0
- libssl-dev
- libtsan0
- libubsan0
- python-dev
- python-pip-whl
- python-pkg-resources
- python-virtualenv
- python2.7-dev
- python3-virtualenv
- virtualenv
- zlib1g-dev
# Dependencies of certbot-auto on Ubuntu 18.04 "bionic"
# taken after running certbot-auto on a clean install
letsencrypt_ubuntu_bionic_deps:

View File

@ -13,49 +13,12 @@
- name: Download certbot
get_url: dest={{ letsencrypt_certbot_dest }} url=https://dl.eff.org/certbot-auto mode=700
# dependencies certbot checks for on its first run
# taken from running certbot right after a clean Ubuntu 16.04 install
- name: Install certbot dependencies (Ubuntu 16.04)
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version_compare('16.04', '==')
apt: name={{ item }} state=present update_cache=yes
loop:
- augeas-doc
- augeas-tools
- binutils
- cpp
- cpp-5
- dialog
- gcc
- gcc-5
- libasan2
- libatomic1
- libcc1-0
- libcilkrts5
- libexpat1-dev
- libffi-dev
- libgcc-5-dev
- libgomp1
- libisl15
- libitm1
- liblsan0
- libmpc3
- libmpx0
- libpython-dev
- libpython2.7
- libpython2.7-dev
- libquadmath0
- libssl-dev
- libtsan0
- libubsan0
- python-dev
- python-pip-whl
- python-pkg-resources
- python-virtualenv
- python2.7-dev
- python3-virtualenv
- virtualenv
- zlib1g-dev
tags: packages
apt: name={{ letsencrypt_ubuntu_xenial_deps }} state=present update_cache=yes
tags:
- packages
- letsencrypt
- name: Install certbot dependencies (Ubuntu 18.04)
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version_compare('18.04', '==')