aboutsummaryrefslogtreecommitdiffstats
path: root/roles/_workstation/packages
diff options
context:
space:
mode:
Diffstat (limited to 'roles/_workstation/packages')
-rw-r--r--roles/_workstation/packages/defaults/main.yml96
-rw-r--r--roles/_workstation/packages/tasks/main.yml54
-rw-r--r--roles/_workstation/packages/vars/main.yml83
3 files changed, 109 insertions, 124 deletions
diff --git a/roles/_workstation/packages/defaults/main.yml b/roles/_workstation/packages/defaults/main.yml
new file mode 100644
index 0000000..27db8cd
--- /dev/null
+++ b/roles/_workstation/packages/defaults/main.yml
@@ -0,0 +1,96 @@
+
+# roles/_workstation/packages/vars/main.yml
+#
+
+---
+
+pkgs:
+ common:
+ # desktop (backup over dwm)
+ - bemenu
+ - i3status
+ # editor
+ - neovim
+ # files
+ - curl
+ - git
+ - lowdown
+ - syncthing
+ - tar
+ - unzip
+ - wget
+ - zip
+ # lang
+ - ansible
+ - go
+ - rust
+ # multimedia
+ - cmus
+ - feh
+ - firefox
+ - mpv
+ - qutebrowser
+ - rtorrent
+ - vlc
+ - weechat
+ # tools
+ - gnupg
+ - gopass
+ - htop
+ - ipmitool
+ - jq
+ - tor
+ - zsh
+
+ linux:
+ - acpi
+ - docker
+ - docker-compose
+ - emacs
+ - opendoas
+ - wireguard-tools
+
+ archlinux:
+ # desktop
+ - i3-wm
+ # editor
+ # sys
+ # python
+ - python-jedi
+ - python-neovim
+ - python-pip
+ - python-requests
+
+ openbsd:
+ # desktop
+ - i3
+ # devel
+ - automake--%1.16
+ - clang-tools-extra
+ - cmake
+ - gmake
+ - free
+ # editor
+ - emacs--no_x11%emacs
+ # net
+ - tor-browser
+ - torsocks
+ - wireguard-tools
+ # multimedia
+ - weechat-lua
+ - weechat-python
+ # python
+ - py3-jedi
+ - py3-neovim
+ - py3-pip
+ - py3-requests
+ # security
+ - pcsc-lite
+ - pcsc-tools
+
+ void:
+ - gnupg2
+ - python3-jedi
+ - python3-neovim
+ - python3-pip
+ - python3-requests
diff --git a/roles/_workstation/packages/tasks/main.yml b/roles/_workstation/packages/tasks/main.yml
index 798eafa..20afce5 100644
--- a/roles/_workstation/packages/tasks/main.yml
+++ b/roles/_workstation/packages/tasks/main.yml
@@ -4,46 +4,18 @@
---
-- name: install packages for Archlinux
- shell: |
- pacman --noconfirm --needed -Sy {{ item | join(" ") }}
+- name: install distribution packages
+ package:
+ name: "{{ item }}"
+ state: present
loop:
- - "{{ pkgs_common }}"
- - "{{ pkgs_archlinux }}"
- no_log: true
- register: out
- ignore_errors: true
- when: ansible_distribution == "Archlinux"
+ - "{{ pkgs.common }}"
+ - "{{ pkgs[ansible_distribution | lower] }}"
-- name: install packages for OpenBSD
- shell: pkg_add -z {{ item | join(" ") }}
- loop:
- - "{{ pkgs_common }}"
- - "{{ pkgs_openbsd }}"
- no_log: true
- register: out
- ignore_errors: true
- when: ansible_distribution == "OpenBSD"
-
-- name: packages installation output
- debug:
- msg: |
- {% for item in out.results %}
- - {{ item.cmd }}
- {% for type in ["stdout_lines", "stderr_lines"] if item[type] %}
- -- {{ type }}
- {% for line in item[type] %}
- --- {{ line }}
- {% endfor %}
- {% endfor %}
- {% endfor %}
- when: out is defined
-
-- name: show installation informations
- debug:
- msg: |
- {% if out is defined %}
- Installed all packages for system : {{ ansible_distribution }}
- {% else %}
- No installation methode for system : {{ ansible_distribution }}. Please patch and commit.
- {% endif %}
+- name: install system packages
+ package:
+ name: "{{ item }}"
+ state: present
+ loop:
+ - "{{ pkgs[ansible_system | lower] }}"
+ when: ansible_system in "Linux"
diff --git a/roles/_workstation/packages/vars/main.yml b/roles/_workstation/packages/vars/main.yml
deleted file mode 100644
index 0cdf503..0000000
--- a/roles/_workstation/packages/vars/main.yml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-# roles/_workstation/packages/vars/main.yml
-#
-
----
-
-pkgs_common:
- # desktop (backup over dwm)
- - bemenu
- - i3status
- # editor
- - neovim
- # files
- - curl
- - git
- - lowdown
- - syncthing
- - tar
- - unzip
- - wget
- - zip
- # lang
- - ansible
- - go
- - rust
- # multimedia
- - cmus
- - feh
- - firefox
- - mpv
- - qutebrowser
- - rtorrent
- - vlc
- - weechat
- # tools
- - gnupg
- - htop
- - ipmitool
- - jq
- - tor
- - zsh
-
-pkgs_archlinux:
- # desktop
- - i3-wm
- # editor
- - emacs
- # sys
- - opendoas
- # python
- - python-jedi
- - python-neovim
- - python-pip
- - python-requests
- # net
- - wireguard-dkms
-
-pkgs_openbsd:
- # desktop
- - i3
- # devel
- - automake--%1.16
- - clang-tools-extra
- - cmake
- - gmake
- - free
- # editor
- - emacs--no_x11%emacs
- # net
- - tor-browser
- - torsocks
- - wireguard-tools
- # multimedia
- - weechat-lua
- - weechat-python
- # python
- - py3-jedi
- - py3-neovim
- - py3-pip
- - py3-requests
- # security
- - pcsc-lite
- - pcsc-tools
remember that computers suck.