From a36170a3a74706d4ae400f88dc4ab3215d28d482 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@clevo" Date: Mon, 21 Feb 2022 14:11:46 +0100 Subject: [PATCH] toansible: Add base installation --- configs.yml | 39 --------------------------- playbook.yml | 1 + roles/base/tasks/main.yml | 57 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 39 deletions(-) create mode 100644 roles/base/tasks/main.yml diff --git a/configs.yml b/configs.yml index 3067b9b..5a922f0 100644 --- a/configs.yml +++ b/configs.yml @@ -1,42 +1,3 @@ -base: - - install: - arch: - - archlinux-keyring - - base-devel - - libnotify - - pacman-contrib # for checkupdates, paccache, pacdiff... - - pkgfile # get hint on missing package when command not found - - python-pip - - python-setuptools - - reflector - - xorg-xinit # enable xinit to avoid having to type 'startx' - - ttf-font-awesome - - ttf-jetbrains-mono - - ttf-fira-code - debian: - - build-essential - - libnotify-bin - - python3-venv - - python3-pip - - python3-setuptools - - xinit # enable xinit to avoid having to type 'startx' - - fonts-font-awesome - - fonts-jetbrains-mono - - fonts-firacode - both: - - rsync # used for backup - - curl - - wget - - xorg - - numlockx # activate numlock (set in .xinitrc) - - dunst - - udiskie # automount external drives (set in .xinitrc) - - xmlstarlet # for clitip - - pandoc # for clitip - - run: - command: sudo pkgfile -u - condition: arch - xmodmap: - symlink: - dotfiles/Xmodmap diff --git a/playbook.yml b/playbook.yml index 3646fc2..64e3feb 100644 --- a/playbook.yml +++ b/playbook.yml @@ -2,4 +2,5 @@ - hosts: localhost roles: + - base - neovim diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml new file mode 100644 index 0000000..28289a0 --- /dev/null +++ b/roles/base/tasks/main.yml @@ -0,0 +1,57 @@ +--- + +- name: Install packages (Arch) + become: true + pacman: + name: + - archlinux-keyring + - base-devel + - libnotify + - pacman-contrib # for checkupdates, paccache, pacdiff... + - pkgfile # get hint on missing package when command not found + - python-pip + - python-setuptools + - reflector + - xorg-xinit # enable xinit to avoid having to type 'startx' + - ttf-font-awesome + - ttf-jetbrains-mono + - ttf-fira-code + - rsync # used for backup + - curl + - wget + - xorg + - numlockx # activate numlock (set in .xinitrc) + - dunst + - udiskie # automount external drives (set in .xinitrc) + - xmlstarlet # for clitip + - pandoc # for clitip + when: ansible_distribution == 'Archlinux' + +- name: Install packages (Debian) + become: true + apt: + name: + - build-essential + - libnotify-bin + - python3-venv + - python3-pip + - python3-setuptools + - xinit # enable xinit to avoid having to type 'startx' + - fonts-font-awesome + - fonts-jetbrains-mono + - fonts-firacode + - rsync # used for backup + - curl + - wget + - xorg + - numlockx # activate numlock (set in .xinitrc) + - dunst + - udiskie # automount external drives (set in .xinitrc) + - xmlstarlet # for clitip + - pandoc # for clitip + when: ansible_distribution == 'Debian' + +- name: Update pkgfile for Archlinux + become: true + command: pkgfile -u + when: ansible_distribution == 'Archlinux'