-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaybook.yml
More file actions
66 lines (57 loc) · 1.55 KB
/
playbook.yml
File metadata and controls
66 lines (57 loc) · 1.55 KB
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
# my playbook conffiguration for distro hoping and VM usage
#
# neovim, tree, emacs, nano, zsh, bash, tmux, htop, neofetch, git, curl, wget
# sets zsh as default shell
- name: Setup Personal Development Environment
hosts: all
become: yes
vars:
packages:
- neovim
- tree
- emacs
- nano
- zsh
- bash
- tmux
- htop
- neofetch
- git
- curl
- wget
- stow
tasks:
- name: Update package index
apt:
update_cache: yes
when: ansible_os_family == "Debian"
- name: Install packages on Debian-based systems
apt:
name: "{{ packages }}"
state: present
when: ansible_os_family == "Debian"
- name: Install packages on RedHat-based systems
yum:
name: "{{ packages }}"
state: present
when: ansible_os_family == "RedHat"
- name: Install packages on Arch-based systems
pacman:
name: "{{ packages }}"
state: present
when: ansible_os_family == "Archlinux"
- name: Install packages on Alpine-based systems
apk:
name: "{{ packages }}"
state: present
when: ansible_os_family == "Alpine"
- name: If OS is Mac, install packages using Homebrew
homebrew:
name: "{{ packages }}"
state: present
when: ansible_os_family == "Darwin"
- name: Change default shell to zsh for current user
user:
name: "{{ ansible_user }}"
shell: /usr/bin/zsh
- name: Pull my dotfiles from GitHub and set up symlinks using Stow