English 中文(简体)
bind zone file inside cfengine
原标题:

I have some zone files that uses bind specific $GENERATE directive like this

$GENERATE 50-100 srv-${-50,3,d}  A 10.34.38.$

Now when I add this to cfengine, it tries to expand ${...} and gives an error. I can escape this ${ with ${ and that passes cfengine but I can t use named-checkzone then (cfengine LITERAL directive also will make named-checkzone fail as it adds @@LITERAL in the zone file). One option would be to expand $GENERATE to single lines. Is there any other option I have?

问题回答

Is this CFEngine 2 or CFEngine 3?

If it it is CFEngine 3, would it help if you use the built in variable const.dollar for this?

Consider the following example:

body common control {
    bundlesequence => { "test"};
}

bundle agent test {
    reports:
        linux::
            "$GENERATE 50-100 srv-$(const.dollar){-50,3,d}  A 10.34.38.$";
}

This outputs the following by cf-agent:

# /var/cfengine/bin/cf-agent -K -f /tmp/test.cf 
R: $GENERATE 50-100 srv-${-50,3,d}  A 10.34.38.$

Is it something like this you are trying to achieve?





相关问题
How do I build a DNS Query record in Erlang?

I am building a native Bonjour / Zeroconf library and need to build DNS query records to broadcast off to the other machines. I have tried looking thru the Erlang source code but as I am relatively ...

powerdns-on-rails ArgumentError

My Environments: CentOS 5 ruby 1.8.6 (2008-08-11 patchlevel 287) [x86_64-linux] Ruby Enterprise Edition 20090610 passneger or webrick I use this gem list. *** LOCAL GEMS *** actionmailer (2.3.2, 2....

简讯

我是否可以使用某些软件来建立简便的航天国家服务器,最好是在 Java? 所有我都希望我的航天国家服务机在任何要求中都用同样的IP地址来回答。

Domains & Foreward Slash

This is rather difficult to explain so please bear with me. We will be hosting 4 websites on our server and the plan is to have each site sit under its own domain: site-a.com site-b.com sub1.site-b....

Checking if a domain name is registered

How would I go about checking if a domain name is registered? I was thinking about checking if it has a corresponding IP but it doesn t seem to work as well as I had hoped. Is there a solution in ...

How do I setup a reverse DNS entry in Plesk 9.2.2 frontent?

I need to get a reverse DNS entry into my zones file for one of my domains hosted under Plesk 9.2.2. Does anybody have ANY idea how this done? If all else fails I will have to update the zones file ...

热门标签