Re: policy_server.dat IP to DNS

"'Nick Anderson' via help-cfengine" <[email protected]> Wed, 12 Nov 2025 11:38:55 -0600
Newsgroups gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>
--=-=-=
Content-Type: multipart/alternative; boundary="==-=-="

--==-=-=
Content-Type: text/plain; charset="UTF-8"

IN_PROGRESS Respond to Markus Rexhepi-Lindberg <[email protected]>: Re: [help-cfengine] policy_server.dat IP to DNS :email:
=======================================================================================================================

        Changing the IP address to a DNS address in the
        policy_server.dat for all the clients worked nicely in my
        environment.

        I did it using the following bundle:

        bundle agent migrate_policy_server_dat { files:
        "$(sys.workdir)/policy_server.dat" create => "false",
        edit_line => replace_policy_server_strings(); }

        bundle edit_line replace_policy_server_strings {
        replace_patterns: "192.0.2.10" replace_with =>
        string("cfhub01.example.com"); }

  Great, thanks for sharing!

-- 
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/help-cfengine/87seej5ex6.fsf%40northern.tech.

--==-=-=
Content-Type: text/html; charset="UTF-8"

<blockquote style="border-left: 2px solid gray; padding-left: 4px;">
<p>
Changing the IP address to a DNS address in the policy_server.dat for all the clients worked nicely in my environment.
</p>

<p>
I did it using the following bundle:
</p>

<p>
bundle agent migrate_policy_server_dat
{
  files:
    "$(sys.workdir)/policy_server.dat"
      create =&gt; "false",
      edit_line =&gt; replace_policy_server_strings();
}
</p>

<p>
bundle edit_line replace_policy_server_strings
{
  replace_patterns:
    "192.0.2.10"
      replace_with =&gt; string("cfhub01.example.com");
}
</p>
</blockquote>

<p>
Great, thanks for sharing!
</p>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &quot;help-cfengine&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:[email protected]">[email protected]</a>.<br />
To view this discussion visit <a href="https://groups.google.com/d/msgid/help-cfengine/87seej5ex6.fsf%40northern.tech?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/help-cfengine/87seej5ex6.fsf%40northern.tech</a>.<br />

--==-=-=--

--=-=-=
Content-Type: text/plain; charset="UTF-8"




-- 
Nick Anderson | Doer of Things | (+1) 785-550-1767 | https://northern.tech

-- 
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/help-cfengine/87seej5ex6.fsf%40northern.tech.

--=-=-=--