From d32393c99072ed1e657e1ee8a00dffde08ae8b01 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Sat, 30 Apr 2022 17:14:52 +0100 Subject: [PATCH] Add a python role for unix-like OS families --- main.yaml | 1 + roles/python/tasks/main.yaml | 44 ++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 roles/python/tasks/main.yaml diff --git a/main.yaml b/main.yaml index 9926f2b..2b98b09 100644 --- a/main.yaml +++ b/main.yaml @@ -5,6 +5,7 @@ - tmux - neovim - git + - python - hosts: windows roles: diff --git a/roles/python/tasks/main.yaml b/roles/python/tasks/main.yaml new file mode 100644 index 0000000..31040e2 --- /dev/null +++ b/roles/python/tasks/main.yaml @@ -0,0 +1,44 @@ +--- +- name: install config repo + git: + repo: git@code.infektor.net:config/python.git + dest: ~/.config/python + +# TODO: set repo email + +- name: install pip packages + pip: + name: + - flake8 + - grip + - ipdb + - ipython + - isort + - pylint + - python-gist + - yapf + state: latest + extra_args: --user + +- name: create directories + file: + state: directory + dest: '{{item}}' + with_items: + - ~/.config/ipython/profile_default + - ~/.config/pip + +- name: create symbolic links + file: + state: link + src: '{{item.src}}' + dest: '{{item.dest}}' + with_items: + - src: ~/.config/python/flake8 + dest: ~/.config/flake8 + - src: ~/.config/python/pylintrc + dest: ~/.pylintrc + - src: ~/.config/python/ipython_config.py + dest: ~/.config/ipython/profile_default/ipython_config.py + - src: ~/.config/python/pip.conf + dest: ~/.config/pip/pip.conf