0

I have setup DSC in Azure Automation Account and an Azure Ubuntu VM has been configured to pull dsc from the Automation Account.

I have a sample config as below:

Import-DSCResource -Module nx

Node $Node
{
   
   nxFile testConf
   {
      DestinationPath = "/etc/test.conf"
      Mode = "644"
      Type = "file"
      Contents = "hello test"
   }
}
}

It works well in first run and later if I delete it the DSC doesn't create it.

I have similar issue with nxScript which runs script first time but afterwards it doesn't run the script (I'm always returning false in TestScript so it should always run).

It seems the issue is in Pull mode. For test I tried in Push mode and it works well.

pers
  • 195
  • 12

1 Answers1

0

I turned out that I had to set the ConfigurationMode to ApplyAndAutoCorrect instead of ApplyAndMonitor.

pers
  • 195
  • 12