Skip to content

Commit

Permalink
Automatically include mod_expires if required via vhost directories
Browse files Browse the repository at this point in the history
Similar to other options passed in the vhost's directory this now
inspects the directories entry and if expires_* is passed, mod_expires
is included.
  • Loading branch information
ekohl committed Aug 16, 2024
1 parent 6d218cf commit 6e42fb2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions manifests/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2362,6 +2362,10 @@
if 'setenv' in $directory {
include apache::mod::env
}

if 'expires_active' in $directory or 'expires_default' in $directory or 'expires_by_type' in $directory {
include apache::mod::expires
}
}

# Template uses:
Expand Down
1 change: 1 addition & 0 deletions spec/defines/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@
it { is_expected.to contain_class('apache::mod::authz_groupfile') }
it { is_expected.to contain_class('apache::mod::auth_gssapi') }
it { is_expected.to contain_class('apache::mod::env') }
it { is_expected.to contain_class('apache::mod::expires') }

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

apache::vhost os-independent items on ubuntu-22.04-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

apache::vhost os-independent items on centos-7-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

apache::vhost os-independent items on scientific-7-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

apache::vhost os-independent items on redhat-7-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

apache::vhost os-independent items on oraclelinux-7-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

apache::vhost os-independent items on redhat-8-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

apache::vhost os-independent items on redhat-9-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

apache::vhost os-independent items on sles-15-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

apache::vhost os-independent items on sles-12-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

apache::vhost os-independent items on debian-10-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

apache::vhost os-independent items on almalinux-8-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

apache::vhost os-independent items on centos-7-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

apache::vhost os-independent items on centos-8-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

apache::vhost os-independent items on debian-10-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

apache::vhost os-independent items on debian-11-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

apache::vhost os-independent items on oraclelinux-7-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

apache::vhost os-independent items on redhat-7-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

apache::vhost os-independent items on redhat-8-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

apache::vhost os-independent items on redhat-9-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]

Check failure on line 596 in spec/defines/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

apache::vhost os-independent items on rocky-8-x86_64 set everything! is expected to contain Class[apache::mod::expires] Failure/Error: it { is_expected.to contain_class('apache::mod::expires') } expected that the catalogue would contain Class[apache::mod::expires]
it { is_expected.to contain_class('apache::mod::filter') }
it { is_expected.to contain_class('apache::mod::headers') }
it { is_expected.to contain_class('apache::mod::mime') }
Expand Down

0 comments on commit 6e42fb2

Please sign in to comment.