Skip to content

Add auto-update to ansible playbooks #111

Open
@bonzini

Description

@bonzini

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    patchew.orgThis issue affects the configuration of the patchew.org server

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions