Skip to content

Commit 4d5e2f8

Browse files
committed
allow changing the mysql-config-file group-ownership
1 parent 8b2591f commit 4d5e2f8

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

manifests/server/config.pp

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
path => $mysql::server::config_file,
3939
content => template('mysql/my.cnf.erb'),
4040
mode => $mysql::server::config_file_mode,
41+
group => $mysql::server::mysql_group,
4142
selinux_ignore_defaults => true,
4243
}
4344

spec/classes/mycnf_template_spec.rb

+16
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,22 @@
128128
is_expected.to contain_file('mysql-config-file').with(mode: '0600')
129129
end
130130
end
131+
132+
context 'owner group mysql' do
133+
let(:params) { { 'mysql_group' => 'mysql' } }
134+
135+
it do
136+
is_expected.to contain_file('mysql-config-file').with(group: 'mysql')
137+
end
138+
end
139+
140+
context 'owner group root' do
141+
let(:params) { { 'mysql_group' => 'root' } }
142+
143+
it do
144+
is_expected.to contain_file('mysql-config-file').with(group: 'root')
145+
end
146+
end
131147
end
132148
end
133149
end

0 commit comments

Comments
 (0)