Use of node ('localhost') in DSC conf scripts

Tagged: ,

This topic contains 2 replies, has 3 voices, and was last updated by Profile photo of Nitin Gupta Nitin Gupta 1 year, 1 month ago.

  • Author
  • #40515
    Profile photo of TyMac

    I've been substituting the actual hostnames for nodes in my DSC conf scripts and have been using "node ('localhost')...". Is that ok to do? The reason why is I come from a Chef world where we have a "system baseline" configuration that we apply to every new system we create. I'm used to this idea so I was looking for a way to make my DSC configurations as agnostic as possible...

  • #40524
    Profile photo of Dave Wyatt
    Dave Wyatt

    Makes very little difference. You'll wind up with a file named "localhost.mof" (and there may be a reference to "localhost" inside the file's comments or metadata, if I remember right; it's harmless), and you won't be able to push it to a remote system without renaming and/or copying it first, but aside from that, a MOF is a MOF.

  • #40720
    Profile photo of Nitin Gupta
    Nitin Gupta

    As long as you are using it locally in Push Mode it is ok. Pull mode has no issues anyway. Azure DSC extension uses very similar approach and always apply the configuration locally.

You must be logged in to reply to this topic.