Let's try using the postgresql_server group for pagure
This commit is contained in:
parent
cb3c4e13eb
commit
64633aaf2c
3 changed files with 7 additions and 77 deletions
|
@ -14,3 +14,9 @@ postfix_group: vpn
|
||||||
|
|
||||||
vmhost: osuosl02.fedoraproject.org
|
vmhost: osuosl02.fedoraproject.org
|
||||||
datacenter: osuosl
|
datacenter: osuosl
|
||||||
|
|
||||||
|
#
|
||||||
|
# PostgreSQL configuration
|
||||||
|
#
|
||||||
|
|
||||||
|
shared_buffers: "32MB"
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
- sudo
|
- sudo
|
||||||
- collectd/base
|
- collectd/base
|
||||||
- openvpn/client
|
- openvpn/client
|
||||||
|
- postgresql_server
|
||||||
- git/server
|
- git/server
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
|
@ -88,83 +88,6 @@
|
||||||
- pagure
|
- pagure
|
||||||
|
|
||||||
|
|
||||||
# Set-up PostgresQL
|
|
||||||
|
|
||||||
- name: install needed packages
|
|
||||||
yum: pkg=postgresql-server state=present
|
|
||||||
tags:
|
|
||||||
- pagure
|
|
||||||
- postgresql
|
|
||||||
- packages
|
|
||||||
|
|
||||||
- name: Initialize postgres if necessary
|
|
||||||
command: /usr/bin/postgresql-setup initdb
|
|
||||||
creates=/var/lib/pgsql/data
|
|
||||||
notify:
|
|
||||||
- restart postgresql
|
|
||||||
tags:
|
|
||||||
- postgresql
|
|
||||||
- pagure
|
|
||||||
|
|
||||||
- name: Set postgresql-server to run on boot
|
|
||||||
service: name=postgresql enabled=yes
|
|
||||||
ignore_errors: true
|
|
||||||
notify:
|
|
||||||
- restart postgresql
|
|
||||||
tags:
|
|
||||||
- service
|
|
||||||
- postgresql
|
|
||||||
- pagure
|
|
||||||
|
|
||||||
- name: Ensure postgres has a place to backup to
|
|
||||||
file: dest=/backups state=directory owner=postgres
|
|
||||||
tags:
|
|
||||||
- postgresql
|
|
||||||
- pagure
|
|
||||||
|
|
||||||
- name: Copy over backup scriplet
|
|
||||||
copy: src=backup-database dest=/usr/local/bin/backup-database mode=0755
|
|
||||||
tags:
|
|
||||||
- postgresql
|
|
||||||
- pagure
|
|
||||||
|
|
||||||
- name: Set up some cronjobs to backup databases as configured
|
|
||||||
template: >
|
|
||||||
src=cron-backup-database
|
|
||||||
dest=/etc/cron.d/cron-backup-database-{{ item }}
|
|
||||||
with_items:
|
|
||||||
- anitya
|
|
||||||
tags:
|
|
||||||
- cron
|
|
||||||
- postgresql
|
|
||||||
- pagure
|
|
||||||
|
|
||||||
- name: Add our postgres config file.
|
|
||||||
copy: >
|
|
||||||
src={{ item }}
|
|
||||||
dest=/var/lib/pgsql/data/{{ item }}
|
|
||||||
owner=postgres
|
|
||||||
with_items:
|
|
||||||
- pg_hba.conf
|
|
||||||
notify:
|
|
||||||
- restart postgresql
|
|
||||||
tags:
|
|
||||||
- config
|
|
||||||
- postgresql
|
|
||||||
- pagure
|
|
||||||
|
|
||||||
- name: Set up some cronjobs to backup databases as configured
|
|
||||||
template: >
|
|
||||||
src=cron-backup-database
|
|
||||||
dest=/etc/cron.d/cron-backup-database-{{ item }}
|
|
||||||
with_items:
|
|
||||||
- "{{ dbs_to_backup }}"
|
|
||||||
when: dbs_to_backup != []
|
|
||||||
tags:
|
|
||||||
- cron
|
|
||||||
- pagure
|
|
||||||
|
|
||||||
|
|
||||||
# Set-up Pagure
|
# Set-up Pagure
|
||||||
|
|
||||||
- name: copy sundry pagure configuration
|
- name: copy sundry pagure configuration
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue