From 07553a3f9215f275afb7df9a3b083027a9b39078 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 14 Oct 2018 23:17:40 +0200 Subject: [PATCH] ininital commit --- defaults/main.yml | 3 +++ tasks/install.yml | 0 tasks/main.yml | 3 +++ tasks/prepare.yml | 14 ++++++++++++++ 4 files changed, 20 insertions(+) create mode 100644 defaults/main.yml create mode 100644 tasks/install.yml create mode 100644 tasks/main.yml create mode 100644 tasks/prepare.yml diff --git a/defaults/main.yml b/defaults/main.yml new file mode 100644 index 0000000..3952d24 --- /dev/null +++ b/defaults/main.yml @@ -0,0 +1,3 @@ +--- +postgres_repository_enabled: False +postgres_version: 10 diff --git a/tasks/install.yml b/tasks/install.yml new file mode 100644 index 0000000..e69de29 diff --git a/tasks/main.yml b/tasks/main.yml new file mode 100644 index 0000000..cae897f --- /dev/null +++ b/tasks/main.yml @@ -0,0 +1,3 @@ +--- +- import_tasks: prepare.yml +- import_tasks: install.yml diff --git a/tasks/prepare.yml b/tasks/prepare.yml new file mode 100644 index 0000000..7c15cce --- /dev/null +++ b/tasks/prepare.yml @@ -0,0 +1,14 @@ +--- +- block: + - name: Add PostgreSQL repository + yum_repository: + name: postgresql + description: PostgreSQL yum repository + baseurl: "https://download.postgresql.org/pub/repos/yum/{{ postgresql_version }}/redhat/rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}" + gpgcheck: yes + enabled: yes + gpgkey: "https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG-{{ postgresql_version }}" + when: postgres_repository_enabled + + become: True + become_user: True