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

Fix metrics installation

parent c9dbf874
...@@ -155,25 +155,35 @@ ...@@ -155,25 +155,35 @@
# If using `remote_user` at the same level as `hosts`, it would # If using `remote_user` at the same level as `hosts`, it would
# not override the `ansible_user` variable from the inventory # not override the `ansible_user` variable from the inventory
ansible_user: "{{ user_to_create_username }}" ansible_user: "{{ user_to_create_username }}"
ansible_become_pass: "{{ user_to_create_default_password }}"
tasks: tasks:
# TODO: Fix Glances installation (or remove, but be sure to re-locate the daemon part!!) - name: Try Block
# TODO: Fix Glances installation (or remove, but be sure to re-locate the daemon part!!) 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!!)
# - name: "Install Glances Webserver as a service" # TODO: Fix Glances installation (or remove, but be sure to re-locate the daemon part!!)
# include_role: # TODO: Fix Glances installation (or remove, but be sure to re-locate the daemon part!!)
# name: glances # - name: "Install Glances Webserver as a service"
# include_role:
- name: "Enable advanced metrics on DigitalOcean" # name: glances
shell: "curl -sSL https://agent.digitalocean.com/install.sh | sh"
- name: "Enable advanced metrics on DigitalOcean"
- debug: shell: "curl -sSL https://agent.digitalocean.com/install.sh | sh"
msg: become: yes
- "Droplet '{{ droplet_name }}' succesfuly created"
- "" - debug:
- "IP = {{ ansible_default_ipv4.address }}" msg:
- "User = {{ user_to_create_username }}" - "Droplet '{{ droplet_name }}' succesfuly created"
- "Password = {{ user_to_create_password }}" - ""
- "" - "IP = {{ ansible_default_ipv4.address }}"
- "You can now ssh to the droplet with `ssh {{ droplet_name }}`" - "User = {{ user_to_create_username }}"
- "Don't forget to change the default password!" - "Password = {{ user_to_create_default_password }}"
\ No newline at end of file - ""
- "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(): ...@@ -35,7 +35,7 @@ def _install_requirements():
def _set_configuration_if_needed(): def _set_configuration_if_needed():
if not _is_configured(): 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) _create_configuration_file(ssh_key_path, ssh_key_name, do_token_path, user_username, user_default_pass)
if not _has_droplet_inventory_symlink(): 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