puppet node hostname

前端 未结 5 1506
暗喜
暗喜 2021-02-03 23:05

I\'m using puppet to configure servers. I want to print current machine (node) name in *.erb template. There is hostname variable, but this holds puppetmaster hostname.

5条回答
  •  旧时难觅i
    2021-02-03 23:37

    Yes to all the above; you may also find the fqdn variable useful, depending on what you're up to.

    If you DO find yourself needing the puppet master server's info in a template, you can use the variables servername, serverip, and serverversion (From the Puppet docs).

提交回复
热议问题