Skip to content

Commit

Permalink
Merge pull request #1056 from puppetlabs/gh-1055-hardcoded_cache_path
Browse files Browse the repository at this point in the history
(GH-1055) Fix hardcoded cache path
  • Loading branch information
LukasAud authored Aug 31, 2022
2 parents dad7d73 + 58265f3 commit 65e0324
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions manifests/ppa.pp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@
$trusted_gpg_d_filename = "${dash_filename_no_specialchars}.gpg"
}

# This is the location of our main exec script
$script_path = "/opt/puppetlabs/puppet/cache/add-apt-repository-${dash_filename_no_specialchars}-${release}.sh"
# This is the location of our main exec script.
$cache_path = $facts['puppet_vardir']
$script_path = "${cache_path}/add-apt-repository-${dash_filename_no_specialchars}-${release}.sh"

if $ensure == 'present' {
if $package_manage {
Expand Down
9 changes: 9 additions & 0 deletions spec/defines/ppa_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def ppa_exec_params(user, repo, distro = 'trusty', environment = [])
id: 'Ubuntu',
},
},
puppet_vardir: '/opt/puppetlabs/puppet/cache'
}
end

Expand Down Expand Up @@ -58,6 +59,7 @@ def ppa_exec_params(user, repo, distro = 'trusty', environment = [])
id: 'Ubuntu',
},
},
puppet_vardir: '/opt/puppetlabs/puppet/cache',
}
end

Expand Down Expand Up @@ -96,6 +98,7 @@ def ppa_exec_params(user, repo, distro = 'trusty', environment = [])
id: 'Ubuntu',
},
},
puppet_vardir: '/opt/puppetlabs/puppet/cache',
}
end

Expand Down Expand Up @@ -128,6 +131,7 @@ def ppa_exec_params(user, repo, distro = 'trusty', environment = [])
id: 'Ubuntu',
},
},
puppet_vardir: '/opt/puppetlabs/puppet/cache',
}
end

Expand Down Expand Up @@ -168,6 +172,7 @@ def ppa_exec_params(user, repo, distro = 'trusty', environment = [])
id: 'Ubuntu',
},
},
puppet_vardir: '/opt/puppetlabs/puppet/cache',
}
end

Expand Down Expand Up @@ -210,6 +215,7 @@ def ppa_exec_params(user, repo, distro = 'trusty', environment = [])
id: 'Ubuntu',
},
},
puppet_vardir: '/opt/puppetlabs/puppet/cache',
}
end

Expand Down Expand Up @@ -250,6 +256,7 @@ def ppa_exec_params(user, repo, distro = 'trusty', environment = [])
id: 'Ubuntu',
},
},
puppet_vardir: '/opt/puppetlabs/puppet/cache',
}
end

Expand Down Expand Up @@ -290,6 +297,7 @@ def ppa_exec_params(user, repo, distro = 'trusty', environment = [])
id: 'Ubuntu',
},
},
puppet_vardir: '/opt/puppetlabs/puppet/cache',
}
end

Expand Down Expand Up @@ -328,6 +336,7 @@ def ppa_exec_params(user, repo, distro = 'trusty', environment = [])
id: 'Ubuntu',
},
},
puppet_vardir: '/opt/puppetlabs/puppet/cache',
}
end

Expand Down

0 comments on commit 65e0324

Please sign in to comment.