xoxys.postgres/tasks/prepare.yml

25 lines
765 B
YAML
Raw Normal View History

2018-10-14 21:17:40 +00:00
---
2018-10-15 22:07:17 +00:00
- name: Load helper variables
include_vars: "main.yml"
2018-10-14 21:17:40 +00:00
2018-10-18 21:25:17 +00:00
- block:
- name: Add PostgreSQL repository
yum_repository:
name: postgresql
file: "{{ postgres_repository_filename }}"
description: PostgreSQL yum repository
baseurl: "https://download.postgresql.org/pub/repos/yum/{{ __postgres_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-{{ __postgres_version }}"
- name: Install python dependencies
2018-10-25 19:56:41 +00:00
package:
name: "{{ item }}"
2018-10-18 21:25:17 +00:00
state: present
2018-10-25 19:56:41 +00:00
whith_items:
- python-psycopg2
2018-10-15 22:10:58 +00:00
become: True
become_user: root
when: postgres_repository_enabled