diff --git a/scullery.py b/scullery.py index bd0b483..925a8b1 100755 --- a/scullery.py +++ b/scullery.py @@ -30,6 +30,7 @@ argparser.add_argument('--suite', help='Specify the suite to run', required=True arggroup.add_argument('--stop', help='Stop running machines', action='store_true') arggroup.add_argument('--test', help='Start machines and run tests', action='store_true') arggroup.add_argument('--status', help='Get Vagrant deployment status', action='store_true') +arggroup.add_argument('--refresh', help='Re-sync files and re-run bootstrap scripts', action='store_true') args = argparser.parse_args() configfile = args.config @@ -134,7 +135,7 @@ def main_interactive(): log.info('Status report: {}'.format(v.status())) return True status = vagrant_isup(suite) - if status[0] is True and status[1] is None or args.stop: + if status[0] is True and status[1] is None or args.stop or args.refresh: if args.stop is True: log.info('Destroying machines ...') v.destroy() @@ -142,8 +143,11 @@ def main_interactive(): log.debug('OK') else: _abort('Destruction failed') - else: + elif not args.refresh: log.info('Deployment is already running') + elif args.refresh: + log.info('Deployment is running, initiating refresh ...') + v.provision() elif status[0] is False: if status[1] is True: log.debug('Deployment is not running')