What I'm trying to accomplish:
If a host is defined in the hg_postgresql (HostGroup PostgreSQL), I want
to check /etc/yum.conf for the exclusion list. I want to append a
postgresql* to exclude, because I manage those RPMs manually.
Here's my yum.cf:
editfiles:
hg_postgresql::
{
/etc/yum.conf
Backup "false"
BeginGroupIfNoLineMatching "^exclude=.*"
DefineInGroup "dc_yum_done_pgsql"
Append "exclude= postgresql*"
EndGroup
BeginGroupIfNotDefined "dc_yum_done_pgsql"
BeginGroupIfMatch "^exclude=.*"
AppendToLineIfNotContains " postgresql*"
EndGroup
EndGroup
}
Which works, but in yum.conf the following are valid syntax:
exclude=mysql* postgresql*
exclude=mysql*, postgresql*
And the "exclude= postgresql*" seems like a hack.
This method will work assuming that no one has tampered with the
yum.conf file by hand, and even then, it just appends the exclusion a
second time, which yum doesn seem to mind. Is this the most elegant way
of doing this or am I missing something.
I'd like to be able to add a list of exclusions for a few servers and
allow for everything to work alright if I have hosts living in multiple
host groups. I'm fairly certain the syntax I've chosen will work, just
wanted to run it by a few more eyes.
thanks,
--
Brad Lhotsky <[EMAIL PROTECTED]>
NCTS Computer Specialist
Phone: 410.558.8006
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
http://cfengine.org/mailman/listinfo/help-cfengine