playbook to configure dotfiles
This commit is contained in:
parent
3878a8695c
commit
f42e0a614e
@ -1,12 +1,15 @@
|
||||
# dotfiles
|
||||
Quick configs i can't live without on my machines.
|
||||
|
||||
`./install.sh `
|
||||
```./install.sh ```
|
||||
installs everything to your system
|
||||
|
||||
`./install.sh undo`
|
||||
```./install.sh undo```
|
||||
removes only the configs from your home directory
|
||||
|
||||
`./install.sh wipe`
|
||||
```./install.sh wipe```
|
||||
removes both the configs and packages installed
|
||||
|
||||
if you find yourself in a machine that has ansible pre-installed you could use
|
||||
it too to install
|
||||
```ansible-playbook localhost install.yml -ask-become-pass```
|
||||
|
46
install.yml
Normal file
46
install.yml
Normal file
@ -0,0 +1,46 @@
|
||||
---
|
||||
- name: installs and setups dotfiles and packages
|
||||
hosts: localhost
|
||||
tasks:
|
||||
- name: test loops
|
||||
debug:
|
||||
msg: "{{ ansible_os_family }}"
|
||||
- name: install packages on a debian host
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
state: latest
|
||||
loop:
|
||||
- vim-nox
|
||||
- git
|
||||
- stow
|
||||
- curl
|
||||
- ranger
|
||||
- tmux
|
||||
when: ansible_os_family == "Debian"
|
||||
become: yes
|
||||
|
||||
- name: install packages on redhat host
|
||||
dnf:
|
||||
name:
|
||||
- vim-enhanced
|
||||
- git
|
||||
- stow
|
||||
- curl
|
||||
- ranger
|
||||
- tmux
|
||||
state: latest
|
||||
when: ansible_os_family == "RedHat"
|
||||
become: yes
|
||||
|
||||
- name: link the dotfiles to users home directory
|
||||
command:
|
||||
cmd: stow "{{ item }}"
|
||||
loop:
|
||||
- bash
|
||||
- git
|
||||
- ranger
|
||||
- shellenv
|
||||
- tmux
|
||||
- vim
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user