Drop the postgressql_server roles and to it myself for anitya_backen
This commit is contained in:
parent
104e652132
commit
4661e21b8e
3 changed files with 43 additions and 4 deletions
|
@ -10,6 +10,3 @@ ansible_ssh_host: anitya-backend01.fedoraproject.org
|
|||
|
||||
vmhost: osuosl03.fedoraproject.org
|
||||
datacenter: osuosl
|
||||
|
||||
# kernel SHMMAX value
|
||||
kernel_shmmax: 68719476736
|
||||
|
|
|
@ -83,7 +83,6 @@
|
|||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
roles:
|
||||
- postgresql_server
|
||||
- anitya/backend
|
||||
|
||||
handlers:
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
command: yum clean all
|
||||
tags:
|
||||
- packages
|
||||
- anitya_backend
|
||||
|
||||
- name: install needed packages
|
||||
yum: pkg={{ item }} state=installed
|
||||
|
@ -12,8 +13,48 @@
|
|||
- anitya
|
||||
- python-psycopg2
|
||||
- libsemanage-python
|
||||
- postgresql-server
|
||||
tags:
|
||||
- packages
|
||||
- anitya_backend
|
||||
|
||||
- name: Initialize postgres if necessary
|
||||
command: /usr/bin/postgresql-setup initdb
|
||||
creates=/var/lib/pgsql/data
|
||||
notify:
|
||||
- restart postgresql
|
||||
tags:
|
||||
- anitya_backend
|
||||
|
||||
- name: Set postgresql-server to run on boot
|
||||
service: name=postgresql enabled=yes
|
||||
ignore_errors: true
|
||||
notify:
|
||||
- restart postgresql
|
||||
tags:
|
||||
- service
|
||||
- anitya_backend
|
||||
|
||||
- name: Ensure postgres has a place to backup to
|
||||
file: dest=/backups state=directory owner=postgres
|
||||
tags:
|
||||
- anitya_backend
|
||||
|
||||
- name: Copy over backup scriplet
|
||||
copy: src=backup-database dest=/usr/local/bin/backup-database mode=0755
|
||||
tags:
|
||||
- anitya_backend
|
||||
|
||||
- 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
|
||||
- anitya_backend
|
||||
|
||||
- name: copy sundry anitya configuration
|
||||
template: src={{ item.file }}
|
||||
|
@ -24,6 +65,7 @@
|
|||
# - { file: alembic.ini, location: /etc/anitya, dest: alembic.ini }
|
||||
tags:
|
||||
- config
|
||||
- anitya_backend
|
||||
|
||||
- name: create the database scheme
|
||||
command: /usr/bin/python2 /usr/share/anitya/anitya_createdb.py
|
||||
|
@ -38,4 +80,5 @@
|
|||
- { file: anitya.cfg, location: /etc/anitya }
|
||||
tags:
|
||||
- config
|
||||
- anitya_backend
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue