dotfiles/roles/python/tasks/main.yml

34 lines
647 B
YAML

- name: Install python3 with apt
when: ansible_os_family == "Debian"
become: yes
apt:
update_cache: yes
state: latest
name:
- python3
- python3-pip
- name: Install python3 with homebrew
when: ansible_os_family == "Darwin"
homebrew:
name: python3
state: latest
- name: Create the python config and data directories
file:
path: "{{ item }}"
state: directory
loop:
- ~/.config/python
- ~/.local/share/python # for this history file
- name: Deploy python startup file
file:
src: "{{ role_path }}/files/startup.py"
dest: ~/.config/python/startup.py
state: link
force: yes