Skip to content

Instantly share code, notes, and snippets.

@samsulmaarif
Created March 30, 2019 05:00
Show Gist options
  • Save samsulmaarif/2aa08d3b5a498d4993c91862968f2966 to your computer and use it in GitHub Desktop.
Save samsulmaarif/2aa08d3b5a498d4993c91862968f2966 to your computer and use it in GitHub Desktop.
class quiznginx{
class{ 'nginx':
repo_manage => true,
repo_branch => 'stable',
package_ensure => 'latest',
package_name => 'nginx',
package_extras => [],
service_manage => true,
service_enable => true,
service_ensure => 'running',
service_name => 'nginx',
install_location => '/etc/nginx',
firewall_manage => false,
enabled_sites_manage => false,
configs => hiera_hash('nginx::configs', {}),
vhosts => hiera_hash('nginx::vhosts', {}),
}
#nginx::resource::vhost { 'localhost':
# enabled => true,
# www_root => '/usr/share/nginx/html',
#}
package { 'unzip':
ensure => 'installed'
}
file { "/usr/share/nginx/html/infinite_scroll.zip" :
source => "puppet:///modules/quiznginx/infinite_scroll.zip",
notify => Exec["extract_test_file"],
}
exec { "extract_test_file":
refreshonly => true,
command => "/usr/bin/unzip /usr/share/nginx/html/infinite_scroll.zip -d /usr/share/nginx/html",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment