#!/bin/bash

. /etc/lmn7-netboot.conf

filter=$1

cd $NBROOT || exit 1

if [ "x$2" == "xoff" ]; then 
    ansible-playbook -i $INVENTORY -l $filter shutdown.yml
fi

if [ "x$2" == "xon" ]; then 
    ansible-playbook -i $INVENTORY -l $filter wol.yml
fi

