Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy fastly-purge scripts everywhere where needed #2166

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions puppet/modules/fastly_purge/manifests/init.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# @summary scripts to manage fastly CDN purging
#
class fastly_purge {
file { '/usr/local/bin/fastly-purge':
ensure => file,
owner => 'root',
group => 'root',
mode => '0755',
content => file("${module_name}/fastly-purge.sh"),
}

file { '/usr/local/bin/fastly-purge-find':
ensure => file,
owner => 'root',
group => 'root',
mode => '0755',
content => file("${module_name}/fastly-purge-find.sh"),
}
}
2 changes: 2 additions & 0 deletions puppet/modules/jenkins_node/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
Boolean $unittests = $facts['os']['family'] == 'RedHat',
Boolean $packaging = true,
) {
include fastly_purge

if $facts['os']['family'] == 'RedHat' {
$java_package = 'java-11-openjdk-headless'

Expand Down
16 changes: 0 additions & 16 deletions puppet/modules/web/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,6 @@
source => 'puppet:///modules/web/filter_apache_stats.sh',
}

file { '/usr/local/bin/fastly-purge':
ensure => file,
owner => 'root',
group => 'root',
mode => '0755',
content => file('web/fastly-purge.sh'),
}

file { '/usr/local/bin/fastly-purge-find':
ensure => file,
owner => 'root',
group => 'root',
mode => '0755',
content => file('web/fastly-purge-find.sh'),
}

# daily at 4am, should be fairly quiet on the server
cron { 'filter_apache_stats':
command => '/usr/bin/nice -19 /usr/local/bin/filter_apache_stats',
Expand Down
2 changes: 2 additions & 0 deletions puppet/modules/web/manifests/vhost/deb.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
String $user = 'freight',
Stdlib::Absolutepath $home = "/home/${user}",
) {
include fastly_purge

# Manual step: each user needs the GPG key in it's keyring
freight::user { 'main':
user => $user,
Expand Down
2 changes: 2 additions & 0 deletions puppet/modules/web/manifests/vhost/rpm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
Stdlib::Absolutepath $rpm_staging_directory = '/var/www/vhosts/stagingrpm/htdocs/',
String $user = 'rpmrepo',
) {
include fastly_purge

$rpm_directory_config = [
{
path => $rpm_directory,
Expand Down
2 changes: 2 additions & 0 deletions puppet/modules/web/manifests/vhost/yum.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
Stdlib::Absolutepath $yum_directory = '/var/www/vhosts/yum/htdocs',
String $user = 'yumrepo',
) {
include fastly_purge

$yum_directory_config = [
{
path => $yum_directory,
Expand Down