Azure / nxtools

Azure Automanage Machine Configuration Linux DSC resources
Other
13 stars 13 forks source link

nxFile - possible to set file content while traversing a symbolic link? #38

Closed eehret closed 1 year ago

eehret commented 1 year ago

I would expect that nxFile should be able to follow a symbolic link pointing to a file, and set its content. Is this currently possible?

I tried the following and it didn't seem to work - the guest configuration report got stuck on 'Pending' forever and didn't report anything. I'm assuming it crashed but have yet to find the actual error that got output.

    nxFile pamd_password_auth
    {
      Ensure = "Present"
      DestinationPath = "/etc/pam.d/password-auth"
      Type = "Link" 
      Contents = $Contents_pass_auth
      Mode = "644"
      Owner = "root"
      Group = "root"
    }
jodi-boone commented 1 year ago

Hi @eehret this would be an enhancement to the current functionality. We think this is a good idea and will look into what would be required to make this change.