add requirements file,hosts.ini and README

This commit is contained in:
J. Doe 2019-09-24 11:19:03 +02:00
parent b8296f4bee
commit fbccf37df6
41 changed files with 685 additions and 91 deletions

View file

@ -16,7 +16,7 @@
group: "{{ postgresql_group }}"
mode: 0600
notify: restart postgresql
when: postgresql_hba_entries
when: postgresql_hba_entries | length > 0
- name: Ensure PostgreSQL unix socket dirs exist.
file:

View file

@ -17,9 +17,7 @@
name: "{{ postgresql_daemon }}"
state: "{{ postgresql_service_state }}"
enabled: "{{ postgresql_service_enabled }}"
when: not docker_enabled
# Configure PostgreSQL.
- import_tasks: databases.yml
- import_tasks: users.yml
- import_tasks: databases.yml

View file

@ -1,12 +1,16 @@
---
- name: Ensure PostgreSQL packages are installed.
package:
yum:
name: "{{ postgresql_packages }}"
state: present
enablerepo: "{{ postgresql_enablerepo | default(omit, true) }}"
# Don't let postgresql-contrib cause the /usr/bin/python symlink
# to be installed, which breaks later Ansible runs on Fedora 30,
# and affects system behavior in multiple ways.
exclude: python-unversioned-command
- name: Ensure PostgreSQL Python libraries are installed.
package:
yum:
name: "{{ postgresql_python_library }}"
state: present
enablerepo: "{{ postgresql_enablerepo | default(omit, true) }}"

View file

@ -6,7 +6,13 @@
- name: Include OS-specific variables (RedHat).
include_vars: "{{ ansible_os_family }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
when: ansible_os_family == 'RedHat'
when:
- ansible_os_family == 'RedHat'
- ansible_distribution != 'Fedora'
- name: Include OS-specific variables (Fedora).
include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
when: ansible_distribution == 'Fedora'
- name: Define postgresql_packages.
set_fact: