Skip to content

Add auto-update to ansible playbooks #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bonzini opened this issue Mar 15, 2019 · 0 comments
Open

Add auto-update to ansible playbooks #111

bonzini opened this issue Mar 15, 2019 · 0 comments
Labels
patchew.org This issue affects the configuration of the patchew.org server

Comments

@bonzini
Copy link
Contributor

bonzini commented Mar 15, 2019

Currently this script is used via cron on patchew.org and next.patchew.org to auto-update the servers:

#!/bin/bash

set -e

BRANCH=master
INSTANCE=patchew-server

cd ~/patchew.git
git fetch

cur=$(git rev-parse $BRANCH)
if test -f ~/.$INSTANCE-head; then
	prev=$(cat ~/.$INSTANCE-head)
fi
if [ "$cur" = "$prev" ]; then
	exit 0
fi

rm -rf /tmp/$INSTANCE-deploy2
git clone -b $BRANCH ~/patchew.git /tmp/$INSTANCE-deploy2
cd /tmp/$INSTANCE-deploy2
./scripts/deploy -s root@localhost -e 'instance_name="'"$INSTANCE"'" superuser_name="" superuser_pass=""'

echo $cur > ~/.$INSTANCE-head

The script should be moved to an Ansible playbook.

@bonzini bonzini added the patchew.org This issue affects the configuration of the patchew.org server label Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patchew.org This issue affects the configuration of the patchew.org server
Projects
None yet
Development

No branches or pull requests

1 participant