From 75921dd1714d88f26e69c6e3734a1bfdd71c9d41 Mon Sep 17 00:00:00 2001 From: Anthony Cicchetti Date: Sat, 31 Aug 2019 16:39:20 -0400 Subject: [PATCH] OpenSuSE Tumbleweed --- playbooks/launch | 4 ++ playbooks/main.yml | 12 ++++++ playbooks/roles/alacritty/tasks/main.yml | 1 + playbooks/roles/opensuse/defaults/main.yml | 2 + playbooks/roles/opensuse/tasks/main.yml | 44 ++++++++++++++++++++++ 5 files changed, 63 insertions(+) create mode 100644 playbooks/roles/opensuse/defaults/main.yml create mode 100644 playbooks/roles/opensuse/tasks/main.yml diff --git a/playbooks/launch b/playbooks/launch index 2cacbbb..72d2140 100755 --- a/playbooks/launch +++ b/playbooks/launch @@ -8,6 +8,10 @@ if [[ $(command -v ansible) ]]; then 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 diff --git a/playbooks/main.yml b/playbooks/main.yml index f6ff437..8ff9af7 100644 --- a/playbooks/main.yml +++ b/playbooks/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 }}" + diff --git a/playbooks/roles/alacritty/tasks/main.yml b/playbooks/roles/alacritty/tasks/main.yml index 481aab4..cb63509 100644 --- a/playbooks/roles/alacritty/tasks/main.yml +++ b/playbooks/roles/alacritty/tasks/main.yml @@ -9,4 +9,5 @@ src: "$HOME/.dotfiles/alacritty/alacritty.yml" dest: "$HOME/.config/alacritty/alacritty.yml" state: link + force: yes diff --git a/playbooks/roles/opensuse/defaults/main.yml b/playbooks/roles/opensuse/defaults/main.yml new file mode 100644 index 0000000..3660559 --- /dev/null +++ b/playbooks/roles/opensuse/defaults/main.yml @@ -0,0 +1,2 @@ +--- +dev_machine: yes diff --git a/playbooks/roles/opensuse/tasks/main.yml b/playbooks/roles/opensuse/tasks/main.yml new file mode 100644 index 0000000..051f357 --- /dev/null +++ b/playbooks/roles/opensuse/tasks/main.yml @@ -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