From 2a83d9436ae9368465a068e53ea711b0f86f3c71 Mon Sep 17 00:00:00 2001 From: Veros Kaplan Date: Tue, 2 Aug 2016 15:27:01 +0200 Subject: [PATCH] Add private repository --- defaults/main.yml | 3 +++ tasks/setup-Ubuntu.yml | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 34c43ef..c1909ed 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -6,6 +6,9 @@ nginx_default_release: "" nginx_ppa_use: false nginx_ppa_version: stable +# Use custom nginx repo +#nginx_custom_apt_repo: "https://nginx.example.org/nginx/ xenial nginx" + # The name of the nginx apt/yum package to install. nginx_package_name: "nginx" diff --git a/tasks/setup-Ubuntu.yml b/tasks/setup-Ubuntu.yml index 920dc0b..fe446f5 100644 --- a/tasks/setup-Ubuntu.yml +++ b/tasks/setup-Ubuntu.yml @@ -7,6 +7,12 @@ register: nginx_ppa_added when: nginx_ppa_use +- name: Add custom repo for nginx + apt_repository: + repo: '{{ nginx_custom_apt_repo }}' + state: present + when: nginx_custom_apt_repo is defined + - name: Ensure nginx will reinstall if the PPA was just added. apt: name: nginx