From 0fde62b23c4bff094f93d269965f196b366a15ff Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Fri, 19 Mar 2021 17:25:38 +0100 Subject: [PATCH] GNOME backups: Be gone This hasn't been a thing since the colo move. Signed-off-by: Nils Philippsen --- inventory/inventory | 2 -- main.yml | 1 - playbooks/groups/gnome-backups.yml | 36 ---------------------- roles/fas_client/files/aliases.template | 3 -- roles/fasjson/files/aliases.static | 3 -- roles/gnome_backups/files/backup.sh | 30 ------------------ roles/gnome_backups/files/ssh_config | 8 ----- roles/gnome_backups/tasks/main.yml | 41 ------------------------- 8 files changed, 124 deletions(-) delete mode 100644 playbooks/groups/gnome-backups.yml delete mode 100644 roles/gnome_backups/files/backup.sh delete mode 100644 roles/gnome_backups/files/ssh_config delete mode 100644 roles/gnome_backups/tasks/main.yml diff --git a/inventory/inventory b/inventory/inventory index a8b5fe25a6..493ff46833 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -1007,8 +1007,6 @@ pagure02.fedoraproject.org [pagure_stg] pagure-stg01.fedoraproject.org -[gnome_backups] - [osbs_control] osbs-control01.iad2.fedoraproject.org diff --git a/main.yml b/main.yml index fe98bd1b9b..9cd3d9a0a0 100644 --- a/main.yml +++ b/main.yml @@ -38,7 +38,6 @@ - import_playbook: /srv/web/infra/ansible/playbooks/groups/fedimg.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/fedocal.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/github2fedmsg.yml -- import_playbook: /srv/web/infra/ansible/playbooks/groups/gnome-backups.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/ipa.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/ipsilon.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/kerneltest.yml diff --git a/playbooks/groups/gnome-backups.yml b/playbooks/groups/gnome-backups.yml deleted file mode 100644 index 4cf88966d4..0000000000 --- a/playbooks/groups/gnome-backups.yml +++ /dev/null @@ -1,36 +0,0 @@ -- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=gnome_backups" - -- name: make the boxen be real for real - hosts: gnome_backups - user: root - gather_facts: True - - vars_files: - - /srv/web/infra/ansible/vars/global.yml - - "/srv/private/ansible/vars.yml" - - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml - - roles: - - base - - rkhunter - - nagios_client - - hosts - - { role: ipa/client, when: env == "staging" } - - { role: fas_client, when: env != "staging" } - - sudo - - collectd/base - - gnome_backups - - { role: nfs/client, - mnt_dir: '/gnome_backups', - nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,sec=sys,nfsvers=3", - nfs_src_dir: 'gnome_backups' } - - pre_tasks: - - import_tasks: "{{ tasks_path }}/yumrepos.yml" - - tasks: - - import_tasks: "{{ tasks_path }}/2fa_client.yml" - - import_tasks: "{{ tasks_path }}/motd.yml" - - handlers: - - import_tasks: "{{ handlers_path }}/restart_services.yml" diff --git a/roles/fas_client/files/aliases.template b/roles/fas_client/files/aliases.template index b4c6608033..8789b30f3d 100644 --- a/roles/fas_client/files/aliases.template +++ b/roles/fas_client/files/aliases.template @@ -203,9 +203,6 @@ flock-admin: fcaic,fpl,jmadriag@redhat.com flock-coc: fcaic,fpl flock-access: flock-admin -# gnome backups -gnomebackup: backups@gnome.org - # News #news: nman64,pfrields,sundaram,tchung,kwade news: news-members@fedoraproject.org diff --git a/roles/fasjson/files/aliases.static b/roles/fasjson/files/aliases.static index 0fd2881bb1..fb508e8648 100644 --- a/roles/fasjson/files/aliases.static +++ b/roles/fasjson/files/aliases.static @@ -203,9 +203,6 @@ flock-admin: fcaic,fpl,jmadriag@redhat.com flock-coc: fcaic,fpl flock-access: flock-admin -# gnome backups -gnomebackup: backups@gnome.org - # News #news: nman64,pfrields,sundaram,tchung,kwade news: news-members@fedoraproject.org diff --git a/roles/gnome_backups/files/backup.sh b/roles/gnome_backups/files/backup.sh deleted file mode 100644 index d23bb45e07..0000000000 --- a/roles/gnome_backups/files/backup.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# backup.sh will run FROM gnome-backups01.phx2.fedoraproject.org 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 - palette.gnome.org - master.gnome.org - restaurant.gnome.org - view.gnome.org - puppetmaster01.gnome.org - account.gnome.org - bugzilla.gnome.org - gesture.gnome.org - scale.gnome.org - gitlab.gnome.org - oscp-master01.gnome.org - oscp-master02.gnome.org - oscp-master03.gnome.org - staff-mail.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-fifos --exclude-sockets --exclude /selinux --exclude /sys --exclude /proc --exclude-globbing-filelist $BACKUP_DIR/excludes/$MACHINE.exclude $MACHINE::/ $BACKUP_DIR/$MACHINE/ | mail -s "Daily backup: $MACHINE" backups@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 deleted file mode 100644 index 37a62d5e22..0000000000 --- a/roles/gnome_backups/files/ssh_config +++ /dev/null @@ -1,8 +0,0 @@ -Host puppetmaster01.gnome.org view.gnome.org oscp-master0*.gnome.org - User root - IdentityFile /usr/local/etc/gnome_backup_id.rsa - ProxyCommand ssh -W %h:%p gesture.gnome.org -F /usr/local/etc/gnome_ssh_config - -Host *.gnome.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 deleted file mode 100644 index f22cbca113..0000000000 --- a/roles/gnome_backups/tasks/main.yml +++ /dev/null @@ -1,41 +0,0 @@ -- name: Make sure rdiff-backup is installed - package: name=rdiff-backup state=latest - -- name: Create GNOME backup user - user: name=gnomebackup state=present home=/gnome_backups/ createhome=yes shell=/sbin/nologin - -- name: Add a Directory for the Excludes list for each of the backed up GNOME machines - file: dest=/gnome_backups/excludes owner=gnomebackup group=gnomebackup state=directory - -- name: Install the GNOME SSH configuration file - 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="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 - -- name: Make sure the MAILTO environment variable gets populated - cronvar: name="MAILTO" value="backups@gnome.org" user=gnomebackup - -- name: Add a Directory for each of the GNOME machines - file: dest=/gnome_backups/{{ item }} owner=gnomebackup group=gnomebackup state=directory - with_items: - - signal.gnome.org - - view.gnome.org - - puppetmaster01.gnome.org - - palette.gnome.org - - oscp-master01.gnome.org - - oscp-master02.gnome.org - - oscp-master03.gnome.org - - bugzilla.gnome.org - - master.gnome.org - - restaurant.gnome.org - - account.gnome.org - - gesture.gnome.org - - scale.gnome.org - - staff-mail.gnome.org