Module: Formatron::Generators::Bootstrap::SSL
- Defined in:
- lib/formatron/generators/bootstrap/ssl.rb
Overview
generates placeholder SSL stuff
Class Method Summary collapse
Class Method Details
.write(directory, target) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/formatron/generators/bootstrap/ssl.rb', line 20 def self.write(directory, target) target_directory = File.join( directory, 'config', target.to_s, 'chef_server', 'ssl' ) FileUtils.mkdir_p target_directory write_key target_directory write_cert target_directory end |
.write_cert(directory) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/formatron/generators/bootstrap/ssl.rb', line 13 def self.write_cert(directory) placeholder_cert = File.join directory, 'cert' File.write placeholder_cert, <<-EOH.gsub(/^ {12}/, '') Remember to generate an SSL certificate EOH end |
.write_key(directory) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/formatron/generators/bootstrap/ssl.rb', line 6 def self.write_key(directory) placeholder_key = File.join directory, 'key' File.write placeholder_key, <<-EOH.gsub(/^ {12}/, '') Remember to generate an SSL key EOH end |