-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_lab_python-defenders.yml
More file actions
41 lines (33 loc) · 1.03 KB
/
Copy pathsetup_lab_python-defenders.yml
File metadata and controls
41 lines (33 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
# TODO Move to jupyter_role (will include certbot, ufw)
- name: Setup environment for Python for Defenders Lab
hosts: python_lab
vars_files:
- ./group_vars/my_vars.yml
tasks:
- name: Install pipx
apt:
pkg:
- pipx
state: latest
update_cache: true
become: true
- name: Install poetry
community.general.pipx:
name: poetry
state: present
- name: Clone python-for-defenders repo
ansible.builtin.git:
repo: https://github.com/The-Taggart-Institute/python-for-defenders.git
dest: "{{ working_dir }}"
- name: Install lab dependancies via poetry
ansible.builtin.command: "{{ poetry_path }} install"
args:
chdir: "{{ working_dir }}"
- name: Start the jupyter lab environment
ansible.builtin.shell: "{{ poetry_path }} shell jupyter lab --no-browser"
args:
chdir: "{{ working_dir }}"
- name: Print message
ansible.builtin.debug:
msg: Environment setup and lab running...