ptierno / puppet-windowspagefile

Puppet type and provider to manage windows pagefiles
Other
1 stars 5 forks source link

ensure => absent doesn't seem to work #5

Open TheCraiggers opened 9 years ago

TheCraiggers commented 9 years ago

Here's my puppet file:

    #Remove pagefile from the C drive
    pagefile { 'c:\pagefile.sys':
         ensure => absent,
     }

     #Add pagefile to the E drive
     pagefile { 'e:\pagefile.sys':
          ensure => present,
          systemmanaged => true,
     }

And here is the resulting resource on the Windows node:

pagefile { 'C:\pagefile.sys':
  ensure        => 'present',
  initialsize   => '0',
  maximumsize   => '0',
  systemmanaged => 'true',
}
pagefile { 'e:\pagefile.sys':
  ensure        => 'present',
  initialsize   => '0',
  maximumsize   => '0',
  systemmanaged => 'true',
}

What I'd expect to happen is Windows should delete the pagefile on the C: drive.

TheCraiggers commented 9 years ago

This came up again today, and I thought I'd check in to see if you ever had any luck. I've looked at the code and don't see anything obvious... not that that is helpful information since I don't know Ruby that well. I also have no idea how I would begin to debug this.

ptierno commented 9 years ago

There is a pull request I haven't had the time to test but should fix the problem. I'll try to get to it this week. On Aug 31, 2015 4:38 PM, "TheCraiggers" notifications@github.com wrote:

This came up again today, and I thought I'd check in to see if you ever had any luck. I've looked at the code and don't see anything obvious... not that that is helpful information since I don't know Ruby that well. I also have no idea how I would begin to debug this.

— Reply to this email directly or view it on GitHub https://github.com/ptierno/puppet-windowspagefile/issues/5#issuecomment-136492570 .

ptierno commented 8 years ago

@TheCraiggers I apologize for the delay. I plan on putting some time into this next week to review and test PR #6 . It looks like a very promising fix.