|
14 | 14 | node_info['configure'] = true |
15 | 15 |
|
16 | 16 | node_info['content'] = |
17 | | - if node['bonusbits_base']['aws']['inside'] |
18 | | - [ |
19 | | - '-- NETWORK --', |
20 | | - "IP Address: (#{node['ipaddress']})", |
21 | | - "Hostname: (#{node['hostname']})", |
22 | | - "FQDN: (#{node['fqdn']})", |
23 | | - '', |
24 | | - '-- AWS --', |
25 | | - "Instance ID: (#{node['ec2']['instance_id']})", |
26 | | - "Region: (#{node['ec2']['placement_availability_zone'].slice(0..-2)})", |
27 | | - "Availability Zone: (#{node['ec2']['placement_availability_zone']})", |
28 | | - "AMI ID: (#{node['ec2']['ami_id']})", |
29 | | - '', |
30 | | - '-- PLATFORM --', |
31 | | - "OS: (#{node['os']})", |
32 | | - "Platform: (#{node['platform']})", |
33 | | - "Platform Version: (#{node['platform_version']})", |
34 | | - "Platform Family: (#{node['platform_family']})", |
35 | | - '', |
36 | | - '-- HARDWARE --', |
37 | | - "CPU Count: (#{node['cpu']['total']})", |
38 | | - "Memory: (#{memory_in_megabytes}MB)", |
39 | | - '', |
40 | | - '-- CHEF --', |
41 | | - "Detected Environment: (#{node.run_state['detected_environment']})", |
42 | | - "Chef Environment: (#{node.environment})", |
43 | | - "Chef Roles: (#{node['roles']})", |
44 | | - "Chef Recipes: (#{node['recipes']})" |
45 | | - ] |
46 | | - else |
47 | | - [ |
48 | | - '-- NETWORK --', |
49 | | - "IP Address: (#{node['ipaddress']})", |
50 | | - "Hostname: (#{node['hostname']})", |
51 | | - "FQDN: (#{node['fqdn']})", |
52 | | - '', |
53 | | - '-- PLATFORM --', |
54 | | - "OS: (#{node['os']})", |
55 | | - "Platform: (#{node['platform']})", |
56 | | - "Platform Version: (#{node['platform_version']})", |
57 | | - "Platform Family: (#{node['platform_family']})", |
58 | | - '', |
59 | | - '-- HARDWARE --', |
60 | | - "CPU Count: (#{node['cpu']['total']})", |
61 | | - "Memory: (#{memory_in_megabytes}MB)", |
62 | | - '', |
63 | | - '-- CHEF --', |
64 | | - "Detected Environment: (#{node.run_state['detected_environment']})", |
65 | | - "Chef Environment: (#{node.environment})", |
66 | | - "Chef Roles: (#{node['roles']})", |
67 | | - "Chef Recipes: (#{node['recipes']})" |
68 | | - ] |
69 | | - end |
| 17 | + [ |
| 18 | + '-- DEPLOYMENT --', |
| 19 | + "Environment: (#{run_state['detected_environment']})", |
| 20 | + "Type: (#{node['bonusbits_base']['deployment_type']})", |
| 21 | + "Location: (#{node['bonusbits_base']['deployment_location']})", |
| 22 | + "Method : (#{node['bonusbits_base']['deployment_method']})", |
| 23 | + '', |
| 24 | + '-- NETWORK --', |
| 25 | + "IP Address: (#{node['ipaddress']})", |
| 26 | + "Hostname: (#{node['hostname']})", |
| 27 | + "FQDN: (#{node['fqdn']})", |
| 28 | + '', |
| 29 | + '-- PLATFORM --', |
| 30 | + "OS: (#{node['os']})", |
| 31 | + "Platform: (#{node['platform']})", |
| 32 | + "Platform Version: (#{node['platform_version']})", |
| 33 | + "Platform Family: (#{node['platform_family']})", |
| 34 | + '', |
| 35 | + '-- HARDWARE --', |
| 36 | + "CPU Count: (#{node['cpu']['total']})", |
| 37 | + "Memory: (#{memory_in_megabytes}MB)", |
| 38 | + '', |
| 39 | + '-- CHEF --', |
| 40 | + "Node Name: (#{node.name})", |
| 41 | + "Environment: (#{node.environment})", |
| 42 | + "Roles: (#{node['roles']})", |
| 43 | + "Recipes: (#{node['recipes']})" |
| 44 | + ] |
| 45 | + |
| 46 | + if node['bonusbits_base']['aws']['inside'] |
| 47 | + node_info['content'].concat [ |
| 48 | + '', |
| 49 | + '-- AWS --', |
| 50 | + "Instance ID: (#{node['ec2']['instance_id']})", |
| 51 | + "Region: (#{node['ec2']['placement_availability_zone'].slice(0..-2)})", |
| 52 | + "Availability Zone: (#{node['ec2']['placement_availability_zone']})", |
| 53 | + "AMI ID: (#{node['ec2']['ami_id']})" |
| 54 | + ] |
| 55 | + end |
70 | 56 | end |
71 | 57 |
|
72 | 58 | # Debug |
|
0 commit comments