Skip to content

Commit

Permalink
Change a lot of things
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Sep 29, 2023
1 parent c9f1dca commit 11a790e
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 17 deletions.
2 changes: 2 additions & 0 deletions roles/bash/files/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,5 @@ export BASH_SILENCE_DEPRECATION_WARNING=1
# aliases

# functions

# imports
7 changes: 4 additions & 3 deletions roles/docker/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
---
- name: Install docker and docker related stuff
- name: Install docker and docker-compose stuff
when: ansible_distribution != 'MacOSX'
ansible.builtin.package:
name:
- docker
- docker-compose
state: present
become: "{{ become_root }}"

- name: Create docker user group
- name: Create docker user group on Linux
when: ansible_distribution != 'MacOSX'
ansible.builtin.group:
name: docker
state: present

- name: Add the user to docker group
- name: Add the user to docker group on Linux
when: ansible_distribution != 'MacOSX'
ansible.builtin.user:
name: "{{ current_user }}"
Expand Down
1 change: 1 addition & 0 deletions roles/editors/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
dependencies:
- role: bash
- role: macos
25 changes: 23 additions & 2 deletions roles/editors/tasks/neovim.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,37 @@
---
- name: Install neovim
- name: Install iterm2
when: ansible_distribution == 'MacOSX'
community.general.homebrew_cask:
name:
- iterm2
state: present

- name: Install neovim on Linux
when: ansible_distribution != 'MacOSX'
ansible.builtin.package:
name: neovim
state: present
become: "{{ become_root }}"

- name: Install silversearch when in OSX
- name: Install neovim on MacOS
when: ansible_distribution == 'MacOSX'
community.general.homebrew:
name: neovim
state: present
become: "{{ become_root }}"

- name: Install silversearch on Linux
when: ansible_distribution != 'MacOSX'
ansible.builtin.package:
name: the_silver_searcher
state: present

- name: Install silversearch on OSX
when: ansible_distribution == 'MacOSX'
community.general.homebrew:
name: the_silver_searcher
state: present

- name: Copy vim config
ansible.builtin.copy:
src: files/neovim/.vimrc
Expand Down
2 changes: 1 addition & 1 deletion roles/git/files/git_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function __git_arrows {
git rev-parse --abbrev-ref @"{u}" &>/dev/null || return
local branch_status

git rev-list --left-right --count HEAD...@"{u}" 2>/dev/null || return
git rev-list --left-right --count HEAD...@"{u}" 2>&1 1> /dev/null || return
local left_arrow
local right_arrow

Expand Down
1 change: 1 addition & 0 deletions roles/macos/files/homebrew.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
eval "$(/opt/homebrew/bin/brew shellenv)"
25 changes: 25 additions & 0 deletions roles/macos/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
- name: Install homebrew
when: ansible_distribution == 'MacOSX'
command: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
args:
creates: /opt/homebrew/bin/brew

- name: Add homebrew import
when: ansible_distribution == 'MacOSX'
ansible.builtin.blockinfile:
path: "{{ home_folder }}/.bashrc"
insertafter: '^# imports$'
marker: "# {mark} homebrew.sh"
block: "{{ lookup('file', 'files/homebrew.sh') }}"

# - name: Install apps from brew-cask
# when: ansible_distribution == 'MacOSX'
# community.general.homebrew_cask:
# name:
# - firefox
# - google-chrome
# - password-gorilla
# - slack
# - spotify
# state: present
11 changes: 0 additions & 11 deletions roles/osx/tasks/main.yml

This file was deleted.

3 changes: 3 additions & 0 deletions roles/terminal/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
dependencies:
- role: macos

0 comments on commit 11a790e

Please sign in to comment.