spec/acceptance/suites/default/10_install_hirs_spec.rb
def create_local_repo(hirs_host)
    os = fact_on(hirs_host,'operatingsystemmajrelease')
    hirs_host.install_package('createrepo')
    on hirs_host, 'mkdir /usr/local/repo'
    if os.eql?('7')
      on hirs_host, 'cd /usr/local/repo; curl -L -O https://github.com/nsacyber/HIRS/releases/download/v1.0.2/HIRS_Provisioner_TPM_2_0-1.0.2-1541093721.d1bdf9.el7.x86_64.rpm'
      on hirs_host, 'cd /usr/local/repo; curl -L -O https://github.com/nsacyber/HIRS/releases/download/v1.0.2/HIRS_Provisioner_TPM_1_2-1.0.2-1541093721.d1bdf9.el7.noarch.rpm'
    else os.eql?('6')
      on hirs_host, 'cd /usr/local/repo; curl -L -O https://github.com/nsacyber/HIRS/releases/download/v1.0.2/HIRS_Provisioner_TPM_1_2-1.0.2-1541093721.d1bdf9.el6.noarch.rpm'
    end
    on hirs_host, 'cd /usr/local/repo; curl -L -O https://github.com/nsacyber/HIRS/releases/download/v1.0.2/tpm_module-1.0.2-1541093721.d1bdf9.x86_64.rpm'
    on hirs_host, 'cd /usr/local/repo; curl -L -O https://github.com/nsacyber/paccor/releases/download/v1.0.6r3/paccor-1.0.6-3.noarch.rpm'
    on hirs_host, 'createrepo /usr/local/repo'
    on hirs_host, 'printf "[local.repo]\nname=local\nbaseurl=file:///usr/local/repo\nenabled=1\ngpgcheck=0" > /etc/yum.repos.d/local.repo'
  end
#create a local repo with the necessary HIRS rpms
#this can be replaced later when the packages are signed and added to the extras repo
create a local repo with the necessary HIRS rpms
this can be replaced later when the packages are signed and added to the extras repo
create a local repo with the necessary HIRS rpms this can be replaced later when the packages are signed and added to the extras repo
def create_local_repo(hirs_host)
    os = fact_on(hirs_host,'operatingsystemmajrelease')
    hirs_host.install_package('createrepo')
    on hirs_host, 'mkdir /usr/local/repo'
    if os.eql?('7')
      on hirs_host, 'cd /usr/local/repo; curl -L -O https://github.com/nsacyber/HIRS/releases/download/v1.0.2/HIRS_Provisioner_TPM_2_0-1.0.2-1541093721.d1bdf9.el7.x86_64.rpm'
      on hirs_host, 'cd /usr/local/repo; curl -L -O https://github.com/nsacyber/HIRS/releases/download/v1.0.2/HIRS_Provisioner_TPM_1_2-1.0.2-1541093721.d1bdf9.el7.noarch.rpm'
    else os.eql?('6')
      on hirs_host, 'cd /usr/local/repo; curl -L -O https://github.com/nsacyber/HIRS/releases/download/v1.0.2/HIRS_Provisioner_TPM_1_2-1.0.2-1541093721.d1bdf9.el6.noarch.rpm'
    end
    on hirs_host, 'cd /usr/local/repo; curl -L -O https://github.com/nsacyber/HIRS/releases/download/v1.0.2/tpm_module-1.0.2-1541093721.d1bdf9.x86_64.rpm'
    on hirs_host, 'cd /usr/local/repo; curl -L -O https://github.com/nsacyber/paccor/releases/download/v1.0.6r3/paccor-1.0.6-3.noarch.rpm'
    on hirs_host, 'createrepo /usr/local/repo'
    on hirs_host, 'printf "[local.repo]\nname=local\nbaseurl=file:///usr/local/repo\nenabled=1\ngpgcheck=0" > /etc/yum.repos.d/local.repo'
  end
def create_local_repo ( hirs_host ) os = fact_on ( hirs_host , 'operatingsystemmajrelease' ) hirs_host . install_package ( 'createrepo' ) on hirs_host , 'mkdir /usr/local/repo' if os . eql? ( '7' ) on hirs_host , 'cd /usr/local/repo; curl -L -O https://github.com/nsacyber/HIRS/releases/download/v1.0.2/HIRS_Provisioner_TPM_2_0-1.0.2-1541093721.d1bdf9.el7.x86_64.rpm' on hirs_host , 'cd /usr/local/repo; curl -L -O https://github.com/nsacyber/HIRS/releases/download/v1.0.2/HIRS_Provisioner_TPM_1_2-1.0.2-1541093721.d1bdf9.el7.noarch.rpm' else os . eql? ( '6' ) on hirs_host , 'cd /usr/local/repo; curl -L -O https://github.com/nsacyber/HIRS/releases/download/v1.0.2/HIRS_Provisioner_TPM_1_2-1.0.2-1541093721.d1bdf9.el6.noarch.rpm' end on hirs_host , 'cd /usr/local/repo; curl -L -O https://github.com/nsacyber/HIRS/releases/download/v1.0.2/tpm_module-1.0.2-1541093721.d1bdf9.x86_64.rpm' on hirs_host , 'cd /usr/local/repo; curl -L -O https://github.com/nsacyber/paccor/releases/download/v1.0.6r3/paccor-1.0.6-3.noarch.rpm' on hirs_host , 'createrepo /usr/local/repo' on hirs_host , 'printf "[local.repo]\nname=local\nbaseurl=file:///usr/local/repo\nenabled=1\ngpgcheck=0" > /etc/yum.repos.d/local.repo' end
create a local repo with the necessary HIRS rpms
this can be replaced later when the packages are signed and added to the extras repo
create a local repo with the necessary HIRS rpms this can be replaced later when the packages are signed and added to the extras repo
hirs_host