Upgrade to Debian 12, with minor updates

- Upgraded project to Debian 12
- .vscode added to .gitignore
- LICENSE formatting updated
- Copyright refreshed for 2023
- Added Libvirt settings
- Refactored packages to inventory-specific
- Committed missing autostart-scripts
This commit is contained in:
Kris Lamoureux 2023-06-13 01:04:39 -04:00
parent 8228b78c4c
commit b3e232451c
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925
11 changed files with 102 additions and 37 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
.vagrant
.vscode

13
LICENSE
View File

@ -1,5 +1,12 @@
Copyright (C) 2021 by Kris Lamoureux <kris@lamoureux.io>
Copyright (C) 2021, 2023 by Kris Lamoureux <kris@lamoureux.io>
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@ -4,6 +4,6 @@ An Ansible project for provisioning and managing a Debian GNU/Linux productivity
- The vagrant user's password is: `password`
#### Copyrights and Licenses
Copyright 2021 Kris Lamoureux
Copyright 2021, 2023 Kris Lamoureux
This project is licensed under the 0BSD license, a public-domain-equivalent license. Please refer to the LICENSE file contained in the repository.

8
Vagrantfile vendored
View File

@ -1,8 +1,14 @@
Vagrant.configure("2") do |config|
config.vm.box = "debian/bullseye64"
config.vm.box = "debian/bookworm64"
config.vm.network "private_network", type: "dhcp"
config.vm.synced_folder ".", "/vagrant", disabled: true
# Libvrit settings
config.vm.provider :libvirt do |domain|
domain.memory = 4096
domain.cpus = 2
end
# Boot with a GUI in VirtualBox
config.vm.provider "virtualbox" do |vbox|
vbox.customize ["modifyvm", :id, "--vram", "128",

View File

@ -1,11 +1,28 @@
# Settings convenient for development in vagrant
development: true
packages:
# GUI applications
- firefox-esr
- terminator
- remmina
# Virtualization
- qemu-system
- vagrant-libvirt
- libvirt-daemon-system
users:
- name: vagrant
groups:
- libvirt
favorites:
- firefox-esr.desktop
- terminator.desktop
- org.kde.dolphin.desktop
- org.remmina.Remmina.desktop
pinned:
- firefox-esr.desktop
- terminator.desktop

View File

@ -1,8 +1,9 @@
homedir: "/home/{{ item.name }}"
# Follows homelab package list:
# https://github.com/krislamo/moxie/blob/master/roles/base/defaults/main.yml
moxie_packages:
# https://github.com/krislamo/homelab/blob/main/roles/base/defaults/main.yml#L5
homelab_packages:
- apache2-utils
- cryptsetup
- curl
- dnsutils
@ -19,8 +20,4 @@ moxie_packages:
- wget
packages:
- "{{ moxie_packages }}"
- firefox-esr
- meld
- remmina
- terminator
- "{{ homelab_packages }}"

View File

@ -1,24 +1,6 @@
- name: Set vagrant user password
user:
ansible.builtin.user:
name: vagrant
password: "$6$xu0I8bbf.Nva7uCo$OHz5/64u0SjHa1jn0EwCLSNw7Zoj5ejhL\
6NtaXYY6zlC0CQa0J4kZIxAp2Ls4lMdLmuo7oMQX/vlDucR9BbcA."
- name: Install fasttrack archive keyring
apt:
name: fasttrack-archive-keyring
state: present
update_cache: true
- name: Enable fasttrack
copy:
dest: /etc/apt/sources.list.d/fasttrack.list
content: |
deb https://fasttrack.debian.net/debian-fasttrack/ bullseye-fasttrack main contrib
deb https://fasttrack.debian.net/debian-fasttrack/ bullseye-backports-staging main contrib
- name: Install guest additions
apt:
name: virtualbox-guest-x11
state: present
update_cache: true

View File

@ -1,5 +1,5 @@
- name: Install KDE
apt:
ansible.builtin.apt:
name: kde-standard
state: present
update_cache: true
@ -24,18 +24,33 @@
loop: "{{ users }}"
- name: Install packages
apt:
ansible.builtin.apt:
name: "{{ item }}"
loop: "{{ packages }}"
- name: Install sqlite3
apt:
ansible.builtin.apt:
name: sqlite3
state: present
- name: Change favorites menu
template:
ansible.builtin.template:
src: favorites.sh.j2
dest: "{{ homedir }}/.config/autostart-scripts/favorites.sh"
mode: a+x
loop: "{{ users }}"
- name: Change task manager pinned apps
ansible.builtin.template:
src: pinnedapps.sh.j2
dest: "{{ homedir }}/.config/autostart-scripts/pinnedapps.sh"
mode: a+x
loop: "{{ users }}"
- name: Ensure we have our own comment added to /etc/services
ansible.builtin.lineinfile:
path: "{{ homedir }}/.config/autostart-scripts/pinnedapps.sh"
regexp: '^# port for http'
insertbefore: '^www.*80/tcp'
line: '# port for http by default'
loop: "{{ users }}"

View File

@ -1,6 +1,12 @@
- import_tasks: development.yml
- name: Import development vagrant tasks
ansible.builtin.import_tasks: development.yml
tags: development
when: development
- import_tasks: gui.yml
- name: Import system tasks
ansible.builtin.import_tasks: system.yml
tags: system
- name: Import GUI tasks
ansible.builtin.import_tasks: gui.yml
tags: gui

View File

@ -0,0 +1,23 @@
- name: Install software
ansible.builtin.apt:
name: "{{ packages }}"
state: present
update_cache: true
- name: Create system users
ansible.builtin.user:
name: "{{ item.name }}"
state: present
groups: "{{ item.groups }}"
append: yes
shell: "{{ item.shell | default('/bin/bash') }}"
create_home: "{{ item.home | default(false) }}"
loop: "{{ users }}"
when: users is defined
- name: Change favorites menu
ansible.builtin.template:
src: favorites.sh.j2
dest: "{{ homedir }}/.config/autostart-scripts/favorites.sh"
mode: a+x
loop: "{{ users }}"

View File

@ -0,0 +1,11 @@
#!/bin/bash
PINNED="{% for item in pinned %}{{ item }}{{ ',' if not loop.last else '' }}{% endfor %}"
FILE="~/.config/plasma-org.kde.plasma.desktop-appletsrc"
HEADER="[Containments][2][Applets][5][Configuration][General]"
SECTIONUNDER="[Containments][2][Applets][6]"
if [ -f "$FILE" ]; then
if ! grep -q "$PINNED" "$FILE"; then
sed -i "/^$HEADER\nlaunchers=.*/i\n\n$SECTIONUNDER" "$FILE"
fi
fi