Merge branch 'master' of git.anthonycicchetti.com:anthonycicc/dotfiles
This commit is contained in:
commit
cac9505707
6 changed files with 75 additions and 2 deletions
|
@ -4,10 +4,14 @@ set -ex
|
|||
PATH="$PATH:$HOME/.local/bin"
|
||||
|
||||
if [[ $(command -v ansible) ]]; then
|
||||
printf "ansible already installed"
|
||||
printf "ansible already installed\n"
|
||||
elif [[ $(uname) == "Linux" ]]; then
|
||||
if [[ $(command -v pacman) ]]; then
|
||||
sudo pacman -Sy --noconfirm ansible
|
||||
elif [[ $(command -v zypper) ]]; then
|
||||
sudo zypper -y install ansible
|
||||
sudo zypper addrepo -f http://download.opensuse.org/repositories/home:/tuw-e184/openSUSE_Tumbleweed/home:tuw-e184.repo
|
||||
sudo ln -sf /usr/bin/python3 /usr/bin/python
|
||||
elif [[ $(command -v apt) ]]; then
|
||||
sudo apt install -y ansible python3-apt
|
||||
# ubuntu doesn't create a /usr/bin/python, so we have to make one ourselves
|
||||
|
@ -21,4 +25,4 @@ elif [[ $(uname) == "Darwin" ]]; then
|
|||
/usr/local/bin/brew install ansible
|
||||
fi
|
||||
|
||||
ansible-playbook -i inventory main.yml
|
||||
ansible-playbook --ask-become-pass -i inventory main.yml
|
||||
|
|
|
@ -52,3 +52,15 @@
|
|||
vars:
|
||||
- dev_machine: "{{ _dev_machine }}"
|
||||
- rust_extras: "{{ _rust_extras }}"
|
||||
|
||||
- hosts: os_openSUSE*
|
||||
gather_facts: True
|
||||
roles:
|
||||
- role: opensuse
|
||||
vars:
|
||||
dev_machine: "{{ _dev_machine }}"
|
||||
- role: common
|
||||
vars:
|
||||
- dev_machine: "{{ _dev_machine }}"
|
||||
- rust_extras: "{{ _rust_extras }}"
|
||||
|
||||
|
|
|
@ -9,4 +9,5 @@
|
|||
src: "$HOME/.dotfiles/alacritty/alacritty.yml"
|
||||
dest: "$HOME/.config/alacritty/alacritty.yml"
|
||||
state: link
|
||||
force: yes
|
||||
|
||||
|
|
|
@ -43,3 +43,13 @@
|
|||
shell: ~/.anyenv/bin/anyenv install exenv
|
||||
args:
|
||||
creates: ~/.anyenv/envs/exenv
|
||||
|
||||
- name: anyenv plugin dir
|
||||
shell: mkdir ~/.anyenv/plugins
|
||||
args:
|
||||
creates: ~/.anyenv/plugins
|
||||
|
||||
- name: anyenv plugin
|
||||
shell: git clone https://github.com/znz/anyenv-update.git ~/.anyenv/plugins/anyenv-update
|
||||
args:
|
||||
creates: ~/.anyenv/plugins/anyenv-update
|
||||
|
|
2
playbooks/roles/opensuse/defaults/main.yml
Normal file
2
playbooks/roles/opensuse/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
dev_machine: yes
|
44
playbooks/roles/opensuse/tasks/main.yml
Normal file
44
playbooks/roles/opensuse/tasks/main.yml
Normal file
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
- name: Update Packages
|
||||
become: yes
|
||||
become_method: sudo
|
||||
zypper:
|
||||
name: "*"
|
||||
state: latest
|
||||
|
||||
- name: Install basics
|
||||
become: yes
|
||||
become_method: sudo
|
||||
zypper:
|
||||
name:
|
||||
- zsh
|
||||
- git
|
||||
- cmake
|
||||
- tmux
|
||||
- gpg
|
||||
- neovim
|
||||
- hstr
|
||||
state: latest
|
||||
|
||||
- name: Install devel_*
|
||||
when:
|
||||
- dev_machine == true
|
||||
become: yes
|
||||
become_method: sudo
|
||||
zypper:
|
||||
name:
|
||||
- "devel_basis"
|
||||
- "devel_C_C++"
|
||||
state: latest
|
||||
type: pattern
|
||||
|
||||
- name: Install other devel packages
|
||||
when:
|
||||
- dev_machine == true
|
||||
become: yes
|
||||
become_method: sudo
|
||||
zypper:
|
||||
name:
|
||||
- clang
|
||||
- libopenssl-devel
|
||||
state: latest
|
Loading…
Add table
Reference in a new issue