|
2 | 2 | # Cookbook Name:: cloudstack |
3 | 3 | # Provider:: setup_management |
4 | 4 | # Author:: Pierre-Luc Dion (<[email protected]>) |
5 | | -# Copyright 2015, CloudOps, Inc. |
| 5 | +# Copyright 2017, CloudOps, Inc. |
6 | 6 | # |
7 | 7 | # Licensed under the Apache License, Version 2.0 (the "License"); |
8 | 8 | # you may not use this file except in compliance with the License. |
|
16 | 16 | # See the License for the specific language governing permissions and |
17 | 17 | # limitations under the License. |
18 | 18 | # |
19 | | -# execute default cloudstack configuration script |
| 19 | +# execute default cloudstack configuration script |
20 | 20 | ############################################################################### |
21 | 21 |
|
22 | | -use_inline_resources |
| 22 | +# use_inline_resources |
23 | 23 |
|
24 | | -action :run do |
| 24 | +# # Support whyrun |
| 25 | +# def whyrun_supported? |
| 26 | +# false |
| 27 | +# end |
25 | 28 |
|
26 | | - bash "cloudstack-setup-management" do |
27 | | - code "/usr/bin/cloudstack-setup-management" |
28 | | - not_if { ::File.exists?("/etc/cloudstack/management/tomcat6.conf") || ::File.exists?("/etc/cloudstack/management/server.xml")} |
29 | | - end |
| 29 | +# action :run do |
| 30 | +# load_current_resource |
30 | 31 |
|
31 | | -end |
| 32 | +# if !@current_resource.exists |
| 33 | +# params = '' |
| 34 | +# # params += ' --tomcat7' if @current_resource.tomcat7 |
| 35 | +# # params += ' --https' if @current_resource.https |
| 36 | +# # params += ' --no-start' if @current_resource.nostart |
| 37 | + |
| 38 | +# bash "cloudstack-setup-management" do |
| 39 | +# code "/usr/bin/cloudstack-setup-management #{params}" |
| 40 | +# not_if { ::File.exists?("/etc/cloudstack/management/tomcat6.conf") || ::File.exists?("/etc/cloudstack/management/server.xml")} |
| 41 | +# end |
| 42 | +# end |
| 43 | + |
| 44 | +# end |
| 45 | + |
| 46 | +# def load_current_resource |
| 47 | +# @current_resource = Chef::Resource::CloudstackSetupDatabase.new(@new_resource.name) |
| 48 | +# @current_resource.name(@new_resource.name) |
| 49 | +# @current_resource.tomcat7(@new_resource.tomcat7) |
| 50 | +# @current_resource.https(@new_resource.https) |
| 51 | +# @current_resource.nostart(@new_resource.nostart) |
| 52 | + |
| 53 | +# # use tomcat7 if CentOS 7 |
| 54 | +# # @current_resource.tomcat = true if node['platform'] == 'centos' && node['platform_version'] == '7' |
| 55 | + |
| 56 | +# @current_resource.exists = ::File.exists?("/etc/cloudstack/management/server.xml") |
| 57 | +# end |
0 commit comments