Name copr-fe by its name, not ip. Add database backup dir, script and cron.

This commit is contained in:
Kevin Fenzi 2014-10-13 17:35:52 +00:00
parent 9cad1dd3dc
commit 983435138d
4 changed files with 27 additions and 4 deletions

View file

@ -14,3 +14,7 @@ tcp_ports: [22, 80, 443]
# Copr vars # Copr vars
copr_hostbase: copr-fe copr_hostbase: copr-fe
# dbs to be backed up on this host
dbs_to_backup:
- coprdb

View file

@ -595,7 +595,7 @@ cloud-noc01.cloud.fedoraproject.org
#fedocal.dev.fedoraproject.org #fedocal.dev.fedoraproject.org
209.132.184.147 209.132.184.147
#copr-fe.cloud.fedoraproject.org #copr-fe.cloud.fedoraproject.org
209.132.184.144 copr-fe.cloud.fedoraproject.org
209.132.184.150 209.132.184.150
#artboard.cloud.fedoraproject.org #artboard.cloud.fedoraproject.org
209.132.184.143 209.132.184.143
@ -698,7 +698,7 @@ copr-fe-dev.cloud.fedoraproject.org
copr-be-dev.cloud.fedoraproject.org copr-be-dev.cloud.fedoraproject.org
[copr-front] [copr-front]
209.132.184.144 copr-fe.cloud.fedoraproject.org
[copr-back] [copr-back]
copr-be.cloud.fedoraproject.org copr-be.cloud.fedoraproject.org

View file

@ -1,5 +1,5 @@
- name: check/create instance - name: check/create instance
hosts: 209.132.184.144 hosts: copr-fe.cloud.fedoraproject.org
user: root user: root
gather_facts: False gather_facts: False
@ -12,7 +12,7 @@
- include: "{{ tasks }}/growroot_cloud.yml" - include: "{{ tasks }}/growroot_cloud.yml"
- name: provision instance - name: provision instance
hosts: 209.132.184.144 hosts: copr-fe.cloud.fedoraproject.org
user: root user: root
gather_facts: True gather_facts: True

View file

@ -18,3 +18,22 @@
tags: tags:
- config - config
- name: Ensure postgres has a place to backup to
file: dest=/backups state=directory owner=postgres
tags:
- config
- name: Copy over backup scriplet
copy: src="{{ files }}/../roles/postgresql_server/files/backup-database" dest=/usr/local/bin/backup-database mode=0755
tags:
- config
- name: Set up some cronjobs to backup databases as configured
template: >
src="{{ files }}/../roles/postgresql_server/files/cron-backup-database
dest=/etc/cron.d/cron-backup-database-{{ item }}
with_items:
- "{{ dbs_to_backup }}"
when: dbs_to_backup != []
tags:
- config