diff --git a/README.md b/README.md index f022882..8fa7889 100644 --- a/README.md +++ b/README.md @@ -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``` diff --git a/install.yml b/install.yml new file mode 100644 index 0000000..b339f95 --- /dev/null +++ b/install.yml @@ -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 + +