From: Michael Scherer <misc(a)zarb.org>
---
files/gnome/backup.sh | 41 ------------------------------------
files/gnome/ssh_config | 8 -------
roles/gnome_backups/files/backup.sh | 41 ++++++++++++++++++++++++++++++++++++
roles/gnome_backups/files/ssh_config | 8 +++++++
roles/gnome_backups/tasks/main.yml | 4 ++--
5 files changed, 51 insertions(+), 51 deletions(-)
delete mode 100644 files/gnome/backup.sh
delete mode 100644 files/gnome/ssh_config
create mode 100644 roles/gnome_backups/files/backup.sh
create mode 100644 roles/gnome_backups/files/ssh_config
diff --git a/files/gnome/backup.sh b/files/gnome/backup.sh
deleted file mode 100644
index 5577df3..0000000
--- a/files/gnome/backup.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-# backup.sh will run FROM backup03 TO the various GNOME boxes on the set. (there's
two set
-# of machines, one being the ones with a public IP and the others being the IP-less ones
that
-# will forward their agent through
bastion.gnome.org)
-
-export PATH=$PATH:/bin:/usr/bin:/usr/local/bin
-
-MACHINES='signal.gnome.org
-
webapps2.gnome.org
-
clutter.gnome.org
-
blogs.gnome.org
-
chooser.gnome.org
-
git.gnome.org
-
webapps.gnome.org
-
progress.gnome.org
-
clipboard.gnome.org
-
cloud-ssh.gnome.org
-
bastion.gnome.org
-
spinner.gnome.org
-
master.gnome.org
-
combobox.gnome.org
-
restaurant.gnome.org
-
expander.gnome.org
-
live.gnome.org
-
extensions.gnome.org
-
view.gnome.org
-
puppet.gnome.org
-
accelerator.gnome.org
-
range.gnome.org
-
pentagon.gimp.org
-
account.gnome.org
-
bugzilla-new.gnome.org
- socket.gnome.org'
-
-BACKUP_DIR='/gnome_backups/'
-
-for MACHINE in $MACHINES; do
- rsync -avz -e 'ssh -F /usr/local/etc/gnome_ssh_config' --bwlimit=2000
$MACHINE:/etc/rsyncd/backup.exclude $BACKUP_DIR/excludes/$MACHINE.exclude
- rdiff-backup --remote-schema 'ssh -F /usr/local/etc/gnome_ssh_config %s
rdiff-backup --server' --print-statistics --exclude-device-files --exclude /selinux
--exclude /sys --exclude /proc --exclude-globbing-filelist
$BACKUP_DIR/excludes/$MACHINE.exclude $MACHINE::/ $BACKUP_DIR/$MACHINE/ | mail -s
"Daily backup: $MACHINE" backups(a)gnome.org
- rdiff-backup --remove-older-than 6M --force $BACKUP_DIR/$MACHINE/
-done
diff --git a/files/gnome/ssh_config b/files/gnome/ssh_config
deleted file mode 100644
index bc151de..0000000
--- a/files/gnome/ssh_config
+++ /dev/null
@@ -1,8 +0,0 @@
-Host
live.gnome.org extensions.gnome.org puppet.gnome.org view.gnome.org
- User root
- IdentityFile /usr/local/etc/gnome_backup_id.rsa
- ProxyCommand ssh -W %h:%p
bastion.gnome.org -F /usr/local/etc/gnome_ssh_config
-
-Host *.gnome.org
pentagon.gimp.org
- User root
- IdentityFile /usr/local/etc/gnome_backup_id.rsa
diff --git a/roles/gnome_backups/files/backup.sh b/roles/gnome_backups/files/backup.sh
new file mode 100644
index 0000000..5577df3
--- /dev/null
+++ b/roles/gnome_backups/files/backup.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+# backup.sh will run FROM backup03 TO the various GNOME boxes on the set. (there's
two set
+# of machines, one being the ones with a public IP and the others being the IP-less ones
that
+# will forward their agent through
bastion.gnome.org)
+
+export PATH=$PATH:/bin:/usr/bin:/usr/local/bin
+
+MACHINES='signal.gnome.org
+
webapps2.gnome.org
+
clutter.gnome.org
+
blogs.gnome.org
+
chooser.gnome.org
+
git.gnome.org
+
webapps.gnome.org
+
progress.gnome.org
+
clipboard.gnome.org
+
cloud-ssh.gnome.org
+
bastion.gnome.org
+
spinner.gnome.org
+
master.gnome.org
+
combobox.gnome.org
+
restaurant.gnome.org
+
expander.gnome.org
+
live.gnome.org
+
extensions.gnome.org
+
view.gnome.org
+
puppet.gnome.org
+
accelerator.gnome.org
+
range.gnome.org
+
pentagon.gimp.org
+
account.gnome.org
+
bugzilla-new.gnome.org
+ socket.gnome.org'
+
+BACKUP_DIR='/gnome_backups/'
+
+for MACHINE in $MACHINES; do
+ rsync -avz -e 'ssh -F /usr/local/etc/gnome_ssh_config' --bwlimit=2000
$MACHINE:/etc/rsyncd/backup.exclude $BACKUP_DIR/excludes/$MACHINE.exclude
+ rdiff-backup --remote-schema 'ssh -F /usr/local/etc/gnome_ssh_config %s
rdiff-backup --server' --print-statistics --exclude-device-files --exclude /selinux
--exclude /sys --exclude /proc --exclude-globbing-filelist
$BACKUP_DIR/excludes/$MACHINE.exclude $MACHINE::/ $BACKUP_DIR/$MACHINE/ | mail -s
"Daily backup: $MACHINE" backups(a)gnome.org
+ rdiff-backup --remove-older-than 6M --force $BACKUP_DIR/$MACHINE/
+done
diff --git a/roles/gnome_backups/files/ssh_config b/roles/gnome_backups/files/ssh_config
new file mode 100644
index 0000000..bc151de
--- /dev/null
+++ b/roles/gnome_backups/files/ssh_config
@@ -0,0 +1,8 @@
+Host
live.gnome.org extensions.gnome.org puppet.gnome.org view.gnome.org
+ User root
+ IdentityFile /usr/local/etc/gnome_backup_id.rsa
+ ProxyCommand ssh -W %h:%p
bastion.gnome.org -F /usr/local/etc/gnome_ssh_config
+
+Host *.gnome.org
pentagon.gimp.org
+ User root
+ IdentityFile /usr/local/etc/gnome_backup_id.rsa
diff --git a/roles/gnome_backups/tasks/main.yml b/roles/gnome_backups/tasks/main.yml
index 2b20377..df48b88 100644
--- a/roles/gnome_backups/tasks/main.yml
+++ b/roles/gnome_backups/tasks/main.yml
@@ -8,13 +8,13 @@
file: dest=/gnome_backups/excludes owner=gnomebackup group=gnomebackup state=directory
- name: Install the GNOME SSH configuration file
- copy: src="{{ files }}/gnome/ssh_config" dest=/usr/local/etc/gnome_ssh_config
mode=0600 owner=gnomebackup
+ copy: src="ssh_config" dest=/usr/local/etc/gnome_ssh_config mode=0600
owner=gnomebackup
- name: Install GNOME backup key
copy: src="{{ private }}/files/gnome/backup_id.rsa"
dest=/usr/local/etc/gnome_backup_id.rsa mode=0600 owner=gnomebackup
- name: Install GNOME backup script
- copy: src="{{ files }}/gnome/backup.sh" dest=/usr/local/bin/gnome_backup
mode=0700 owner=gnomebackup
+ copy: src="backup.sh" dest=/usr/local/bin/gnome_backup mode=0700
owner=gnomebackup
- name: Schedule the GNOME backup script
cron: name="Backup" hour=5 minute=0 job="(cd /gnome_backups;
/usr/local/bin/lock-wrapper gnomebackup /usr/local/bin/gnome_backup)"
user=gnomebackup
--
1.8.3.1