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
5 changes: 5 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM ghcr.io/voxpupuli/voxbox:latest

# Install bash (required for VS Code server)
USER root
RUN apk add --no-cache bash
18 changes: 17 additions & 1 deletion .devcontainer/devcontainer.json

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
{
"name": "VoxBox",
"image": "ghcr.io/voxpupuli/voxbox:latest"
"build": {
"dockerfile": "Dockerfile"
},

// Forward SSH directory from host
"mounts": [
"type=bind,readonly,source=${localEnv:HOME}/.ssh,target=/root/.ssh"
],

// Use bash as default terminal
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "bash"
}
}
}
}
9 changes: 9 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ The following parameters are available in the `logrotate::conf` defined type:
* [`createolddir_mode`](#-logrotate--conf--createolddir_mode)
* [`createolddir_owner`](#-logrotate--conf--createolddir_owner)
* [`createolddir_group`](#-logrotate--conf--createolddir_group)
* [`include`](#-logrotate--conf--include)

##### <a name="-logrotate--conf--path"></a>`path`

Expand Down Expand Up @@ -760,6 +761,14 @@ Data type: `Optional[String]`



Default value: `undef`

##### <a name="-logrotate--conf--include"></a>`include`

Data type: `Optional[Variant[String,Array[String[1]]]]`



Default value: `undef`

### <a name="logrotate--cron"></a>`logrotate::cron`
Expand Down
1 change: 1 addition & 0 deletions manifests/conf.pp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
Optional[Boolean] $dateyesterday = undef,
Optional[Boolean] $delaycompress = undef,
Optional[String] $extension = undef,
Optional[Variant[String,Array[String[1]]]] $include = undef,
Optional[Boolean] $ifempty = undef,
Optional[Variant[String,Boolean]] $mail = undef,
Optional[Enum['mailfirst', 'maillast']] $mail_when = undef,
Expand Down
29 changes: 29 additions & 0 deletions spec/defines/conf_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,35 @@
}
end

# INCLUDE
context 'include' do
context '=> /etc/logrotate.d/extra' do
let(:params) { { include: '/etc/logrotate.d/extra' } }

it {
is_expected.to contain_file('/etc/logrotate.conf').
with_content(%r{^include /etc/logrotate\.d/extra$})
}
end

context '=> ["/etc/logrotate.d/extra", "/etc/logrotate.d/custom"]' do
let(:params) { { include: ['/etc/logrotate.d/extra', '/etc/logrotate.d/custom'] } }

it {
is_expected.to contain_file('/etc/logrotate.conf').
with_content(%r{^include /etc/logrotate\.d/custom$}).
with_content(%r{^include /etc/logrotate\.d/extra$})
}
end

context 'missing by default' do
it {
is_expected.to contain_file('/etc/logrotate.conf').
without_content(%r{^include /etc/logrotate\.d/extra$})
}
end
end

# MAIL / MAILFIRST / MAILLAST
context 'mail' do
context '=> test.example.com' do
Expand Down
4 changes: 4 additions & 0 deletions templates/etc/logrotate.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
opts << "#{key} #{value}" if value != nil
end

Array(@include).compact.each do |path|
opts << "include #{path}"
end

opts.sort!
-%>

Expand Down
Loading