-
Notifications
You must be signed in to change notification settings - Fork 0
/
linux-basics.yml
77 lines (69 loc) · 1.8 KB
/
linux-basics.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
- hosts: localhost
become: no
become_user: root
vars:
install_state: present # Override with: --extra-vars "install_state=latest"
the_user: "{{ ansible_user_id }}"
tasks:
- name: change user shell to zsh
become: yes
user:
name: "{{ the_user }}"
shell: /bin/zsh
- name: Install core and common packages
apt:
name: "{{ item }}"
state: "{{ install_state }}"
with_items:
- git
- curl
- wget
- zsh
- tmux
become: true
- name: Install Oh My ZSH
shell: sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
args:
creates: ~/.oh-my-zsh/oh-my-zsh.sh
- name: Grab the you-should-use OhMyZSH Plugin
git:
repo: https://github.com/MichaelAquilina/zsh-you-should-use.git
dest: ~/.oh-my-zsh/custom/plugins/you-should-use
- name: Grab ASDF From git
git:
repo: https://github.com/asdf-vm/asdf.git
dest: ~/.asdf
version: v0.11.3
tags:
- asdf
- name: Grab tpm (Tmux Plugin Manager) From git
git:
repo: https://github.com/tmux-plugins/tpm
dest: ~/.tmux/plugins/tpm
tags:
- tmux
- name: Link dotfiles repo to ~/dotfiles
file:
src: "{{ playbook_dir }}"
dest: "~/dotfiles"
state: link
force: true
tags: link
- name: Link files
file:
src: "{{ playbook_dir }}/{{item}}"
dest: "~/.{{item}}"
state: link
force: true
with_items:
- agignore
- tmux.conf
- asdfrc
- gitconfig
tags: link
- file:
src: "{{ playbook_dir }}/ssh_config"
dest: "~/.ssh/config"
state: link
tags: link