Role configuration.

This topic contains 2 replies, has 2 voices, and was last updated by  Dan Potter 2 months, 1 week ago.

  • Author
    Posts
  • #72185

    Dan Potter
    Participant

    I've looked at partials and using configuration data but it seems a bit complex for what I'm doing. We have only three types of servers, generic base build, sql, and IIS. I have the basebuild config complete and now I add the role if required.

    I can push a separate configuration after the base build is complete but wondering if there is any reason to avoid scripting inside the node block? Something like this..

    
    Configuration Basebuild {
    
    Node $ComputerName {
    
    file requiredfiles{}
    
    registry regitems{}
    
    if($role -eq 'iis'){
    
    WindowsFeature IIS 
        { 
          Ensure = “Present” 
          Name = “Web-Server” 
        } 
    }
    
    }
    
    }
    
  • #72425

    Don Jones
    Keymaster

    Nope. No reason at all. It's one of the modularization techniques we discuss in "The DSC Book," in fact.

  • #72515

    Dan Potter
    Participant

    I'll have to read it a third time:)

You must be logged in to reply to this topic.