|
362 | 362 | File["instance ${name} bootstrap.xml"], |
363 | 363 | File["instance ${name} jolokia-access.xml"], |
364 | 364 | File["instance ${name} login.config"], |
365 | | - File_line["instance ${name} set HAWTIO_ROLE"], |
366 | 365 | File_line["instance ${name} set JAVA_ARGS"], |
367 | 366 | ] |
368 | 367 | $_service_require_pre = [ |
|
371 | 370 | File["instance ${name} bootstrap.xml"], |
372 | 371 | File["instance ${name} jolokia-access.xml"], |
373 | 372 | File["instance ${name} login.config"], |
374 | | - File_line["instance ${name} set HAWTIO_ROLE"], |
375 | 373 | File_line["instance ${name} set JAVA_ARGS"], |
376 | 374 | ] |
377 | 375 |
|
|
543 | 541 | } |
544 | 542 | } |
545 | 543 |
|
| 544 | + # Changes for Artemis 2.39.0 and later. |
| 545 | + if (versioncmp($activemq::version, '2.39.0') >= 0) { |
| 546 | + # Remove old HAWTIO role. |
| 547 | + file_line { "instance ${name} remove HAWTIO_ROLE": |
| 548 | + ensure => 'absent', |
| 549 | + path => $artemis_profile, |
| 550 | + match => '^HAWTIO_ROLE=', |
| 551 | + match_for_absence => true, |
| 552 | + require => [ |
| 553 | + Exec["create instance ${name}"] |
| 554 | + ], |
| 555 | + } |
| 556 | + # Configure HAWTIO roles. |
| 557 | + file_line { "instance ${name} set HAWTIO_ROLES": |
| 558 | + ensure => 'present', |
| 559 | + path => $artemis_profile, |
| 560 | + line => "HAWTIO_ROLES=\'${$activemq::hawtio_role}\'", |
| 561 | + match => '^HAWTIO_ROLES=', |
| 562 | + after => '^# Hawtio Properties', |
| 563 | + append_on_no_match => true, |
| 564 | + require => [ |
| 565 | + Exec["create instance ${name}"] |
| 566 | + ], |
| 567 | + } |
| 568 | + } else { |
| 569 | + # Configure HAWTIO role (legacy). |
| 570 | + file_line { "instance ${name} set HAWTIO_ROLE": |
| 571 | + ensure => 'present', |
| 572 | + path => $artemis_profile, |
| 573 | + line => "HAWTIO_ROLE=\'${$activemq::hawtio_role}\'", |
| 574 | + match => '^HAWTIO_ROLE=', |
| 575 | + append_on_no_match => false, |
| 576 | + require => [ |
| 577 | + Exec["create instance ${name}"] |
| 578 | + ], |
| 579 | + } |
| 580 | + } |
| 581 | + |
| 582 | + # Changes for Artemis 2.42.0 and later. |
546 | 583 | if (versioncmp($activemq::version, '2.42.0') >= 0) { |
547 | 584 | # Remove obsolete variables from profile. |
548 | 585 | file_line { "instance ${name} remove ARTEMIS_INSTANCE_URI": |
|
574 | 611 | } |
575 | 612 | } |
576 | 613 |
|
577 | | - # Configure HAWTIO role. |
578 | | - file_line { "instance ${name} set HAWTIO_ROLE": |
579 | | - ensure => 'present', |
580 | | - path => $artemis_profile, |
581 | | - line => "HAWTIO_ROLE=\'${$activemq::hawtio_role}\'", |
582 | | - match => '^HAWTIO_ROLE=', |
583 | | - append_on_no_match => false, |
584 | | - require => [ |
585 | | - Exec["create instance ${name}"] |
586 | | - ], |
587 | | - } |
588 | | - |
589 | 614 | # Configure ARTEMIS_HOME. |
590 | 615 | file_line { "instance ${name} set ARTEMIS_HOME": |
591 | 616 | ensure => 'present', |
|
0 commit comments