From cd992baa2ce64104b610517c975dbda0c0d71d03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lionel=20Sausin=20=28Num=C3=A9rigraphe=29?= Date: Fri, 6 Feb 2015 11:36:37 +0100 Subject: [PATCH] Only do APT tasks if variables have true values This lets us set the variables to False to use the packages provided by the distribution without further ado. --- tasks/install.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/install.yml b/tasks/install.yml index 861d83fd..59ac45a1 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -5,11 +5,13 @@ id: "{{ postgresql_apt_key_id }}" url: "{{ postgresql_apt_key_url }}" state: present + when: postgresql_apt_key_url and postgresql_apt_key_id - name: PostgreSQL | Add PostgreSQL repository apt_repository: repo: "{{ postgresql_apt_repository }}" state: present + when: postgresql_apt_repository - name: PostgreSQL | Make sure the dependencies are installed apt: