Skip to content

Fix resources attribute ensure set to latest from scratch

About management of plugings and themes, when the previous value of ensure attribute is present and then move to latest, it works well.

For instance it is :

class { 'wordpress' :
  settings => {
    'mywordpress.foo.org' => {
      ... others attributes ...
      wpresources => {
        plugin => [
          { name => 'plugin1', 'ensure' => 'present' },
        ]
      }
    }
  }
}

and then new settings are :

class { 'wordpress' :
  settings => {
    'mywordpress.foo.org' => {
      ... others attributes ...
      wpresources => {
        plugin => [
          { name => 'plugin1', 'ensure' => 'latest' },
        ]
      }
    }
  }
}

But, if you create a new wordpress instance from scratch with ensure to latest for a plugin or a theme, it does not work.

Edited by Fabien Combernous