Skip to content

Commit e95d51b

Browse files
committed
Use deferrable_epp for .my.cnf to ensure root password resolve correctly
1 parent d230e80 commit e95d51b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

manifests/server/root_password.pp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@
3737
}
3838
}
3939

40-
$parameters = {
41-
'root_password_set' => $root_password_set,
42-
'root_password' => $root_password,
43-
'options' => $options,
44-
}
45-
4640
if $mysql::server::create_root_my_cnf and $root_password_set {
47-
# TODO: use EPP instead of ERB, as EPP can handle Data of Type Sensitive without further ado
4841
file { "${facts['root_home']}/.my.cnf":
49-
content => epp('mysql/my.cnf.pass.epp',$parameters),
42+
content => Sensitive(stdlib::deferrable_epp(
43+
'mysql/my.cnf.pass.epp',
44+
{
45+
'root_password_set' => $root_password_set,
46+
'root_password' => $root_password,
47+
'options' => $options,
48+
}
49+
)),
5050
owner => 'root',
5151
mode => '0600',
5252
}

0 commit comments

Comments
 (0)