add requirements file,hosts.ini and README
This commit is contained in:
parent
b8296f4bee
commit
fbccf37df6
41 changed files with 685 additions and 91 deletions
|
|
@ -7,6 +7,7 @@ env:
|
|||
- ROLE_NAME: postgresql
|
||||
matrix:
|
||||
- MOLECULE_DISTRO: centos7
|
||||
- MOLECULE_DISTRO: fedora30
|
||||
- MOLECULE_DISTRO: ubuntu1804
|
||||
- MOLECULE_DISTRO: ubuntu1604
|
||||
- MOLECULE_DISTRO: debian10
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
install_date: Thu Sep 12 20:01:17 2019
|
||||
version: 1.4.6
|
||||
install_date: Tue Sep 24 09:13:46 2019
|
||||
version: 2.0.0
|
||||
|
|
|
|||
|
|
@ -12,12 +12,20 @@ galaxy_info:
|
|||
versions:
|
||||
- 6
|
||||
- 7
|
||||
- name: Fedora
|
||||
versions:
|
||||
- 29
|
||||
- 30
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- all
|
||||
- xenial
|
||||
- bionic
|
||||
- name: Debian
|
||||
versions:
|
||||
- all
|
||||
- wheezy
|
||||
- jessie
|
||||
- stretch
|
||||
- buster
|
||||
galaxy_tags:
|
||||
- database
|
||||
- postgresql
|
||||
|
|
|
|||
|
|
@ -10,6 +10,17 @@
|
|||
- name: jdoe
|
||||
|
||||
pre_tasks:
|
||||
# The Fedora 30+ container images have only C.UTF-8 installed
|
||||
- name: Set database locale if using Fedora 30+
|
||||
set_fact:
|
||||
postgresql_databases:
|
||||
- name: example
|
||||
lc_collate: 'C.UTF-8'
|
||||
lc_ctype: 'C.UTF-8'
|
||||
when:
|
||||
- ansible_distribution == 'Fedora'
|
||||
- ansible_distribution_major_version >= '30'
|
||||
|
||||
- name: Update apt cache.
|
||||
apt: update_cache=true cache_valid_time=600
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) }}"
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
__postgresql_version: "11"
|
||||
__postgresql_data_dir: "/var/lib/postgresql/{{ __postgresql_version }}/main"
|
||||
__postgresql_bin_path: "/usr/lib/postgresql/{{ __postgresql_version }}/bin"
|
||||
__postgresql_config_path: "/etc/postgresql/{{ __postgresql_version }}/main"
|
||||
__postgresql_daemon: "postgresql@{{ postgresql_version }}-main"
|
||||
__postgresql_packages:
|
||||
- postgresql
|
||||
- postgresql-contrib
|
||||
- libpq-dev
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
__postgresql_version: "11"
|
||||
__postgresql_data_dir: "/var/lib/postgresql/{{ __postgresql_version }}/main"
|
||||
__postgresql_bin_path: "/usr/lib/postgresql/{{ __postgresql_version }}/bin"
|
||||
__postgresql_config_path: "/etc/postgresql/{{ __postgresql_version }}/main"
|
||||
__postgresql_daemon: "postgresql@{{ postgresql_version }}-main"
|
||||
__postgresql_packages:
|
||||
- postgresql
|
||||
- postgresql-contrib
|
||||
- libpq-dev
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
__postgresql_version: "11"
|
||||
__postgresql_data_dir: "/var/lib/postgresql/{{ __postgresql_version }}/main"
|
||||
__postgresql_bin_path: "/usr/lib/postgresql/{{ __postgresql_version }}/bin"
|
||||
__postgresql_config_path: "/etc/postgresql/{{ __postgresql_version }}/main"
|
||||
__postgresql_daemon: "postgresql@{{ postgresql_version }}-main"
|
||||
__postgresql_packages:
|
||||
- postgresql
|
||||
- postgresql-contrib
|
||||
- libpq-dev
|
||||
12
roles/geerlingguy.postgresql/vars/Fedora-29.yml
Normal file
12
roles/geerlingguy.postgresql/vars/Fedora-29.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
__postgresql_version: "10.5"
|
||||
__postgresql_data_dir: "/var/lib/pgsql/data"
|
||||
__postgresql_bin_path: "/usr/bin"
|
||||
__postgresql_config_path: "/var/lib/pgsql/data"
|
||||
__postgresql_daemon: postgresql
|
||||
__postgresql_packages:
|
||||
- postgresql
|
||||
- postgresql-server
|
||||
- postgresql-contrib
|
||||
- postgresql-libs
|
||||
postgresql_python_library: python2-psycopg2
|
||||
13
roles/geerlingguy.postgresql/vars/Fedora-30.yml
Normal file
13
roles/geerlingguy.postgresql/vars/Fedora-30.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
__postgresql_version: "11.2"
|
||||
__postgresql_data_dir: "/var/lib/pgsql/data"
|
||||
__postgresql_bin_path: "/usr/bin"
|
||||
__postgresql_config_path: "/var/lib/pgsql/data"
|
||||
__postgresql_daemon: postgresql
|
||||
__postgresql_packages:
|
||||
- postgresql
|
||||
- postgresql-server
|
||||
- postgresql-contrib
|
||||
- postgresql-libs
|
||||
# Fedora 30 containers only have python3 by default
|
||||
postgresql_python_library: python3-psycopg2
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
__postgresql_version: "9.3"
|
||||
__postgresql_data_dir: "/var/lib/postgresql/{{ __postgresql_version }}/main"
|
||||
__postgresql_bin_path: "/usr/lib/postgresql/{{ __postgresql_version }}/bin"
|
||||
__postgresql_config_path: "/etc/postgresql/{{ __postgresql_version }}/main"
|
||||
__postgresql_daemon: postgresql
|
||||
__postgresql_packages:
|
||||
- postgresql
|
||||
- postgresql-contrib
|
||||
- libpq-dev
|
||||
Loading…
Add table
Add a link
Reference in a new issue