Commit 1c114dad authored by Florian Kempenich's avatar Florian Kempenich
Browse files

Fix metrics installation

parent c9dbf874
......@@ -155,25 +155,35 @@
# If using `remote_user` at the same level as `hosts`, it would
# not override the `ansible_user` variable from the inventory
ansible_user: "{{ user_to_create_username }}"
ansible_become_pass: "{{ user_to_create_default_password }}"
tasks:
# TODO: Fix Glances installation (or remove, but be sure to re-locate the daemon part!!)
# TODO: Fix Glances installation (or remove, but be sure to re-locate the daemon part!!)
# TODO: Fix Glances installation (or remove, but be sure to re-locate the daemon part!!)
# - name: "Install Glances Webserver as a service"
# include_role:
# name: glances
- name: "Enable advanced metrics on DigitalOcean"
shell: "curl -sSL https://agent.digitalocean.com/install.sh | sh"
- debug:
msg:
- "Droplet '{{ droplet_name }}' succesfuly created"
- ""
- "IP = {{ ansible_default_ipv4.address }}"
- "User = {{ user_to_create_username }}"
- "Password = {{ user_to_create_password }}"
- ""
- "You can now ssh to the droplet with `ssh {{ droplet_name }}`"
- "Don't forget to change the default password!"
\ No newline at end of file
- name: Try Block
block:
# TODO: Fix Glances installation (or remove, but be sure to re-locate the daemon part!!)
# TODO: Fix Glances installation (or remove, but be sure to re-locate the daemon part!!)
# TODO: Fix Glances installation (or remove, but be sure to re-locate the daemon part!!)
# - name: "Install Glances Webserver as a service"
# include_role:
# name: glances
- name: "Enable advanced metrics on DigitalOcean"
shell: "curl -sSL https://agent.digitalocean.com/install.sh | sh"
become: yes
- debug:
msg:
- "Droplet '{{ droplet_name }}' succesfuly created"
- ""
- "IP = {{ ansible_default_ipv4.address }}"
- "User = {{ user_to_create_username }}"
- "Password = {{ user_to_create_default_password }}"
- ""
- "You can now ssh to the droplet with `ssh {{ droplet_name }}`"
- "Don't forget to change the default password!"
rescue:
- debug:
msg:
- "Problem during setup!"
- "Is it the first time this is ran?"
- "If not, did you change the sudo password for the default user?"
\ No newline at end of file
......@@ -35,7 +35,7 @@ def _install_requirements():
def _set_configuration_if_needed():
if not _is_configured():
ssh_key_path, ssh_key_name, do_token_path, user_username, user_default_pass = _ask_for_configuration()
ssh_key_path, ssh_key_name, do_token_path, user_username, user_default_pass = _ask_for_configuration()
_create_configuration_file(ssh_key_path, ssh_key_name, do_token_path, user_username, user_default_pass)
if not _has_droplet_inventory_symlink():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment