From b9bf19bf0369674bacb8c8ceefd11efc7d715a70 Mon Sep 17 00:00:00 2001 From: sebalix Date: Thu, 5 Feb 2015 10:29:41 +0100 Subject: [PATCH] Add some APT settings into variables allowing to set a custom (mirror) repository --- defaults/main.yml | 5 +++++ tasks/install.yml | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index d8a8180d..6a0a8245 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -609,3 +609,8 @@ postgresql_restart_after_crash: on postgresql_env: LC_ALL: "{{ postgresql_locale }}" LC_LCTYPE: "{{ postgresql_locale }}" + +# APT settings +postgresql_apt_key_id: ACCC4CF8 +postgresql_apt_key_url: "https://www.postgresql.org/media/keys/ACCC4CF8.asc" +postgresql_apt_repository: 'deb http://apt.postgresql.org/pub/repos/apt/ {{ansible_distribution_release}}-pgdg main' diff --git a/tasks/install.yml b/tasks/install.yml index f0d2ad55..fc520aae 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -8,13 +8,13 @@ - name: PostgreSQL | Add PostgreSQL repository apt-key apt_key: - id: ACCC4CF8 - url: "https://www.postgresql.org/media/keys/ACCC4CF8.asc" + id: "{{ postgresql_apt_key_id }}" + url: "{{ postgresql_apt_key_url }}" state: present - name: PostgreSQL | Add PostgreSQL repository apt_repository: - repo: 'deb http://apt.postgresql.org/pub/repos/apt/ {{ansible_distribution_release}}-pgdg main' + repo: "{{ postgresql_apt_repository }}" state: present - name: PostgreSQL | Install PostgreSQL