Skip to content
Open
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
Binary file not shown.
12 changes: 12 additions & 0 deletions modules/speedtestv2/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,22 @@
ensure => directory,
recurse => true,
purge => true,
ignore => ['downloading'],
owner => 'root',
group => 'root',
mode => '0644',
source => 'puppet:///modules/speedtestv2/Speed-Test-main/',
require => Package['nginx'], #Make sure that apt install has been run
}

# Generate the random download file used by OpenSpeedTest. The file is only
# created once and is ignored by the managed web root so Puppet doesn't remove
# it on subsequent runs.
exec { 'generate-speedtest-download-file':
command => '/bin/dd if=/dev/urandom of=/usr/share/nginx/html/downloading bs=1M count=30',
creates => '/usr/share/nginx/html/downloading',
path => ['/bin', '/usr/bin'],
require => File['/usr/share/nginx/html'],
}

}
Loading