From 250f8a9daf8f0253acb6155d0c406c4d5a871bc5 Mon Sep 17 00:00:00 2001 From: Phil Dibowitz Date: Fri, 1 Nov 2019 14:00:36 -0700 Subject: [PATCH] debug --- cookbooks/fb_ssh/recipes/default.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/cookbooks/fb_ssh/recipes/default.rb b/cookbooks/fb_ssh/recipes/default.rb index 91e4ba0a..9db5625d 100644 --- a/cookbooks/fb_ssh/recipes/default.rb +++ b/cookbooks/fb_ssh/recipes/default.rb @@ -56,6 +56,24 @@ end end +template '/tmp/sshd_config' do + source 'ssh_config.erb' + owner 'root' + group 'root' + mode '0644' + variables({ :type => 'sshd_config' }) +end + +ruby_block 'debug' do + block do + puts ::File.read('/tmp/sshd_config') + s = Mixlib::ShellOut.new('/usr/sbin/sshd -t -f /tmp/sshd_config') + s.run_command + puts s.stdout + puts s.stderr + end +end + template '/etc/ssh/sshd_config' do source 'ssh_config.erb' owner 'root'