dotfiles/roles/python/tasks/main.yml

26 lines
607 B
YAML

---
- name: Install python3 (Debian)
when: ansible_os_family == "Debian"
become: yes
apt: name={{ item }} state=latest update_cache=yes
loop: [python3, python3-pip]
- name: Install python3 (macOS)
when: ansible_os_family == "Darwin"
homebrew: name=python3 state=latest
- name: Create the python config and cache directories
file:
path: "~/.{{ item }}/python"
state: directory
loop:
- cache
- config
- name: Deploy python startup file
file:
src: "{{ role_path }}/files/startup.py"
dest: ~/.config/python/startup.py
state: link
force: yes