Root password given only on returned object
[p5sagit/Oyster.git] / lib / Oyster / Provision / Rackspace.pm
index 8d0ca3f..10f92fd 100644 (file)
@@ -58,7 +58,8 @@ sub create {
            },
       ],
    );
-   $server->create_server;
+   my $newserver = $server->create_server;
+   warn "Server root password: ", $newserver->adminpass, "\n";
 
    do {
       $|=1;
@@ -71,8 +72,7 @@ sub create {
       }
    } while ( ( $server->status // '' ) ne 'ACTIVE' );
 
-   warn "Server public IP is:  ", ($server->public_address)[0], "\n";
-   warn "Server root password: ", $server->adminpass, "\n";
+   warn "Server public IP is: @{$server->public_address}\n";
 
    # Connect to server and execute installation routines?
    # Use Net::SSH?