Opensuse and maint

This commit is contained in:
Anthony Cicchetti 2020-07-06 13:41:24 -04:00
parent fa074581fa
commit 21734b5ed4
8 changed files with 100 additions and 17 deletions

View file

@ -9,8 +9,8 @@ elif [[ $(uname) == "Linux" ]]; then
if [[ $(command -v pacman) ]]; then if [[ $(command -v pacman) ]]; then
sudo pacman -Sy --noconfirm ansible sudo pacman -Sy --noconfirm ansible
elif [[ $(command -v zypper) ]]; then elif [[ $(command -v zypper) ]]; then
sudo zypper install -y ansible sudo zypper install -y ansible
sudo ln -sf /usr/bin/python3 /usr/bin/python sudo ln -sf /usr/bin/python3 /usr/bin/python
elif [[ $(command -v apt) ]]; then elif [[ $(command -v apt) ]]; then
sudo apt install -y ansible python3-apt sudo apt install -y ansible python3-apt
# ubuntu doesn't create a /usr/bin/python, so we have to make one ourselves # ubuntu doesn't create a /usr/bin/python, so we have to make one ourselves
@ -24,4 +24,6 @@ elif [[ $(uname) == "Darwin" ]]; then
/usr/local/bin/brew install ansible /usr/local/bin/brew install ansible
fi fi
ansible-galaxy install kewlfft.aur
ansible-playbook --ask-become-pass -i inventory main.yml ansible-playbook --ask-become-pass -i inventory main.yml

View file

@ -0,0 +1,2 @@
dependencies:
- kewlfft.aur

View file

@ -16,8 +16,18 @@
- cmake - cmake
- tmux - tmux
- gnupg - gnupg
- neovim
- fzf - fzf
- rsync
state: latest
- name: Install packaged neovim
become: yes
become_method: sudo
when:
- dev_machine != true
pacman:
name:
- neovim
state: latest state: latest
- name: Install Development Tools - name: Install Development Tools
@ -31,10 +41,37 @@
- openssl - openssl
state: latest state: latest
- name: Create aur_builder user
when:
- dev_machine == true
user:
name: aur_builder
group: wheel
- name: aur_builder can run pacman without sudo
when:
- dev_machine == true
lineinfile:
path: /etc/sudoers.d/11-install-aur_builder
line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman'
create: yes
validate: 'visudo -cf %s'
- name: Create yay tmp directory
when:
- dev_machine == true
file:
dest: /tmp/yay
state: directory
mode: '0755'
owner: aur_builder
group: wheel
- name: clone yay from github - name: clone yay from github
when: when:
- dev_machine == true - dev_machine == true
become: false become: true
become_user: aur_builder
git: git:
repo: https://aur.archlinux.org/yay.git repo: https://aur.archlinux.org/yay.git
dest: /tmp/yay dest: /tmp/yay
@ -42,18 +79,14 @@
update: yes update: yes
# notify: makepkg -si # notify: makepkg -si
- name: makepkg --noconfirm -si - name: Makepkg yay
when: when:
- dev_machine == true - dev_machine == true
become: false become: yes
become_user: aur_builder
command: makepkg --noconfirm -si command: makepkg --noconfirm -si
args: args:
chdir: /tmp/yay chdir: /tmp/yay
creates: /usr/bin/yay creates: /usr/bin/yay
- name: Install hstr - include_tasks: neovim-nightly.yml
when:
- dev_machine == true
command: yay -Sy --noconfirm --needed --cleanafter hstr
args:
creates: /usr/local/bin/hstr

View file

@ -0,0 +1,6 @@
---
- aur: name=neovim-nightly
become: yes
become_user: aur_builder
when:
- nightly_neovim == true

View file

@ -20,7 +20,7 @@
- rsync - rsync
state: latest state: latest
- include_tasks: neovim-nightly.yaml - include_tasks: neovim-nightly.yml
- name: Install @development-tools - name: Install @development-tools
when: when:

View file

@ -17,12 +17,11 @@
warn: false warn: false
creates: /etc/yum.repos.d/_copr_agriffis_neovim-nightly.repo creates: /etc/yum.repos.d/_copr_agriffis_neovim-nightly.repo
- name: Install neovim-nightly - name: Install neovim
become: yes become: yes
become_method: sudo become_method: sudo
when:
- nightly_neovim == true
dnf: dnf:
name: name:
- neovim - neovim
state: latest state: latest

View file

@ -16,10 +16,12 @@
- cmake - cmake
- tmux - tmux
- gpg - gpg
- neovim
- fzf - fzf
- rsync
state: latest state: latest
- include_tasks: neovim-nightly.yml
- name: Install devel_* - name: Install devel_*
when: when:
- dev_machine == true - dev_machine == true

View file

@ -0,0 +1,39 @@
---
- name: Download neovim-nightly from github appimage
become: yes
become_method: sudo
when:
- nightly_neovim == true
command:
cmd: curl -L -o /tmp/nvim.appimage 'https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage'
warn: false
- name: Ensure nvim.appimage has proper permissions
become: yes
become_method: sudo
when:
- nightly_neovim == true
file:
path: /tmp/nvim.appimage
mode: u=rwx,g=rx,o=rx
- name: Install nvim.appimage into /usr/local/bin/nvim
become: yes
become_method: sudo
when:
- nightly_neovim == true
synchronize:
src: /tmp/nvim.appimage
dest: /usr/local/bin/nvim
- name: Install neovim from repo
become: yes
become_method: sudo
when:
- nightly_neovim == false
zypper:
name:
- neovim
state: latest