From d51abd21d1cd561c217743af3cece9b4427fcaa2 Mon Sep 17 00:00:00 2001 From: Jack Ivanov Date: Thu, 15 Dec 2016 00:21:44 +0300 Subject: [PATCH] some fixes --- algo | 17 ----------------- roles/cloud-digitalocean/tasks/main.yml | 2 +- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/algo b/algo index 8a0fe6d..b75317a 100755 --- a/algo +++ b/algo @@ -99,10 +99,6 @@ Enter your azure subscription_id (https://docs.ansible.com/ansible/guide_azure.h You can skip this step if you want to use your defaults credentials from ~/.azure/credentials [...]: " -rs azure_subscription_id - read -p " - -Enter the local path to your SSH public key (~/.ssh/id_rsa.pub): " -r ssh_public_key - ssh_public_key=${ssh_public_key:-$HOME/.ssh/id_rsa.pub} read -p " Name the vpn server: @@ -155,10 +151,6 @@ digitalocean () { Enter your API token (https://cloud.digitalocean.com/settings/api/tokens): : " -rs do_access_token - read -p " -Enter an existing SSH key name (https://cloud.digitalocean.com/settings/security): -: " -r do_ssh_name - read -p " Name the vpn server: [algo.local]: " -r do_server_name @@ -212,11 +204,6 @@ Enter your aws_secret_key (http://docs.aws.amazon.com/general/latest/gr/managing Note: Make sure to use either your root key (recommended) or an IAM user with an acceptable policy attached [ABCD...]: " -rs aws_secret_key - - read -p " -Enter the local path to your SSH public key (~/.ssh/id_rsa.pub): " -r ssh_public_key - ssh_public_key=${ssh_public_key:-$HOME/.ssh/id_rsa.pub} - read -p " Name the vpn server: [algo]: " -r aws_server_name @@ -266,10 +253,6 @@ gce () { Enter the local path to your credentials JSON file (https://support.google.com/cloud/answer/6158849?hl=en&ref_topic=6262490#serviceaccounts): : " -r credentials_file - read -p " -Enter the local path to your SSH public key (~/.ssh/id_rsa.pub): " -r ssh_public_key - ssh_public_key=${ssh_public_key:-$HOME/.ssh/id_rsa.pub} - read -p " Name the vpn server: [algo]: " -r server_name diff --git a/roles/cloud-digitalocean/tasks/main.yml b/roles/cloud-digitalocean/tasks/main.yml index fe50698..55e7850 100644 --- a/roles/cloud-digitalocean/tasks/main.yml +++ b/roles/cloud-digitalocean/tasks/main.yml @@ -39,7 +39,7 @@ digital_ocean: state: present command: ssh - name: "{{ SSH_keys.comment }}" + ssh_pub_key: "{{ public_key }}" api_token: "{{ do_access_token }}" register: do_ssh_key