WIP roles for easy selfhosting based on ansible
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
766 B

- name: "Setup pip"
name: "{{ 'python3-pip' if ansible_distribution != 'Archlinux' else 'python-pip' }}"
- name: "Check whether /usr/local/bin/pip exists"
path: "/usr/local/bin/pip"
register: res
- name: "Ensure pip is in $PATH"
dest: "/usr/local/bin/pip"
src: "/usr/bin/pip3"
state: "link"
when: ansible_distribution == 'Debian' and not res.stat.exists
- name: "Install python package from another role"
include: "packages.yml"
when: python_packages is defined
- name: "Install python package from config"
include: "packages.yml"
python_packages: "{{ packages | default({}) | attr('python') | default([]) }}"
when: python_packages is not defined and packages | default({}) | attr('python')