|
423 | 423 | $loadmodulepath = $zabbix::params::proxy_loadmodulepath, |
424 | 424 | $loadmodule = $zabbix::params::proxy_loadmodule, |
425 | 425 | Boolean $manage_selinux = $zabbix::params::manage_selinux, |
426 | | - ) inherits zabbix::params { |
427 | | - |
| 426 | +) inherits zabbix::params { |
428 | 427 | # check osfamily, Arch is currently not supported for web |
429 | 428 | if $facts['os']['family'] == 'Archlinux' { |
430 | 429 | fail('Archlinux is currently not supported for zabbix::proxy ') |
|
524 | 523 | } |
525 | 524 |
|
526 | 525 | Package["zabbix-proxy-${db}"] { |
527 | | - require => Class['zabbix::repo'] } |
| 526 | + require => Class['zabbix::repo'] |
| 527 | + } |
528 | 528 | } |
529 | 529 |
|
530 | 530 | # Now we are going to install the correct packages. |
|
564 | 564 | subscribe => [ |
565 | 565 | File[$proxy_configfile_path], |
566 | 566 | Class['zabbix::database'] |
567 | | - ], |
| 567 | + ], |
568 | 568 | require => [ |
569 | 569 | Package["zabbix-proxy-${db}"], |
570 | 570 | File[$include_dir], |
571 | 571 | File[$proxy_configfile_path], |
572 | 572 | Class['zabbix::database'] |
573 | | - ], |
| 573 | + ], |
574 | 574 | } |
575 | 575 | } |
576 | 576 |
|
577 | | - |
578 | 577 | $before_database = $manage_service ? { |
579 | 578 | true => [ |
580 | 579 | Service[$proxy_service_name], |
581 | 580 | Class["zabbix::database::${database_type}"] |
582 | | - ], |
| 581 | + ], |
583 | 582 | false => Class["zabbix::database::${database_type}"], |
584 | 583 | } |
585 | 584 |
|
586 | 585 | # if we want to manage the databases, we do |
587 | 586 | # some stuff. (for maintaining database only.) |
588 | | - if $manage_database { |
589 | | - class { 'zabbix::database': |
590 | | - database_type => $database_type, |
591 | | - zabbix_type => 'proxy', |
592 | | - database_name => $database_name, |
593 | | - database_user => $database_user, |
594 | | - database_password => $database_password, |
595 | | - database_host => $database_host, |
596 | | - zabbix_proxy => $zabbix_proxy, |
597 | | - zabbix_proxy_ip => $zabbix_proxy_ip, |
598 | | - before => $before_database, |
599 | | - } |
| 587 | + if $manage_database { |
| 588 | + class { 'zabbix::database': |
| 589 | + database_type => $database_type, |
| 590 | + zabbix_type => 'proxy', |
| 591 | + database_name => $database_name, |
| 592 | + database_user => $database_user, |
| 593 | + database_password => $database_password, |
| 594 | + database_host => $database_host, |
| 595 | + zabbix_proxy => $zabbix_proxy, |
| 596 | + zabbix_proxy_ip => $zabbix_proxy_ip, |
| 597 | + before => $before_database, |
600 | 598 | } |
| 599 | + } |
601 | 600 |
|
602 | 601 | # Configuring the zabbix-proxy configuration file |
603 | 602 | file { $proxy_configfile_path: |
|
625 | 624 | state => [ |
626 | 625 | 'NEW', |
627 | 626 | 'RELATED', |
628 | | - 'ESTABLISHED'], |
| 627 | + 'ESTABLISHED', |
| 628 | + ], |
629 | 629 | } |
630 | 630 | } |
631 | 631 |
|
632 | 632 | # check if selinux is active and allow zabbix |
633 | 633 | if fact('os.selinux.enabled') == true and $manage_selinux { |
634 | | - selboolean{'zabbix_can_network': |
| 634 | + selboolean { 'zabbix_can_network': |
635 | 635 | persistent => true, |
636 | 636 | value => 'on', |
637 | 637 | } |
638 | 638 | } |
639 | | - |
640 | 639 | } |
0 commit comments