<commit_before>module VagrantPlugins
  module Docker
    module Cap
      module Redhat
        module DockerInstall
          def self.docker_install(machine, version)
            machine.communicate.tap do |comm|
              comm.sudo("rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm")
              comm.sudo("yum -y upgrade")
              comm.sudo("yum -y install docker-io")
            end
          end
        end
      end
    end
  end
end<commit_msg>provisioners/docker: Check if epel-release is installed on RedHat-ian guests before attempting installation [GH-2649]<commit_after>module VagrantPlugins
  module Docker
    module Cap
      module Redhat
        module DockerInstall
          def self.docker_install(machine, version)
            machine.communicate.tap do |comm|
              if ! comm.test("rpm -qa | grep epel-release")
                comm.sudo("rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm")
              end
              comm.sudo("yum -y upgrade")
              comm.sudo("yum -y install docker-io")
            end
          end
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08952702702702703, 'fraction_numerical': 0.015202702702702704, 'mean_word_length': 1.8080568720379147, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3629333', 'n_tokens_mistral': 385, 'n_tokens_neox': 353, 'n_words': 83}