diff --git a/.fixtures.yml b/.fixtures.yml index 2d008c5..3b704f2 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,16 +1,16 @@ fixtures: repositories: stdlib: repo: "https://github.com/puppetlabs/puppetlabs-stdlib.git" ref: "4.17.1" apt: repo: "https://github.com/puppetlabs/puppetlabs-apt.git" ref: "2.4.0" epel: repo: "https://github.com/stahnma/puppet-module-epel.git" ref: "1.2.2" selinux: repo: "https://github.com/voxpupuli/puppet-selinux.git" - ref: "v0.8.0" + ref: "v1.5.2" symlinks: varnish: "#{source_dir}" diff --git a/manifests/config.pp b/manifests/config.pp index 9ea5481..b34515a 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,52 +1,52 @@ # == Class varnish::config # # This class is called from varnish # class varnish::config { if versioncmp("${::varnish::version_major}.${::varnish::version_minor}",'4.1') >= 0 { $jail_opt = '-j unix,user=varnish,ccgroup=varnish' } else { $jail_opt = '-u varnish -g varnish' } # Deploy Varnish 4+ SELinux hack on RHEL6 if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '6' and $::varnish::version_major != '3' { if $::selinux_current_mode == 'enforcing' { ::selinux::module { 'varnishpol': - ensure => present, - source => 'puppet:///modules/varnish/varnishpol.te', - before => Service[$::varnish::service_name], - notify => Service[$::varnish::service_name], + ensure => present, + source_te => 'puppet:///modules/varnish/varnishpol.te', + before => Service[$::varnish::service_name], + notify => Service[$::varnish::service_name], } } } file { $::varnish::params::sysconfig: owner => 'root', group => 'root', mode => '0644', content => template('varnish/sysconfig.erb'), } if $::varnish::params::service_provider == 'systemd' { file { '/etc/systemd/system/varnish.service': ensure => file, owner => 'root', group => 'root', mode => '0644', content => template('varnish/varnish.service.erb'), notify => Exec['varnish_systemctl_daemon_reload'], } exec { 'varnish_systemctl_daemon_reload': command => '/bin/systemctl daemon-reload', refreshonly => true, require => File['/etc/systemd/system/varnish.service'], notify => Service[$::varnish::service_name], } } } diff --git a/metadata.json b/metadata.json index 8e31ef2..1bc8428 100644 --- a/metadata.json +++ b/metadata.json @@ -1,45 +1,45 @@ { "name" : "claranet-varnish", "version" : "5.0.0", "source" : "https://github.com/claranet/puppet-varnish", "author" : "Claranet", "license" : "Apache-2.0", "summary" : "Install and configure Varnish Cache", "description" : "Install and configure Varnish Cache", "project_page" : "https://github.com/claranet/puppet-varnish", "issues_url" : "https://github.com/claranet/puppet-varnish/issues", "tags" : [ "varnish", "cache", "http" ], "operatingsystem_support": [ { "operatingsystem": "RedHat", "operatingsystemrelease": [ "6", "7" ] }, { "operatingsystem": "CentOS", "operatingsystemrelease": [ "6", "7" ] }, { "operatingsystem": "OracleLinux", "operatingsystemrelease": [ "6", "7" ] }, { "operatingsystem": "Scientific", "operatingsystemrelease": [ "6", "7" ] }, { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ "14.04", "16.04" ] }, { "operatingsystem": "Debian", "operatingsystemrelease": [ "7", "8" ] } ], "requirements": [ { "name": "puppet", "version_requirement": ">= 4.7.1 < 6.0.0" } ], "dependencies": [ { "name": "stahnma/epel", "version_requirement": ">= 1.2.0 < 2.0.0" }, - { "name": "puppet/selinux", "version_requirement": ">= 0.8.0 < 1.0.0" }, + { "name": "puppet/selinux", "version_requirement": ">= 1.0.0 < 2.0.0" }, { "name": "puppetlabs/apt", "version_requirement": ">= 2.0.0 < 3.0.0" }, - { "name": "puppetlabs/stdlib", "version_requirement": ">=1.0.0 < 5.0.0" } + { "name": "puppetlabs/stdlib", "version_requirement": ">=4.6.0 < 6.0.0" } ] }