Skip to content

Instantly share code, notes, and snippets.

@wturrell
Created March 2, 2017 13:05
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 wturrell/0d9e88008a0d9f93fd94a1e2b31eeee5 to your computer and use it in GitHub Desktop.
Save wturrell/0d9e88008a0d9f93fd94a1e2b31eeee5 to your computer and use it in GitHub Desktop.
Ansible playbook for adding DotDeb/Debian repositories for jessie-nginx-http2 support
---
# Add the DotDeb repositories needed to install an http2 compatible Nginx
# see: https://www.dotdeb.org/instructions/
#
# Note
# - as we're doing multiple steps we turn update_cache off until the end
# to save time.
# - apt_repository install things in /etc/apt/sources_list.d/
- hosts:
- [insert your host name(s) here]
become: yes
tasks:
- name: Add Debian backports repo (Jessie)
apt_repository:
repo: deb http://ftp.debian.org/debian jessie-backports main
state: present
update_cache: no
- name: Add the Dotdeb Nginx HTTP2 repository
apt_repository:
repo: deb http://packages.dotdeb.org jessie-nginx-http2 all
state: present
update_cache: no
- name: Add the Dotdeb Nginx HTTP2 repository (deb-src)
apt_repository:
repo: deb-src http://packages.dotdeb.org jessie-nginx-http2 all
state: present
update_cache: no
- name: Run apt-get update only
apt:
update_cache: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment