Skip to content

Commit aa0c39c

Browse files
author
Warren Bain
committed
Remove fqdn from node name when deleting server
* Server create doesn't add the fqdn to the chef node name when bootstrapping; therefore, the server delete should similarly avoid the use of an fqdn when offering to remove the node and client.
1 parent 5008bd2 commit aa0c39c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/chef/knife/cs_server_delete.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ def run
6363
ui.msg("Deleted server #{hostname}")
6464

6565
# delete chef client and node
66-
node_name = connection.get_server_fqdn server
67-
delete_chef = confirm_action("Do you want to delete the chef node and client '#{node_name}")
66+
node_name = hostname # connection.get_server_fqdn server ## server create doesn't add fqdn!
67+
delete_chef = confirm_action("Do you want to delete the chef node and client '#{node_name}'")
6868
if delete_chef
6969
delete_node node_name
7070
delete_client node_name
@@ -76,7 +76,7 @@ def run
7676

7777
def show_object_details(s, connection, rules)
7878
return if locate_config_value(:yes)
79-
79+
8080
object_fields = []
8181
object_fields << ui.color("Name:", :cyan)
8282
object_fields << s['name'].to_s

0 commit comments

Comments
 (0)