- name: copy re.pl
copy: src=re.pl dest=/usr/local/bin/re.pl mode=0755
+- name: copy use-nytprof
+ copy: src=use-nytprof dest=/usr/local/bin/use-nytprof mode=0755
+
- name: mkdir .re.pl
file: path=/home/vagrant/.re.pl state=directory owner=vagrant group=vagrant mode=0775
--- /dev/null
+#!/bin/bash
+
+USE_NYTPROF="$1"
+if [[ -z $USE_NYTPROF ]]; then
+ USE_NYTPROF=1
+fi
+
+perl -e 'warn "Devel::NYTProf is ", $ARGV[0] ? "enabled" : "disabled", "\n";' "$USE_NYTPROF"
+
+sudo env USE_NYTPROF="$USE_NYTPROF" perl -i -pe 's/^\s*(PerlSetEnv\s+USE_NYTPROF\b).*$/$1 $ENV{USE_NYTPROF}/gmi' \
+ /etc/httpd/conf.d/bugzilla.conf
+sudo service httpd restart
\ No newline at end of file