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

Welcome Forums DSC (Desired State Configuration) Use of node ('localhost') in DSC conf scripts

This topic contains 2 replies, has 3 voices, and was last updated by

 
Participant
2 years, 6 months ago.

  • Author
    Posts
  • #40515

    Participant
    Points: 0
    Rank: Member

    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

    Member
    Points: 0
    Rank: Member

    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

    Participant
    Points: 0
    Rank: Member

    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.

The topic ‘Use of node ('localhost') in DSC conf scripts’ is closed to new replies.