Commit f39fdbbf authored by eric pellegrini's avatar eric pellegrini

fixed bugs related to bad user expansion

parent fa309e79
......@@ -5,4 +5,4 @@
- "{{ conda_exe }} init"
- "{{ conda_exe }} update -y conda"
vars:
conda_exe: "~/miniconda3/bin/conda"
conda_exe: "{{ ansible_env.HOME }}/miniconda3/bin/conda"
......@@ -2,14 +2,14 @@
- name: download latest miniconda
get_url:
url: https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
dest: "~/Miniconda3-latest-Linux-x86_64.sh"
dest: "{{ ansible_env.HOME }}/Miniconda3-latest-Linux-x86_64.sh"
mode: u+x
force: True
- name: remove previous conda installation if any
file:
path: "~/miniconda3"
path: "{{ ansible_env.HOME }}/miniconda3"
state: absent
- name: install conda
command: "~/Miniconda3-latest-Linux-x86_64.sh -b -u"
command: "{{ ansible_env.HOME }}/Miniconda3-latest-Linux-x86_64.sh -b -u"
......@@ -56,5 +56,5 @@
dest: "{{ conda_envs_dir }}/visa-jupyter/etc/jupyter/jupyterhub_config.py"
force: True
vars:
conda_envs_dir: "~/miniconda3/envs"
conda_envs_dir: "{{ ansible_env.HOME }}/miniconda3/envs"
......@@ -30,5 +30,5 @@
args:
executable: /bin/bash
vars:
conda_exe: "{{ '~/miniconda3/bin/conda' | expanduser }}"
conda_root: "{{ '~/miniconda3' | expanduser }}"
conda_exe: "{{ ansible_env.HOME }}/miniconda3/bin/conda"
conda_root: "{{ ansible_env.HOME }}/miniconda3"
......@@ -13,5 +13,5 @@
mode: u+x
notify: restart visa-jupyter
vars:
conda_root: "~/miniconda3"
conda_envs_dir: "~/miniconda3/envs"
conda_root: "{{ ansible_env.HOME }}/miniconda3"
conda_envs_dir: "{{ ansible_env.HOME }}/miniconda3/envs"
{
"hub_prefix": "{{ '~' | expand_user }}"
"hub_prefix": "{{ ansible_env.HOME }}"
}
......@@ -4,9 +4,8 @@ After=syslog.target network.target
[Service]
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
ExecStart=/bin/bash "~/start_jupyterhub.sh"
User={{ jupyterhub_admin }}
Group={{ jupyterhub_admin_group }}
ExecStart=/bin/bash "{{ ansible_env.HOME }}/start_jupyterhub.sh"
User={{ ansible_env.USER }}
[Install]
WantedBy=multi-user.target
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