Puppet Class: yum

Defined in:
manifests/init.pp

Summary

Manage yum (client, server, and key management)

Overview

Examples:

Declaring the class

include ::yum

Parameters:

  • config_path (Stdlib::Absolutepath) (defaults to: '/etc/yum.conf')

    Set the path to the yum.conf file, representing a fully qualified name.

  • config_owner (String) (defaults to: 'root')

    Set owner access to the yum.conf file, representing a user.

  • config_group (String) (defaults to: 'root')

    Set group access to the yum.conf file, representing a group.

  • config_mode (Stdlib::Filemode) (defaults to: '0644')

    Set access permissions for the yum.conf file, in numeric notation.

  • manage_repos (Boolean) (defaults to: false)

    Trigger if files in /etc/yum.repos.d should get managed by Puppet exclusivly. If set to true, all unmanged files in /etc/yum.repos.d (and below) will get removed.

  • repos_d_owner (String) (defaults to: 'root')

    Set owner access to the /etc/yum.repos.d directory, representing a user.

  • repos_d_group (String) (defaults to: 'root')

    Set group access to the /etc/yum.repos.d directory, representing a group.

  • repos_d_mode (Stdlib::Filemode) (defaults to: '0755')

    Set access permissions for the /etc/yum.repos.d directory, in numeric notation.

  • repos_hiera_merge (Boolean) (defaults to: true)

    Trigger to merge all found instances of yum::repos in Hiera. This is useful for specifying repositories at different levels of the hierarchy and having them all included in the catalog.

  • rpm_gpg_keys_hiera_merge (Boolean) (defaults to: true)

    Trigger to merge all found instances of yum::rpm_gpg_keys in Hiera. This is useful for specifying repositories at different levels of the hierarchy and having them all included in the catalog.

  • repos (Optional[Hash]) (defaults to: undef)

    Hash of repos to pass to yum::repo. See yum::repo for more details.

  • rpm_gpg_keys (Optional[Hash]) (defaults to: undef)

    Hash of repos to pass to yum::rpm_gpg_keys. See yum::rpm_gpg_key for more details.

  • exclude_hiera_merge (Boolean) (defaults to: false)

    Trigger to merge all found instances of yum::exclude in Hiera. This is useful for specifying repositories at different levels of the hierarchy and having them all included in the catalog.

  • color_list_available_downgrade (Array) (defaults to: [])

    color_list_available_downgrade setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.

  • color_list_available_install (Array) (defaults to: [])

    color_list_available_install setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.

  • color_list_available_reinstall (Array) (defaults to: [])

    color_list_available_reinstall setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.

  • color_list_available_upgrade (Array) (defaults to: [])

    color_list_available_upgrade setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.

  • color_list_installed_extra (Array) (defaults to: [])

    color_list_installed_extra setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.

  • color_list_installed_newer (Array) (defaults to: [])

    color_list_installed_newer setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.

  • color_list_installed_older (Array) (defaults to: [])

    color_list_installed_older setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.

  • color_list_installed_reinstall (Array) (defaults to: [])

    color_list_installed_reinstall setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.

  • color_search_match (Array) (defaults to: [])

    color_search_match setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.

  • color_update_installed (Array) (defaults to: [])

    color_update_installed setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.

  • color_update_local (Array) (defaults to: [])

    color_update_local setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.

  • color_update_remote (Array) (defaults to: [])

    color_update_remote setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.

  • commands (Array) (defaults to: [])

    commands setting in the main section of yum.conf. When empty, it will not be present in yum.conf.

  • exclude (Array) (defaults to: [])

    exclude setting in the main section of yum.conf. When empty, it will not be present in yum.conf.

  • group_package_types (Array) (defaults to: [])

    group_package_types setting in the main section of yum.conf. Valid values are: , 'default', 'mandatory', and 'optional'. When empty, it will not be present in yum.conf.

  • history_record_packages (Array) (defaults to: [])

    history_record_packages setting in the main section of yum.conf. When empty, it will not be present in yum.conf.

  • installonlypkgs (Array) (defaults to: [])

    installonlypkgs setting in the main section of yum.conf. When empty, it will not be present in yum.conf.

  • kernelpkgnames (Array) (defaults to: [])

    kernelpkgnames setting in the main section of yum.conf. When empty, it will not be present in yum.conf.

  • protected_packages (Array) (defaults to: [])

    protected_packages setting in the main section of yum.conf. When empty, it will not be present in yum.conf.

  • tsflags (Array) (defaults to: [])

    tsflags setting in the main section of yum.conf. Valid values are: , 'justdb', 'nocontexts', 'nodocs', 'noscripts', 'notriggers', 'repackage', and 'test' When empty, it will not be present in yum.conf.

  • reposdir (Array[Stdlib::Absolutepath]) (defaults to: [])

    reposdir setting in the main section of yum.conf. Takes a list of one or more absolute paths. When empty, it will not be present in yum.conf.

  • distroverpkg (Optional[Variant[Boolean,String]]) (defaults to: undef)

    distroverpkg setting in the main section of yum.conf. Will use the format distroverpk=$::operatingsystem-release (downcase) if true. Alternatively you can also specify a free string text instead. When undef, it will not be present in yum.conf.

  • alwaysprompt (Optional[Boolean]) (defaults to: undef)

    alwaysprompt setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • assumeyes (Optional[Boolean]) (defaults to: undef)

    assumeyes setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • clean_requirements_on_remove (Optional[Boolean]) (defaults to: undef)

    clean_requirements_on_remove setting in the main section of yum.conf. True enables, false disables this feature. When clean, it will not be present in yum.conf.

  • color (Optional[Boolean]) (defaults to: undef)

    color setting in the main section of yum.conf. True enables, false disables this feature. When clean, it will not be present in yum.conf.

  • diskspacecheck (Optional[Boolean]) (defaults to: undef)

    diskspacecheck setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • enable_group_conditionals (Optional[Boolean]) (defaults to: undef)

    enable_group_conditionals setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • exactarch (Optional[Boolean]) (defaults to: true)

    exactarch setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • gpgcheck (Optional[Boolean]) (defaults to: false)

    gpgcheck setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • groupremove_leaf_only (Optional[Boolean]) (defaults to: undef)

    groupremove_leaf_only setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • history_record (Optional[Boolean]) (defaults to: undef)

    history_record setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • keepalive (Optional[Boolean]) (defaults to: undef)

    keepalive setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • keepcache (Optional[Boolean]) (defaults to: true)

    keepcache setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • localpkg_gpgcheck (Optional[Boolean]) (defaults to: undef)

    localpkg_gpgcheck setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • obsoletes (Optional[Boolean]) (defaults to: true)

    obsoletes setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • overwrite_groups (Optional[Boolean]) (defaults to: undef)

    overwrite_groups setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • plugins (Optional[Boolean]) (defaults to: false)

    plugins setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • protected_multilib (Optional[Boolean]) (defaults to: undef)

    protected_multilib setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • repo_gpgcheck (Optional[Boolean]) (defaults to: undef)

    repo_gpgcheck setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • reset_nice (Optional[Boolean]) (defaults to: undef)

    reset_nice setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • showdupesfromrepos (Optional[Boolean]) (defaults to: undef)

    showdupesfromrepos setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • skip_broken (Optional[Boolean]) (defaults to: undef)

    skip_broken setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • ssl_check_cert_permissions (Optional[Boolean]) (defaults to: undef)

    ssl_check_cert_permissions setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • sslverify (Optional[Boolean]) (defaults to: undef)

    sslverify setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • tolerant (Optional[Boolean]) (defaults to: false)

    tolerant setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.

  • debuglevel (Optional[Integer[0, 10]]) (defaults to: 2)

    debuglevel setting in the main section of yum.conf. Takes any integer between 0 and 10. When undef, it will not be present in yum.conf.

  • errorlevel (Optional[Integer[0, 10]]) (defaults to: undef)

    errorlevel setting in the main section of yum.conf. Takes any integer between 0 and 10. When undef, it will not be present in yum.conf.

  • bandwidth (Optional[Integer]) (defaults to: undef)

    bandwidth setting in the main section of yum.conf. Takes any integer. When undef, it will not be present in yum.conf.

  • installonly_limit (Optional[Integer]) (defaults to: undef)

    installonly_limit setting in the main section of yum.conf. Takes any integer. When undef, it will not be present in yum.conf.

  • mirrorlist_expire (Optional[Integer]) (defaults to: undef)

    mirrorlist_expire setting in the main section of yum.conf. Takes any integer. When undef, it will not be present in yum.conf.

  • recent (Optional[Integer]) (defaults to: undef)

    recent setting in the main section of yum.conf. Takes any integer. When undef, it will not be present in yum.conf.

  • retries (Optional[Integer]) (defaults to: undef)

    retries setting in the main section of yum.conf. Takes any integer. When undef, it will not be present in yum.conf.

  • timeout (Optional[Integer]) (defaults to: undef)

    timeout setting in the main section of yum.conf. Takes any integer. When undef, it will not be present in yum.conf.

  • cachedir (Optional[Stdlib::Absolutepath]) (defaults to: '/var/cache/yum/$basearch/$releasever')

    cachedir setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • installroot (Optional[Stdlib::Absolutepath]) (defaults to: undef)

    installroot setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • logfile (Optional[Stdlib::Absolutepath]) (defaults to: '/var/log/yum.log')

    logfile setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • persistdir (Optional[Stdlib::Absolutepath]) (defaults to: undef)

    persistdir setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • pluginconfpath (Optional[Stdlib::Absolutepath]) (defaults to: undef)

    pluginconfpath setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • pluginpath (Optional[Stdlib::Absolutepath]) (defaults to: undef)

    pluginpath setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • sslcacert (Optional[Stdlib::Absolutepath]) (defaults to: undef)

    sslcacert setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • sslclientcert (Optional[Stdlib::Absolutepath]) (defaults to: undef)

    sslclientcert setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • sslclientkey (Optional[Stdlib::Absolutepath]) (defaults to: undef)

    sslclientkey setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • bugtracker_url (Optional[Stdlib::Httpurl]) (defaults to: undef)

    bugtracker_url setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • proxy (Optional[Stdlib::Httpurl]) (defaults to: undef)

    proxy setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • password (Optional[String]) (defaults to: undef)

    password setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • proxy_password (Optional[String]) (defaults to: undef)

    proxy_password setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • proxy_username (Optional[String]) (defaults to: undef)

    proxy_username setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • syslog_device (Optional[String]) (defaults to: undef)

    syslog_device setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • syslog_facility (Optional[String]) (defaults to: undef)

    syslog_facility setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • syslog_ident (Optional[String]) (defaults to: undef)

    syslog_ident setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • username (Optional[String]) (defaults to: undef)

    username setting in the main section of yum.conf. When undef, it will not be present in yum.conf.

  • throttle (Optional[Variant[Integer,Float,Pattern[/^\d+(.\d+|)(k|M|G)*$/]]]) (defaults to: undef)

    throttle setting in the main section of yum.conf. Rate in bytes/sec, allows a suffix of k, M, or G to be appended. When undef, it will not be present in yum.conf.

  • metadata_expire (Optional[Variant[Integer,Pattern[/^(\d+(m|h|d)*|never|)$/]]]) (defaults to: '6h')

    metadata_expire setting in the main section of yum.conf. Time in seconds, allows a suffix of m, h, or d to specify minutes, hours, or days. Alternatively you can also specify the word never instead. When undef, it will not be present in yum.conf.

  • history_list_view (Optional[Enum['cmds','commands','default','single-user-commands','users']]) (defaults to: undef)

    history_list_view setting in the main section of yum.conf. Valid values are: 'cmds', 'commands', 'default', 'single-user-commands', or 'users'. When undef, it will not be present in yum.conf.

  • mdpolicy (Optional[Enum['group:all','group:main','group:primary','group:small','instant']]) (defaults to: undef)

    mdpolicy setting in the main section of yum.conf. Valid values are: 'group:all', 'group:main', 'group:primary', 'group:small', or 'instant'. When undef, it will not be present in yum.conf.

  • rpmverbosity (Optional[Enum['critical','debug','emergency','error','info','warn']]) (defaults to: undef)

    rpmverbosity setting in the main section of yum.conf. Valid values are: 'critical', 'debug', 'emergency', 'error', 'info', or 'warn'. When undef, it will not be present in yum.conf.

  • http_caching (Optional[Enum['all','none','packages']]) (defaults to: undef)

    http_caching setting in the main section of yum.conf. Valid values are: 'all', 'none', or 'packages'. When undef, it will not be present in yum.conf.

  • multilib_policy (Optional[Enum['all','best']]) (defaults to: undef)

    multilib_policy setting in the main section of yum.conf. Valid values are: 'all' or 'best'. When undef, it will not be present in yum.conf.

  • pkgpolicy (Optional[Enum['last', 'newest']]) (defaults to: undef)

    pkgpolicy setting in the main section of yum.conf. Valid values are: 'last' or 'newest'. When undef, it will not be present in yum.conf.



416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
# File 'manifests/init.pp', line 416

class yum (
  Boolean $exclude_hiera_merge                    = false,
  Boolean $manage_repos                           = false,
  Boolean $repos_hiera_merge                      = true,
  Boolean $rpm_gpg_keys_hiera_merge               = true,
  Stdlib::Absolutepath $config_path               = '/etc/yum.conf',
  Stdlib::Filemode $config_mode                   = '0644',
  Stdlib::Filemode $repos_d_mode                  = '0755',
  String $config_group                            = 'root',
  String $config_owner                            = 'root',
  String $repos_d_group                           = 'root',
  String $repos_d_owner                           = 'root',
  Optional[Hash] $repos                           = undef,
  Optional[Hash] $rpm_gpg_keys                    = undef,
  # parameters for yum.conf
  Array $color_list_available_downgrade           = [],
  Array $color_list_available_install             = [],
  Array $color_list_available_reinstall           = [],
  Array $color_list_available_upgrade             = [],
  Array $color_list_installed_extra               = [],
  Array $color_list_installed_newer               = [],
  Array $color_list_installed_older               = [],
  Array $color_list_installed_reinstall           = [],
  Array $color_search_match                       = [],
  Array $color_update_installed                   = [],
  Array $color_update_local                       = [],
  Array $color_update_remote                      = [],
  Array $commands                                 = [],
  Array $exclude                                  = [],
  Array $group_package_types                      = [],
  Array $history_record_packages                  = [],
  Array $installonlypkgs                          = [],
  Array $kernelpkgnames                           = [],
  Array $protected_packages                       = [],
  Array $tsflags                                  = [],
  Array[Stdlib::Absolutepath] $reposdir           = [],
  Optional[Variant[Boolean,String]] $distroverpkg = undef,
  Optional[Boolean] $alwaysprompt                 = undef,
  Optional[Boolean] $assumeyes                    = undef,
  Optional[Boolean] $clean_requirements_on_remove = undef,
  Optional[Boolean] $color                        = undef,
  Optional[Boolean] $diskspacecheck               = undef,
  Optional[Boolean] $enable_group_conditionals    = undef,
  Optional[Boolean] $exactarch                    = true,
  Optional[Boolean] $gpgcheck                     = false,
  Optional[Boolean] $groupremove_leaf_only        = undef,
  Optional[Boolean] $history_record               = undef,
  Optional[Boolean] $keepalive                    = undef,
  Optional[Boolean] $keepcache                    = true,
  Optional[Boolean] $localpkg_gpgcheck            = undef,
  Optional[Boolean] $obsoletes                    = true,
  Optional[Boolean] $overwrite_groups             = undef,
  Optional[Boolean] $plugins                      = false,
  Optional[Boolean] $protected_multilib           = undef,
  Optional[Boolean] $repo_gpgcheck                = undef,
  Optional[Boolean] $reset_nice                   = undef,
  Optional[Boolean] $showdupesfromrepos           = undef,
  Optional[Boolean] $skip_broken                  = undef,
  Optional[Boolean] $ssl_check_cert_permissions   = undef,
  Optional[Boolean] $sslverify                    = undef,
  Optional[Boolean] $tolerant                     = false,
  Optional[Integer[0, 10]] $debuglevel            = 2,
  Optional[Integer[0, 10]] $errorlevel            = undef,
  Optional[Integer] $bandwidth                    = undef,
  Optional[Integer] $installonly_limit            = undef,
  Optional[Integer] $mirrorlist_expire            = undef,
  Optional[Integer] $recent                       = undef,
  Optional[Integer] $retries                      = undef,
  Optional[Integer] $timeout                      = undef,
  Optional[Stdlib::Absolutepath] $cachedir        = '/var/cache/yum/$basearch/$releasever',
  Optional[Stdlib::Absolutepath] $installroot     = undef,
  Optional[Stdlib::Absolutepath] $logfile         = '/var/log/yum.log',
  Optional[Stdlib::Absolutepath] $persistdir      = undef,
  Optional[Stdlib::Absolutepath] $pluginconfpath  = undef,
  Optional[Stdlib::Absolutepath] $pluginpath      = undef,
  Optional[Stdlib::Absolutepath] $sslcacert       = undef,
  Optional[Stdlib::Absolutepath] $sslclientcert   = undef,
  Optional[Stdlib::Absolutepath] $sslclientkey    = undef,
  Optional[Stdlib::Httpurl] $bugtracker_url       = undef,
  Optional[Stdlib::Httpurl] $proxy                = undef,
  Optional[String] $password                      = undef,
  Optional[String] $proxy_password                = undef,
  Optional[String] $proxy_username                = undef,
  Optional[String] $syslog_device                 = undef,
  Optional[String] $syslog_facility               = undef,
  Optional[String] $syslog_ident                  = undef,
  Optional[String] $username                      = undef,
  Optional[Variant[Integer,Float,Pattern[/^\d+(.\d+|)(k|M|G)*$/]]] $throttle                    = undef,
  Optional[Variant[Integer,Pattern[/^(\d+(m|h|d)*|never|)$/]]] $metadata_expire                 = '6h',
  Optional[Enum['cmds','commands','default','single-user-commands','users']] $history_list_view = undef,
  Optional[Enum['group:all','group:main','group:primary','group:small','instant']] $mdpolicy    = undef,
  Optional[Enum['critical','debug','emergency','error','info','warn']] $rpmverbosity            = undef,
  Optional[Enum['all','none','packages']] $http_caching                                         = undef,
  Optional[Enum['all','best']] $multilib_policy                                                 = undef,
  Optional[Enum['last', 'newest']] $pkgpolicy                                                   = undef,
) {

  $_valid_colors = [
    'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim',
    'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline',
  ]

  if $color_list_available_downgrade - $_valid_colors != [] {
    fail("yum::color_list_available_downgrade contains an invalid value. Valid values are <${_valid_colors}>.")
  }

  if $color_list_available_install - $_valid_colors != [] {
    fail("yum::color_list_available_install contains an invalid value. Valid values are <${_valid_colors}>.")
  }

  if $color_list_available_reinstall - $_valid_colors != [] {
    fail("yum::color_list_available_reinstall contains an invalid value. Valid values are <${_valid_colors}>.")
  }

  if $color_list_available_upgrade - $_valid_colors != [] {
    fail("yum::color_list_available_upgrade contains an invalid value. Valid values are <${_valid_colors}>.")
  }

  if $color_list_installed_extra - $_valid_colors != [] {
    fail("yum::color_list_installed_extra contains an invalid value. Valid values are <${_valid_colors}>.")
  }

  if $color_list_installed_newer - $_valid_colors != [] {
    fail("yum::color_list_installed_newer contains an invalid value. Valid values are <${_valid_colors}>.")
  }

  if $color_list_installed_older - $_valid_colors != [] {
    fail("yum::color_list_installed_older contains an invalid value. Valid values are <${_valid_colors}>.")
  }

  if $color_list_installed_reinstall - $_valid_colors != [] {
    fail("yum::color_list_installed_reinstall contains an invalid value. Valid values are <${_valid_colors}>.")
  }

  if $color_search_match - $_valid_colors != [] {
    fail("yum::color_search_match contains an invalid value. Valid values are <${_valid_colors}>.")
  }

  if $color_update_installed - $_valid_colors != [] {
    fail("yum::color_update_installed contains an invalid value. Valid values are <${_valid_colors}>.")
  }

  if $color_update_local - $_valid_colors != [] {
    fail("yum::color_update_local contains an invalid value. Valid values are <${_valid_colors}>.")
  }

  if $color_update_remote - $_valid_colors != [] {
    fail("yum::color_update_remote contains an invalid value. Valid values are <${_valid_colors}>.")
  }

  if $group_package_types - ['optional', 'default', 'mandatory'] != [] {
    fail('yum::group_package_types contains an invalid value. Valid values are <optional>, <default>, and <mandatory>.')
  }

  if $tsflags - ['justdb', 'nocontexts', 'nodocs', 'noscripts', 'notriggers', 'repackage', 'test'] != [] {
    fail('yum::tsflags contains an invalid value. Valid values are <justdb>, <nocontexts>, <nodocs>, <noscripts>, <notriggers>, <repackage>, and <test>.')
  }

  # <convert booleans to string values>
  $alwaysprompt_string = $alwaysprompt ? {
    Boolean => bool2str($alwaysprompt, '1', '0'),
    default => undef,
  }

  $assumeyes_string = $assumeyes ? {
    Boolean => bool2str($assumeyes, '1', '0'),
    default => undef,
  }

  $clean_requirements_on_remove_string = $clean_requirements_on_remove ? {
    Boolean => bool2str($clean_requirements_on_remove, '1', '0'),
    default => undef,
  }

  $color_string = $color ? {
    Boolean => bool2str($color, '1', '0'),
    default => undef,
  }

  $diskspacecheck_string = $diskspacecheck ? {
    Boolean => bool2str($diskspacecheck, '1', '0'),
    default => undef,
  }

  $enable_group_conditionals_string = $enable_group_conditionals ? {
    Boolean => bool2str($enable_group_conditionals, '1', '0'),
    default => undef,
  }

  $exactarch_string = $exactarch ? {
    Boolean => bool2str($exactarch, '1', '0'),
    default => undef,
  }

  $gpgcheck_string = $gpgcheck ? {
    Boolean => bool2str($gpgcheck, '1', '0'),
    default => undef,
  }

  $groupremove_leaf_only_string = $groupremove_leaf_only ? {
    Boolean => bool2str($groupremove_leaf_only, '1', '0'),
    default => undef,
  }

  $history_record_string = $history_record ? {
    Boolean => bool2str($history_record, '1', '0'),
    default => undef,
  }

  $keepalive_string = $keepalive ? {
    Boolean => bool2str($keepalive, '1', '0'),
    default => undef,
  }

  $keepcache_string = $keepcache ? {
    Boolean => bool2str($keepcache, '1', '0'),
    default => undef,
  }

  $localpkg_gpgcheck_string = $localpkg_gpgcheck ? {
    Boolean => bool2str($localpkg_gpgcheck, '1', '0'),
    default => undef,
  }

  $obsoletes_string = $obsoletes ? {
    Boolean => bool2str($obsoletes, '1', '0'),
    default => undef,
  }

  $overwrite_groups_string = $overwrite_groups ? {
    Boolean => bool2str($overwrite_groups, '1', '0'),
    default => undef,
  }

  $plugins_string = $plugins ? {
    Boolean => bool2str($plugins, '1', '0'),
    default => undef,
  }

  $protected_multilib_string = $protected_multilib ? {
    Boolean => bool2str($protected_multilib, '1', '0'),
    default => undef,
  }

  $repo_gpgcheck_string = $repo_gpgcheck ? {
    Boolean => bool2str($repo_gpgcheck, '1', '0'),
    default => undef,
  }

  $reset_nice_string = $reset_nice ? {
    Boolean => bool2str($reset_nice, '1', '0'),
    default => undef,
  }

  $showdupesfromrepos_string = $showdupesfromrepos ? {
    Boolean => bool2str($showdupesfromrepos, '1', '0'),
    default => undef,
  }

  $skip_broken_string = $skip_broken ? {
    Boolean => bool2str($skip_broken, '1', '0'),
    default => undef,
  }

  $ssl_check_cert_permissions_string = $ssl_check_cert_permissions ? {
    Boolean => bool2str($ssl_check_cert_permissions, '1', '0'),
    default => undef,
  }

  $sslverify_string = $sslverify ? {
    Boolean => bool2str($sslverify, '1', '0'),
    default => undef,
  }

  $tolerant_string = $tolerant ? {
    Boolean => bool2str($tolerant, '1', '0'),
    default => undef,
  }

  # </convert booleans to string values>

  $distroverpkg_string = $distroverpkg ? {
    true    => "${::operatingsystem.downcase}-release",
    String  => $distroverpkg,
    default => undef,
  }

  case $exclude_hiera_merge {
    true:    { $exclude_real = lookup('yum::exclude', Array[String], unique ) }
    default: { $exclude_real = $exclude }
  }

  if $repos != undef {
    case $repos_hiera_merge {
      true:    { $repos_real = lookup('yum::repos', Hash, hash ) }
      default: { $repos_real = $repos }
    }

    $repos_real.each |$key,$value| {
      ::yum::repo { $key:
        * => $value,
      }
    }
  }

  if $rpm_gpg_keys != undef {
    case $rpm_gpg_keys_hiera_merge {
      true:    { $rpm_gpg_keys_real = lookup('yum::rpm_gpg_keys', Hash, hash ) }
      default: { $rpm_gpg_keys_real = $rpm_gpg_keys }
    }

    $rpm_gpg_keys_real.each |$key,$value| {
      ::yum::rpm_gpg_key { $key:
        * => $value,
      }
    }
  }

  include ::yum::updatesd

  package { 'yum':
    ensure => installed,
  }

  file { 'yum_config':
    ensure  => file,
    path    => $config_path,
    content => template('yum/yum.conf.erb'),
    owner   => $config_owner,
    group   => $config_group,
    mode    => $config_mode,
    require => Package['yum'],
  }

  file { '/etc/yum.repos.d':
    ensure  => directory,
    purge   => $manage_repos,
    recurse => $manage_repos,
    owner   => $repos_d_owner,
    group   => $repos_d_group,
    mode    => $repos_d_mode,
    require => File['yum_config'],
    notify  => Exec['clean_yum_cache'],
  }

  exec { 'clean_yum_cache':
    command     => 'yum clean all',
    path        => '/bin:/usr/bin:/sbin:/usr/sbin',
    refreshonly => true,
  }
}