Hi Robert,
You should try this. Let make it done sequently.
<snip>
classes:
SRV_APACHE_STANDALONE::
"isdir" expression => isdir("/var/www");
files:
SRV_APACHE_STANDALONE.isdir::
# make sure that there is /srv directory
"/srv/."
create => "true";
"/var/www"
rename => MoveTo("/srv/www"),
perms => PermsChgrp("www-data"),
classes => satisfied(next_step);
SRV_APACHE_STANDALONE.next_step::
"/var/www"
link_from => LinkFrom("/srv/www"),
perms => PermsChgrp("www-data");
</snip>
body classes satisfied(x)
{
promise_repaired => { "$(x)" };
}
Cheers,
--Nakarin
On Dec 24, 2009, at 8:05 PM, Robert Markula wrote:
> Hi Brendan,
>
> Brendan Strejcek wrote:
>> I think you want this:
>>
>> http://www.cfengine.org/manuals/cf3-reference.html#move_005fobstructions-in-files
>
> thanks for trying to help me, but unfortunately the error message
> persists. Hmm... another idea?
>
> Here's the latest version (not working):
>
> <snip>
> classes:
> SRV_APACHE_STANDALONE::
> "isdir" expression => isdir("/var/www");
> files:
> SRV_APACHE_STANDALONE.isdir::
> "/var/www/."
> rename => MoveTo("/srv/www/."),
> perms => PermsChgrp("www-data"),
> create => "true";
> SRV_APACHE_STANDALONE::
> "/var/www"
> link_from => LinkFrom("/srv/www"),
> move_obstructions => "true",
> perms => PermsChgrp("www-data");
> </snip>
>
> Cheers,
> Robert
>
> _______________________________________________
> Help-cfengine mailing list
> [email protected]
> https://cfengine.org/mailman/listinfo/help-cfengine
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine