OT: using hyphens in host names with cfengine 2

Toomas Tamm tt-fai at kky.ttu.ee
Wed Jul 26 23:01:12 CEST 2017


Hello all,

While this is not directly a FAI issue, it is related to a matter
being discussed.

In another thread, someone mentioned that hyphens in host names are
not compatible with cfengine which requires underscores instead.
Perhaps this is a bug in cfengine, but apparently the host names can
be referred to in group definitions, so I have a block with the
following definitions in my cfengine.conf:

groups:
#   Class aliases for hosts with hyphens in their names. Hyphens are apparently illegal in class names.
    van_arkel     = ( van-arkel )
    von_bayer     = ( von-bayer )
    le_chatelier  = ( le-chatelier )
[...]

In the rest of the cfengine.conf, class names with underscores are
used.

While in my case the names are not numerous and the aliases are
hand-written, an include file with the necessary conversions could
easily be generated programmatically if needed.

Toomas


More information about the linux-fai mailing list