From 10c5ded08841410ed5af538571f0f161f274fcf1 Mon Sep 17 00:00:00 2001 From: earnest ma Date: Wed, 26 Jan 2022 15:17:18 -0500 Subject: [PATCH] Implement almost everything from dotfiles/bootstrap.sh Missing: - Flatpak adding remotes - Spotify --- ensure.sh | 4 + roles/common/tasks/hosts/ataraxia.yml | 1 - roles/common/tasks/main.yml | 4 +- roles/common/tasks/packages.yml | 75 +++++++++++++++---- roles/common/tasks/packages/google-chrome.yml | 14 ++++ roles/common/tasks/packages/vscodium.yml | 14 ++++ roles/common/tasks/users.yml | 8 +- 7 files changed, 101 insertions(+), 19 deletions(-) create mode 100755 ensure.sh delete mode 100644 roles/common/tasks/hosts/ataraxia.yml create mode 100644 roles/common/tasks/packages/google-chrome.yml create mode 100644 roles/common/tasks/packages/vscodium.yml diff --git a/ensure.sh b/ensure.sh new file mode 100755 index 0000000..a476319 --- /dev/null +++ b/ensure.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +sudo dnf install -yq --refresh python ansible +ansible-galaxy collection install ansible.posix +ansible-galaxy collection install community.general diff --git a/roles/common/tasks/hosts/ataraxia.yml b/roles/common/tasks/hosts/ataraxia.yml deleted file mode 100644 index 8b13789..0000000 --- a/roles/common/tasks/hosts/ataraxia.yml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 9429bd8..aa4e3ef 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -1,6 +1,6 @@ --- -- include_vars: - file: "{{ ansible_hostname }}.yml" +#- include_vars: +# file: "{{ ansible_hostname }}.yml" - include: selinux.yml - include: packages.yml - include: users.yml diff --git a/roles/common/tasks/packages.yml b/roles/common/tasks/packages.yml index 1e72191..018e91c 100644 --- a/roles/common/tasks/packages.yml +++ b/roles/common/tasks/packages.yml @@ -1,30 +1,75 @@ --- - -# - name: Configure repos +# Package management +# Essential packages: things that need to be available early +# Development packages +# Main packages - name: Install essential packages package: - name: "{{ packages }}" - state: latest - vars: - packages: + name: - htop + - util-linux-user - neovim - - remmina + - seahorse + - pinentry-gnome3 # kde, gpg - tmux - zsh + - xclip + # fonts + - jetbrains-mono-fonts-all + - fira-code-fonts + state: latest -# Hostname-specific package tasks -- include: hosts/{{ ansible_hostname }}.yml +# Configure repos that will need to be available +- name: Enable the RPM Fusion repository + dnf: + name: + - https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-{{ansible_distribution_major_version}}.noarch.rpm + - https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{ansible_distribution_major_version}}.noarch.rpm + disable_gpg_check: yes + state: present + +- name: Add repos for Google Chrome + import_tasks: packages/google-chrome.yml + +- name: Add repos for VSCodium + import_tasks: packages/vscodium.yml + +- name: Install development packages + package: + name: + - '@Development tools' + - aerc + - codium + - direnv + - exa + - fd-find + - fzf + - git + - git-email + - git-publish + - isync + - ripgrep + - ShellCheck + - stow + state: latest + +- name: Install main packages + package: + name: + - discord + - google-chrome-stable + - mpv + - nextcloud-client + - remmina + # gaming + - steam + - wine + - winetricks + state: latest - name: Install zoom - when: use_zoom | default(False) dnf: name: 'https://zoom.us/client/latest/zoom_x86_64.rpm' disable_gpg_check: true state: present - -#- name: Install hostname-specific packages -# package: -# name: "{{ extra_packages }}" -# state: latest diff --git a/roles/common/tasks/packages/google-chrome.yml b/roles/common/tasks/packages/google-chrome.yml new file mode 100644 index 0000000..92e0fc3 --- /dev/null +++ b/roles/common/tasks/packages/google-chrome.yml @@ -0,0 +1,14 @@ +--- +- name: Add signing key + rpm_key: + key: https://dl.google.com/linux/linux_signing_key.pub + state: present + +- name: Add repo into repo.d list + yum_repository: + name: google-chrome + description: google-chrome repository + baseurl: http://dl.google.com/linux/chrome/rpm/stable/x86_64 + enabled: true + gpgcheck: true + gpgkey: https://dl.google.com/linux/linux_signing_key.pub diff --git a/roles/common/tasks/packages/vscodium.yml b/roles/common/tasks/packages/vscodium.yml new file mode 100644 index 0000000..9241292 --- /dev/null +++ b/roles/common/tasks/packages/vscodium.yml @@ -0,0 +1,14 @@ +--- +- name: Add signing key + rpm_key: + key: https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg + state: present + +- name: Add repo into repo.d list + yum_repository: + name: vscodium + description: vscodium repository + baseurl: https://download.vscodium.com/rpms/ + enabled: true + gpgcheck: true + gpgkey: https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg diff --git a/roles/common/tasks/users.yml b/roles/common/tasks/users.yml index 8d1c8b6..7b08a3a 100644 --- a/roles/common/tasks/users.yml +++ b/roles/common/tasks/users.yml @@ -1 +1,7 @@ - +--- +- name: Configure user earne + user: + name: earne + comment: EMW + shell: /usr/bin/zsh + groups: earne,wheel