diff --git a/roles/ind/wikmd/wikmd-install.yml b/roles/ind/wikmd/wikmd-install.yml index 79a8220..53ac933 100644 --- a/roles/ind/wikmd/wikmd-install.yml +++ b/roles/ind/wikmd/wikmd-install.yml @@ -74,6 +74,10 @@ name: - python3-full - python3-pip + - python3-venv + # Below are needed for wikmd install + - libxml++2.6-dev + - libxslt1-dev state: present update_cache: yes @@ -124,6 +128,21 @@ creates: /data/wikmd when: not wikmd_stat.stat.exists or not wikmd_stat.stat.isdir + - name: Remove VENV directory + ansible.builtin.file: + path: /data/wikmd/venv + state: absent + + - name: Create VENV directory + command: + cmd: "python3 -m venv /data/wikmd/venv" + creates: "/data/wikmd/venv/bin/activate" + + - name: Upgrade pip in virtual environment + pip: + requirements: "{{ project_dir }}/requirements.txt" + virtualenv: "{{ project_dir }}/venv" + - name: Reload systemd daemon systemd: daemon_reload: yes