<commit_before>#
# Deploy Puppet on a newly provisioned system
#
function deploy_puppet {
    ## Enable Puppet Labs repo

    # Fake a redhat-release
    [ -r /etc/redhat-release ] || echo "CentOS release 6.4 (Final)" > /etc/redhat-release

    # Get the Puppet Labs repo installed
    rpm -ivh http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-7.noarch.rpm ||
      echo "Unable to install Puppet Labs repo: exit code $?"

    # Get EPEL installed
    EPEL_RPM=http://mirror.utexas.edu/epel/6/i386/epel-release-6-8.noarch.rpm
    if ! [ -f /etc/yum.repos.d/epel.repo ]; then
      rpm -ivh ${EPEL_RPM} || /bin/true
    fi

    ## Install Puppet and dependencies

    REQUIRED_PKGS="puppet augeas curl wget s3cmd aws-cli ruby-devel rubygems gcc"

    export PATH="${PATH}:/usr/local/bin"
    PKGS="${REQUIRED_PKGS} ${extra_pkgs}"
    yum -y --enablerepo=epel --enablerepo=puppetlabs* --disableplugin=priorities update ${PKGS}

    # Install r10k
    puppet resource package r10k provider=gem ensure=present ||<commit_msg>Standardize installation of RPM repos<commit_after>#
# Deploy Puppet on a newly provisioned system
#
function deploy_puppet {
    ## Enable Puppet Labs repo

    # Fake a redhat-release
    [ -r /etc/redhat-release ] || echo "CentOS release 6.4 (Final)" > /etc/redhat-release

    # Get the Puppet Labs repo installed
    PUPPETLABS_RPM=http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-7.noarch.rpm 
    if ! [ -f /etc/yum.repos.d/puppetlabs.repo ]; then
      rpm -ivh ${PUPPETLABS_RPM} || /bin/true
    fi

    # Get EPEL installed
    EPEL_RPM=http://mirror.utexas.edu/epel/6/i386/epel-release-6-8.noarch.rpm
    if ! [ -f /etc/yum.repos.d/epel.repo ]; then
      rpm -ivh ${EPEL_RPM} || /bin/true
    fi

    ## Install Puppet and dependencies

    REQUIRED_PKGS="puppet augeas curl wget s3cmd aws-cli ruby-devel rubygems gcc"

    export PATH="${PATH}:/usr/local/bin"
    PKGS="${REQUIRED_PKGS} ${extra_pkgs}"
    yum -y --enablerepo=epel --enablerepo=puppetlabs* --disableplugin=priorities update ${PKGS}

    # Install r10k
    puppet resource package r10k provider=gem ensure=present ||
{'fraction_non_alphanumeric': 0.12849162011173185, 'fraction_numerical': 0.017690875232774673, 'mean_word_length': 3.124760076775432, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3501892', 'n_tokens_mistral': 870, 'n_tokens_neox': 807, 'n_words': 178}