Skip to content

Commit 71c2f33

Browse files
committed
(maint) address some puppet-lint long lines
1 parent 830559b commit 71c2f33

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

manifests/backup/xtrabackup.pp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,13 @@
177177

178178
# TODO: use EPP instead of ERB, as EPP can handle Data of Type Sensitive without further ado
179179
$parameters = {
180-
'innobackupex_args' => mysql::innobackupex_args($backupuser, $backupcompress, $backuppassword_unsensitive, $backupdatabases, $optional_args),
180+
'innobackupex_args' => mysql::innobackupex_args(
181+
$backupuser,
182+
$backupcompress,
183+
$backuppassword_unsensitive,
184+
$backupdatabases,
185+
$optional_args
186+
),
181187
'backuprotate' => $backuprotate,
182188
'backupdir' => $backupdir,
183189
'backupmethod' => $backupmethod,

manifests/params.pp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,10 @@
185185
$ssl_cert = '/etc/mysql/server-cert.pem'
186186
$ssl_key = '/etc/mysql/server-key.pem'
187187
$tmpdir = '/tmp'
188-
$managed_dirs = ['tmpdir','basedir','datadir','innodb_data_home_dir','innodb_log_group_home_dir','innodb_undo_directory','innodb_tmpdir']
188+
$managed_dirs = [
189+
'tmpdir','basedir','datadir','innodb_data_home_dir',
190+
'innodb_log_group_home_dir','innodb_undo_directory','innodb_tmpdir',
191+
]
189192

190193
# mysql::bindings
191194
if ($facts['os']['name'] == 'Debian' and versioncmp($facts['os']['release']['full'], '10') >= 0) or

manifests/server/root_password.pp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@
2323
# below exec will remove this default password. If the user has supplied a root
2424
# password it will be set further down with the mysql_user resource.
2525
exec { 'remove install pass':
26-
command => "mysqladmin -u root --password=\$(grep -o '[^ ]\\+\$' /.mysql_secret) password && (rm -f /.mysql_secret; exit 0) || (rm -f /.mysql_secret; exit 1)",
26+
command => @(EOD)
27+
mysqladmin -u root --password=$(grep -o '[^ ]+$' /.mysql_secret) password && \
28+
(rm -f /.mysql_secret; exit 0) || \
29+
(rm -f /.mysql_secret; exit 1)
30+
| EOD
31+
,
2732
onlyif => [['test', '-f' ,'/.mysql_secret']],
2833
path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin',
2934
}

spec/classes/mysql_server_spec.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,11 @@
180180
describe 'when defaults' do
181181
it {
182182
expect(subject).to contain_exec('remove install pass').with(
183-
command: "mysqladmin -u root --password=$(grep -o '[^ ]\\+$' /.mysql_secret) password && (rm -f /.mysql_secret; exit 0) || (rm -f /.mysql_secret; exit 1)",
183+
command: <<-'CMD'.gsub(%r{^\s+}, ''),
184+
mysqladmin -u root --password=$(grep -o '[^ ]+$' /.mysql_secret) password && \
185+
(rm -f /.mysql_secret; exit 0) || \
186+
(rm -f /.mysql_secret; exit 1)
187+
CMD
184188
onlyif: [['test', '-f', '/.mysql_secret']],
185189
path: '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin',
186190
)

0 commit comments

Comments
 (0)