|
106 | 106 | # [*mkhomedir*] |
107 | 107 | # |
108 | 108 | # [*smartc*] |
109 | | -# Boolean to enable or disable SmartCard Authentication. |
| 109 | +# Boolean to enable or disable SmartCard Authentication. |
110 | 110 | # (Default: false) |
111 | 111 | # |
112 | 112 | # [*smartcaction*] |
113 | | -# Boolean to determine SmartCard Removal Action. Values: True = Lock, False = Ignore |
| 113 | +# Boolean to determine SmartCard Removal Action. Values: True = Lock, False = Ignore |
114 | 114 | # (Default: false) |
115 | 115 | # |
116 | 116 | # [*smartcrequire*] |
|
489 | 489 | $exec_check_cmd = "/usr/bin/test \"`${authconfig_test_cmd}`\" = \"`authconfig --test`\"" |
490 | 490 |
|
491 | 491 | if $cache { |
492 | | - package { $authconfig::params::cache_packages: |
| 492 | + ensure_resource('package', $authconfig::params::cache_packages, { |
493 | 493 | ensure => installed, |
494 | | - } -> |
495 | | - service { $authconfig::params::cache_services: |
496 | | - ensure => running, |
| 494 | + }) |
| 495 | + ensure_resource('service', $authconfig::params::cache_services, { |
| 496 | + ensure => running, |
497 | 497 | enable => true, |
498 | 498 | hasstatus => true, |
499 | 499 | hasrestart => true, |
500 | | - } |
| 500 | + }) |
| 501 | + Package[$authconfig::params::cache_packages] -> |
| 502 | + Service[$authconfig::params::cache_services] |
501 | 503 | } |
502 | 504 |
|
503 | 505 | if $krb5 { |
504 | | - package { $authconfig::params::krb5_packages: |
| 506 | + ensure_resource('package', $authconfig::params::krb5_packages, { |
505 | 507 | ensure => installed, |
506 | | - } |
| 508 | + }) |
507 | 509 | } |
508 | 510 |
|
509 | 511 | if $sssd { |
510 | 512 | # if we're using sssd, then sssd takes care of ldap connectivity. |
511 | 513 | # therefore, we only need the sssd packages and services, not the |
512 | 514 | # ldap packages and services |
513 | | - package { $authconfig::params::sssd_packages: |
| 515 | + ensure_resource('package', $authconfig::params::sssd_packages, { |
514 | 516 | ensure => installed, |
515 | | - } |
| 517 | + }) |
516 | 518 | # sssd services must only run after the authconfig command has set |
517 | 519 | # up the config. |
518 | | - service { $authconfig::params::sssd_services: |
| 520 | + ensure_resource('service', $authconfig::params::sssd_services, { |
519 | 521 | ensure => running, |
520 | 522 | enable => true, |
521 | 523 | hasstatus => true, |
522 | 524 | hasrestart => true, |
523 | 525 | require => Exec['authconfig command'], |
524 | | - } |
| 526 | + }) |
525 | 527 | } elsif $ldap { |
526 | | - package { $authconfig::params::ldap_packages: |
| 528 | + ensure_resource('package', $authconfig::params::ldap_packages, { |
527 | 529 | ensure => installed, |
528 | | - } -> |
529 | | - service { $authconfig::params::ldap_services: |
| 530 | + }) |
| 531 | + ensure_resource('service', $authconfig::params::ldap_services, { |
530 | 532 | ensure => running, |
531 | 533 | enable => true, |
532 | 534 | hasstatus => true, |
533 | 535 | hasrestart => true, |
534 | 536 | before => Exec['authconfig command'], |
535 | | - } |
| 537 | + }) |
| 538 | + Package[$authconfig::params::ldap_packages] -> |
| 539 | + Service[$authconfig::params::ldap_services] |
536 | 540 | } |
537 | 541 |
|
538 | 542 | if $mkhomedir { |
539 | | - package { $authconfig::params::mkhomedir_packages: |
| 543 | + ensure_resource('package', $authconfig::params::mkhomedir_packages, { |
540 | 544 | ensure => installed, |
541 | | - } |
| 545 | + }) |
542 | 546 | # service oddjobd is started automatically by authconfig |
543 | 547 | } |
544 | 548 |
|
545 | 549 | if $smartc { |
546 | | - package { $authconfig::params::smartcard_packages: |
| 550 | + ensure_resource('package', $authconfig::params::smartcard_packages, { |
547 | 551 | ensure => installed, |
548 | | - } |
| 552 | + }) |
549 | 553 | } |
550 | 554 |
|
551 | 555 | package { $authconfig::params::packages: |
|
0 commit comments