%name apache

# Apache web server
#
# This template generates a single primitive resource of type apache

%depends_on virtual-ip
%suggests filesystem

# NB:
# The apache RA monitor operation requires the status module to
# be loaded and access to its page (/server-status) allowed from
# localhost (127.0.0.1). Typically, the status module is not
# loaded by default. How to enable it depends on your
# distribution. For instance, on recent openSUSE or SLES
# releases, it is enough to add word "status" to the list in
# variable APACHE_MODULES in file /etc/sysconfig/apache2.

%required

# Name the apache resource
# (for example: web-1)

%% id 

# The full pathname of the Apache configuration file

%% configfile 

%optional

# Extra options to apply when starting apache. See man httpd(8).

%% options 

# Files (one or more) which contain extra environment variables,
# such as /etc/apache2/envvars

%% envfiles 

%generate

primitive %apache ocf:heartbeat:apache
	params configfile=%_:configfile
	opt options=%_:options
	opt envfiles=%_:envfiles

monitor %apache 120s:60s

group %_:id
	%if %filesystem
		%filesystem
	%fi
	%apache %virtual-ip
