Commit a8a7db2a authored by Florian Kempenich's avatar Florian Kempenich
Browse files

Update glances installation after 'python' TOOCS upgrade

parent 294cf4a0
......@@ -4,34 +4,27 @@
- "{{ ansible_user_uid }} == 0"
msg: "Please run this role as root!"
- name: "Install Glances"
block:
- name: "Install Python / pip"
include_role:
name: TOOCS.python
vars:
python_versions:
- 3.7.0
- name: "Install `glances` and `glances` optional dependencies"
pip:
name: "{{ item }}"
executable: pip3
state: latest
extra_args: --user
with_items:
- glances
- docker
- bottle
environment:
PATH: "{{ ansible_env.HOME }}/.pyenv/shims:{{ ansible_env.PATH }}"
# ^-- Add `~/.local/bin` to path to access `pip3` with pyenv
- set_fact:
python_version: 3.7.0
- name: "Install Python / pip"
include_role:
name: TOOCS.python
vars:
python_versions:
- "{{ python_version }}"
global_pip_packages:
- glances
- docker
- bottle
- set_fact:
python_installation: "/root/.asdf/installs/python/{{ python_version }}"
- name: "Start Glances Web server as Daemon"
block:
- name: "Copy `glances.service` file"
copy:
template:
src: glances.service
dest: /etc/systemd/system/glances.service
owner: root
......
......@@ -3,8 +3,8 @@ Description=Glances Webserver on port 61208
[Service]
After=network.target
ExecStart=/root/.local/bin/glances -w
ExecStart={{ python_installation }}/bin/glances -w
Restart=on-abort
[Install]
WantedBy=multi-user.target
\ No newline at end of file
WantedBy=multi-user.target
......@@ -9,7 +9,7 @@ def readme():
setup(
name='ansible-droplet',
version='0.4.6',
version='0.4.7',
description='A cli to Create / Destroy DigitalOcean Droplets',
long_description=readme(),
keywords='digitalocean digital ocean droplet ansible ssh provision',
......
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