New Reply

Hello

I am migrating our DSC script into Otter and I transcript the following config and the DependsOn did not work :-(

DSC Script

Configuration SetupIISRemoteManagement {

     WindowsFeature isWeb-Server {
        Ensure          = "Present"
        Name            = "Web-Server"
    }
   
   WindowsFeature Management {
         Name = 'Web-Mgmt-Service'
        Ensure = 'Present'
        DependsOn = @('[WindowsFeature]isWeb-Server')
    }

Otter Script ???

##AH:UseTextMode
# SetupIISRemoteManagement
{
PSDsc WindowsFeature ( 
 Otter_ConfigurationKey: isWeb-Server,  
 Name: 'Web-Server',  
 Ensure: 'present'  
 );` 

PSDsc WindowsFeature (
  Otter_ConfigurationKey:  isWeb-Mgmt-Service,
  Name : 'Web-Mgmt-Service',
  Ensure : 'Present',
  DependsOn : DON'T WHAT TO PUT IN ?????
  );

}

I try DependsOn : isWeb-Server but it did not work

Any help would be appreciate
Regards

Philippe

Otter work with PowerShell DSC resources (i.e. a single configurable item).

On its own, Powershell DSC defines configuration as a graph of resources (similar to how Puppet works), and "DependsOn" is one of the mechanisms to construct that graph. The graph is nice, except it's totally unpredictable which order things run in, which is why we decided against the model in design.

Otter, on the other hand, is more procedural (like Chef, Ansible), so we cannot import a concept like "DependsOn".

To define your configuration in Otter, you instead use "roles"; we will soon add a feature called "role dependencies", but this will basically just automatically add roles at configuration time when needed.

Hello

Thank you for the reply. I use OTTER for a few weeks now, So I have to understand the otter model :)

I will apply my DSC in a classical way (start-DSCconfiguration script)

Regards
Philippe

Answer Details

Preview: