rhtconsulting / puppet-jboss_admin

Puppet module for runtime configuration of a JBoss container
MIT License
15 stars 12 forks source link

Can't remove xa datasource and add datasource with the same name #98

Open itewk opened 8 years ago

itewk commented 8 years ago

Currently if you try to remove a datasource of xa type and then add a datasource with the same name of not xa type in the same puppet run then Puppet complains about a duplicate jboss_resource.

    # remove none xa datasource of same name
    jboss_admin::resource::data_source { /subsystem=datasources/data-source=DSPOOL:
      ensure => absent,
      server => standalone,
    }   
    ->  
    # create xa datasource
    jboss_admin::resource::xa_data_source { /subsystem=datasources/data-source=DSPOOL:
      ensure                              => present,
      server                              => standalone,
   }
Error: Duplicate declaration: Jboss_resource[/subsystem=datasources/data-source=DSPOOL] is already declared in file /root/modules/jboss_admin/manifests/resource/xa_data_source.pp:406; cannot redeclare at /root/modules/jboss_admin/manifests/resource/data_source.pp:342
itewk commented 8 years ago

I think this can only be addressed by fixing https://github.com/rhtconsulting/puppet-jboss_admin/issues/87

itewk commented 8 years ago
2016-07-11 16:46:54 - Error: Cannot alias Jboss_resource[Add XA Data Source: /subsystem=datasources/xa-data-source=DSPOOL] to ["/subsystem=datasources/xa-data-source=DSPOOL"] at /root/modules/jboss_admin/manifests/resource/xa_data_source.pp:397; resource ["Jboss_resource", "/subsystem=datasources/xa-data-source=DSPOOL"] already declared at /root/modules/jboss_admin/manifests/resource/data_source.pp:349
itewk commented 8 years ago

this maybe inpossible due the aliasing required for the auto dependencies