diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d04d974 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.bundle +Gemfile.lock diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 05d37a9..417fdbc 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -1,5 +1,7 @@ require 'spec_helper' describe 'rsnapshot' do + let(:facts) {{ :osfamily => 'RedHat' }} + it { should contain_class('rsnapshot::params') } it { is_expected.to compile } end diff --git a/templates/mysql.sh.erb b/templates/mysql.sh.erb index 210e51f..000212b 100644 --- a/templates/mysql.sh.erb +++ b/templates/mysql.sh.erb @@ -16,7 +16,7 @@ dbs=( ) <%end-%> for db in "${dbs[@]}"; do -<% if (@dbbackup_user == 'root' && @dbbackup_password = '' )-%> +<% if (@dbbackup_user == 'root' && @dbbackup_password == '' )-%> ssh -l <%=@backup_user-%> "$host" "<%=@dumper-%> <%=@dump_flags-%> ${db}" > "$db".sql <%else-%> ssh -l <%=@backup_user-%> "$host" "<%=@dumper-%> --user=<%=@dbbackup_user-%> --password='<%=@dbbackup_password-%>' <%=@dump_flags-%> ${db}" > "$db".sql