From a7283dee69485dc531032cb69a5b82a0502801c8 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Wed, 5 Jan 2022 14:21:33 +0100 Subject: [PATCH] Feat: workstation runs --- roles/workstation/defaults/main.yml | 66 ++++++++++++++--------------- roles/workstation/tasks/arch.yml | 31 +++----------- roles/workstation/tasks/main.yml | 14 +++--- 3 files changed, 45 insertions(+), 66 deletions(-) diff --git a/roles/workstation/defaults/main.yml b/roles/workstation/defaults/main.yml index fa8b8a6..b1f1064 100644 --- a/roles/workstation/defaults/main.yml +++ b/roles/workstation/defaults/main.yml @@ -3,16 +3,16 @@ pacman_utils: - nfs-utils - samba + - cups + - cups-pdf + - avahi + - nss-mdns + +pacman_cli: - git-annex - fzf - ripgrep - tig - - cups - - cups-pdf - - avahi - - mdns_minimal - -pacman_cli: - moc - pass - task @@ -78,36 +78,35 @@ pacman_fonts: - ttf-inconsolata - noto-fonts -pacman_gnome: - - gnome - - gdm - - gnome-tweaks - - gparted - - transmission-gtk - - quodlibet - - networkmanager - - network-manager-applet - - gnome-keyring - - grsync - - soundconverter - - picard - - shotwell - - pitivi - - seahorse - - python-psutil +pacman_programming: + - pandoc + - python + - python-virtualenv + - python-pip + - python2 + - python2-virtualenv + - python2-pip + - graphviz + - python-black + - pyenv + - nodejs + - yarn pacman_pkgs: - "{{ pacman_utils }}" - - "{{ pacman_cli }}" - - "{{ pacman_terms }}" - - "{{ pacman_office }}" - - "{{ pacman_media }}" - - "{{ pacman_work }}" - - "{{ pacman_3Dprint }}" - - "{{ pacman_fonts }}" + # - "{{ pacman_cli }}" + # - "{{ pacman_terms }}" + # - "{{ pacman_office }}" + # - "{{ pacman_media }}" + # - "{{ pacman_work }}" + # - "{{ pacman_3Dprint }}" + # - "{{ pacman_fonts }}" +aur_utils: + - autofs -aur_fonts: - ttf-ubuntu-mono-derivative-powerline-git +aur_fonts: + - ttf-ubuntu-mono-derivative-powerline-git - ttf-inconsolata-lgc-for-powerline - ttf-droid-sans-mono-slashed-powerline-git - ttf-literation-mono-powerline-git @@ -120,5 +119,6 @@ aur_work: - perl-locale-codes aur_pkgs: - - "{{ aur_fonts }}" - - "{{ aur_work }}" + - "{{ aur_utils }}" + # - "{{ aur_fonts }}" + # - "{{ aur_work }}" diff --git a/roles/workstation/tasks/arch.yml b/roles/workstation/tasks/arch.yml index 7b0094a..0d3ff5e 100644 --- a/roles/workstation/tasks/arch.yml +++ b/roles/workstation/tasks/arch.yml @@ -12,32 +12,13 @@ community.general.pacman: name: "{{ item }}" state: present - with_items: pacman_pkgs + update_cache: yes + with_items: "{{ pacman_pkgs }}" - name: Install AUR pkgs - kewlfft.aur.aur: + aur: name: "{{ item }}" state: present - with_items: aur_pkgs - -- name: enable service cups - systemd: - name: cups - # name: org.cups.cups - enabled: yes - state: started - when: not minimal or not server - -- name: enable service avahi-daemon - systemd: - name: avahi-daemon - enabled: yes - state: started - when: not minimal or not server - -- name: enable service nfs - systemd: - name: nfs-client.target - enabled: yes - state: started - when: not minimal or not server + with_items: "{{ aur_pkgs }}" + become: yes + become_user: aur_builder diff --git a/roles/workstation/tasks/main.yml b/roles/workstation/tasks/main.yml index 817c531..8ef7b7b 100644 --- a/roles/workstation/tasks/main.yml +++ b/roles/workstation/tasks/main.yml @@ -15,7 +15,7 @@ ansible.builtin.lineinfile: path: /etc/nsswitch.conf regexp: "^hosts:" - line: hosts: files mymachines myhostname mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns + line: "hosts: files mymachines myhostname mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns" - name: enable service avahi-daemon systemd: @@ -29,10 +29,8 @@ enabled: yes state: started -- name: More colorfull pacman - lineinfile: - dest: /etc/pacman.conf - regexp: '^#Color$' - line: 'Color' - backrefs: yes - ignore_errors: yes +- name: Enable autofs daemon + service: + name: autofs + state: started + enabled: yes