Compare commits

..

5 Commits

3 changed files with 22 additions and 18 deletions

View File

@@ -89,9 +89,6 @@ packages:
pluma: pluma:
ubuntu: ["pluma"] ubuntu: ["pluma"]
archlinux: ["pluma"] archlinux: ["pluma"]
vim:
ubuntu: ["vim"]
archlinux: ["gvim"]
neovim: neovim:
ubuntu: ["neovim"] ubuntu: ["neovim"]
archlinux: ["neovim", "python-pynvim"] archlinux: ["neovim", "python-pynvim"]
@@ -148,7 +145,7 @@ packages:
archlinux: ["pandoc", "texlive-core", "texlive-fontsextra", "texlive-latexextra"] archlinux: ["pandoc", "texlive-core", "texlive-fontsextra", "texlive-latexextra"]
libvirt: libvirt:
ubuntu: ["virt-manager", "libvirt-daemon"] ubuntu: ["virt-manager", "libvirt-daemon"]
archlinux: ["virt-manager", "libvirt", "dnsmasq", "ebtables"] archlinux: ["virt-manager", "libvirt", "dnsmasq", "ebtables", "dmidecode"]
firefox: firefox:
ubuntu: ["firefox"] ubuntu: ["firefox"]
archlinux: ["firefox"] archlinux: ["firefox"]
@@ -394,3 +391,6 @@ packages:
signal: signal:
ubuntu: [] ubuntu: []
archlinux: ["signal-desktop"] archlinux: ["signal-desktop"]
vim:
ubuntu: ["vim"]
archlinux: ["gvim"]

View File

@@ -15,29 +15,29 @@
tags: tags:
- always - always
- name: Check for valid distro - name: check for valid distro
assert: assert:
that: distro in ('ubuntu', 'archlinux') that: distro in ('ubuntu', 'archlinux')
- block: - block:
- block: - block:
- name: Update apt cache - name: update apt cache
apt: apt:
update_cache: true update_cache: true
become: true become: true
changed_when: false changed_when: false
- name: Upgrade system - name: upgrade system
apt: apt:
upgrade: dist upgrade: dist
become: true become: true
- name: Remove unused packages - name: remove unused packages
apt: apt:
autoremove: true autoremove: true
become: true become: true
- name: Clean apt cache - name: clean apt cache
apt: apt:
autoclean: true autoclean: true
become: true become: true
@@ -62,7 +62,7 @@
marker: "# {mark} ANSIBLE MANAGED parallel_download" marker: "# {mark} ANSIBLE MANAGED parallel_download"
become: true become: true
- name: Upgrade system - name: upgrade system
pacman: pacman:
upgrade: true upgrade: true
update_cache: true update_cache: true
@@ -75,7 +75,7 @@
state: present state: present
become: true become: true
- name: Clean cache - name: clean cache
command: paccache -rk2 -ruk0 command: paccache -rk2 -ruk0
become: true become: true
changed_when: false changed_when: false
@@ -107,6 +107,7 @@
create_home: true create_home: true
shell: /bin/bash shell: /bin/bash
system: true system: true
become: true
- name: create paru user on arch - name: create paru user on arch
user: user:
@@ -115,6 +116,7 @@
create_home: true create_home: true
shell: /bin/bash shell: /bin/bash
system: true system: true
become: true
- name: configure passwordless sudo for paru user - name: configure passwordless sudo for paru user
copy: copy:
@@ -180,6 +182,7 @@
- name: force-update iptables to iptables-nft on arch - name: force-update iptables to iptables-nft on arch
shell: pacman -Q iptables-nft || yes | pacman -S iptables-nft shell: pacman -Q iptables-nft || yes | pacman -S iptables-nft
changed_when: false changed_when: false
become: true
when: distro == 'archlinux' when: distro == 'archlinux'
- set_fact: - set_fact:
@@ -433,11 +436,12 @@
force: true force: true
become: true become: true
- name: add go directory to PATH - name: add go directory to PATH and set GOROOT
copy: copy:
dest: /etc/profile.d/go.sh dest: /etc/profile.d/go.sh
content: | content: |
PATH=$PATH:/usr/local/go/bin export PATH=$PATH:/usr/local/go/bin
export GOROOT=/usr/local/go
owner: root owner: root
group: root group: root
mode: '0644' mode: '0644'
@@ -504,7 +508,7 @@
when: not yubikey_touch_detector_binary.stat.exists when: not yubikey_touch_detector_binary.stat.exists
- name: build yubikey-touch-detector - name: build yubikey-touch-detector
shell: sh -c 'env GOPATH=$(pwd) PATH=/usr/local/go/bin:$PATH go get -u github.com/maximbaz/yubikey-touch-detector' shell: sh -c 'PATH=/usr/local/go/bin:$PATH env GOROOT=/usr/local/go GOPATH=$(pwd) go get -u github.com/maximbaz/yubikey-touch-detector'
args: args:
chdir: "{{ yubikey_touch_detector_build_tempdir.path }}" chdir: "{{ yubikey_touch_detector_build_tempdir.path }}"
when: not yubikey_touch_detector_binary.stat.exists when: not yubikey_touch_detector_binary.stat.exists

View File

@@ -317,23 +317,23 @@
tags: [update] tags: [update]
- name: install vim plugins - name: install vim plugins
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugInstall +qall' command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugInstall +qall'
register: vim_plugin_install register: vim_plugin_install
changed_when: vim_plugin_install.stderr != "" changed_when: vim_plugin_install.stderr != ""
- name: install go binaries for vim - name: install go binaries for vim
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoInstallBinaries +qall' command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoInstallBinaries +qall'
changed_when: false changed_when: false
- name: update vim plugins - name: update vim plugins
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugUpdate +qall' command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugUpdate +qall'
changed_when: false changed_when: false
register: vim_plugin_update register: vim_plugin_update
changed_when: vim_plugin_update.stderr != "" changed_when: vim_plugin_update.stderr != ""
tags: [update] tags: [update]
- name: update go binaries for vim - name: update go binaries for vim
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoUpdateBinaries +qall' command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoUpdateBinaries +qall'
changed_when: false changed_when: false
tags: [update] tags: [update]