[CODE] essentials: install pip, customizable zshrc

This commit is contained in:
Jannik Beyerstedt 2020-03-19 18:17:57 +01:00 committed by Jannik Beyerstedt
parent 5fb94b33b3
commit 44558263b0
10 changed files with 153 additions and 7 deletions

View file

@ -1,5 +1,5 @@
---
# Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh) - ArchLinux Version
# Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh, pip) - ArchLinux Version
- name: essentials - Install essential utilities
become: yes
@ -14,3 +14,4 @@
- zsh
- vim
- tmux
- python-pip

View file

@ -1,5 +1,5 @@
---
# Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh) - CentOS Version
# Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh, pip) - CentOS Version
- name: essentials - Install essential utilities
become: yes
@ -13,3 +13,14 @@
- zsh
- vim
- tmux
- name: essentials - Install pip - Activate EPEL
become: yes
yum:
name: epel-release
state: present
- name: essentials - Install pip - Install
become: yes
yum:
name: python-pip
state: present

View file

@ -1,5 +1,5 @@
---
# Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh) - macOS Version
# Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh, pip) - macOS Version
- name: essentials - Install essential utilities
package:
@ -12,3 +12,4 @@
- zsh
- vim
- tmux
- python # includes pip

View file

@ -1,5 +1,5 @@
---
# Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh) - Debian Version
# Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh, pip) - Debian Version
- name: essentials - Install essential utilities
become: yes
@ -14,3 +14,5 @@
- zsh
- vim
- tmux
- python-pip
- python3-pip

View file

@ -1,5 +1,5 @@
---
# Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh)
# Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh, pip)
- name: essentials - Install essential utilities
include_tasks: "{{ item }}"

View file

@ -16,6 +16,27 @@
when:
- fzf_git.after != fzf_git.before
- name: usersettings - Install pip virtualenvwrapper
block:
- name: usersettings - Install pip virtualenvwrapper (Debian)
become: yes
pip:
name: virtualenvwrapper
extra_args: --system
when: (override_os_family is defined) | ternary(override_os_family,ansible_os_family) == "Debian"
- name: usersettings - Install pip virtualenvwrapper (macOS)
environment:
PATH: "/usr/local/bin:{{ ansible_env.PATH }}"
pip:
name: virtualenvwrapper
when: (override_os_family is defined) | ternary(override_os_family,ansible_os_family) == "Darwin"
- name: usersettings - Install pip virtualenvwrapper (CentOS, ArchLinux)
become: yes
pip:
name: virtualenvwrapper
when: (override_os_family is defined) | ternary(override_os_family,ansible_os_family) == "Centos" or
(override_os_family is defined) | ternary(override_os_family,ansible_os_family) == "Archlinux"
when: usersetup_virtualenvwrapper
- name: usersettings - Copy dotfiles
copy:
src: "{{ item.src }}"
@ -24,9 +45,13 @@
- { src: "{{ role_path }}/files/dotfiles/_gitignore_global", dest: ".gitignore_global" }
- { src: "{{ role_path }}/files/dotfiles/_tmux.conf", dest: ".tmux.conf" }
- { src: "{{ role_path }}/files/dotfiles/_vimrc", dest: ".vimrc" }
- { src: "{{ role_path }}/files/dotfiles/_zshrc", dest: ".zshrc" }
- { src: "{{ role_path }}/files/dotfiles/_oh-my-zsh/custom/themes/agnoster.zsh-theme", dest: ".oh-my-zsh/custom/themes/agnoster.zsh-theme" }
- { src: "{{ role_path }}/files/dotfiles/_oh-my-zsh/custom/themes/jtbx.zsh-theme", dest: ".oh-my-zsh/custom/themes/jtbx.zsh-theme" }
- name: usersettings - Set zshrc
template:
src: "{{ role_path }}/templates/_zshrc.j2"
dest: "{{ ansible_user_dir }}/.zshrc"
when: usersetup_gitconfig == true
- name: usersettings - Set global gitconfig
template:
src: "{{ role_path }}/templates/_gitconfig.j2"