Compare commits

..

5 Commits
tmp ... main

Author SHA1 Message Date
58e2f5f850
Add a way to exclude custom inventory 2023-07-18 01:37:58 -04:00
8e28830c16
Slight reorganization for development 2023-07-18 01:29:21 -04:00
f34dd35d5c
Update homelab package list reference 2023-07-11 03:16:43 -04:00
e21eb854d7
Set options for fragile GUI automation 2023-07-11 03:13:43 -04:00
d9608d2d1b
Install provisioning tools in the VM
- Added --diff flag
- Installed virt-manager and ansible
- Removed duplicate software install task
- Removed irrelevant GUI task
2023-07-11 02:28:23 -04:00
9 changed files with 33 additions and 20 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
environments
inventories
.vagrant
.vagrant_settings
.vscode

4
Vagrantfile vendored
View File

@ -45,7 +45,7 @@ Vagrant.configure("2") do |config|
config.vm.provision "ansible" do |ansible|
ENV['ANSIBLE_ROLES_PATH'] = File.dirname(__FILE__) + "/roles"
ansible.compatibility_mode = "2.0"
ansible.playbook = "site-vagrant.yml"
ansible.raw_arguments = ["--diff"]
ansible.playbook = "dev/workstation.yml"
ansible.raw_arguments = ["--diff"]
end
end

View File

@ -21,12 +21,15 @@ users:
groups:
- libvirt
favorites:
- firefox-esr.desktop
- terminator.desktop
- org.kde.dolphin.desktop
- org.remmina.Remmina.desktop
#manage_gui: true
pinned:
- firefox-esr.desktop
- terminator.desktop
#darkmode: true
#favorites:
# - firefox-esr.desktop
# - terminator.desktop
# - org.kde.dolphin.desktop
# - org.remmina.Remmina.desktop
#pinned:
# - firefox-esr.desktop
# - terminator.desktop

View File

@ -1,7 +1,9 @@
darkmode: false
development: false
homedir: "/home/{{ item.name }}"
# Follows homelab package list:
# https://github.com/krislamo/homelab/blob/main/roles/base/defaults/main.yml#L5
# https://git.krislamo.org/kris/homelab/src/branch/main/roles/base/defaults/main.yml#L6
homelab_packages:
- apache2-utils
- cryptsetup
@ -19,5 +21,6 @@ homelab_packages:
- vim
- wget
manage_gui: false
packages:
- "{{ homelab_packages }}"

View File

@ -3,4 +3,3 @@
name: vagrant
password: "$6$xu0I8bbf.Nva7uCo$OHz5/64u0SjHa1jn0EwCLSNw7Zoj5ejhL\
6NtaXYY6zlC0CQa0J4kZIxAp2Ls4lMdLmuo7oMQX/vlDucR9BbcA."

View File

@ -5,15 +5,17 @@
update_cache: true
- name: Create autostart-scripts directory
file:
ansible.builtin.file:
path: "{{ homedir }}/.config/autostart-scripts/"
state: directory
owner: "{{ item.name }}"
group: "{{ item.name }}"
mode: 0700
loop: "{{ users }}"
when: manage_gui
- name: Enable KDE dark theme
copy:
ansible.builtin.copy:
dest: "{{ homedir }}/.config/autostart-scripts/darkmode.sh"
mode: a+x
content: |
@ -22,16 +24,13 @@
lookandfeeltool -a $(lookandfeeltool --list | grep dark)
fi
loop: "{{ users }}"
- name: Install packages
ansible.builtin.apt:
name: "{{ item }}"
loop: "{{ packages }}"
when: manage_gui and darkmode
- name: Install sqlite3
ansible.builtin.apt:
name: sqlite3
state: present
when: manage_gui and favorites is defined or pinned is defined
- name: Change favorites menu
ansible.builtin.template:
@ -39,6 +38,7 @@
dest: "{{ homedir }}/.config/autostart-scripts/favorites.sh"
mode: a+x
loop: "{{ users }}"
when: manage_gui and favorites is defined
- name: Change task manager pinned apps
ansible.builtin.template:
@ -46,3 +46,4 @@
dest: "{{ homedir }}/.config/autostart-scripts/pinnedapps.sh"
mode: a+x
loop: "{{ users }}"
when: manage_gui and pinned is defined

View File

@ -9,7 +9,7 @@
name: "{{ item.name }}"
state: present
groups: "{{ item.groups }}"
append: yes
append: true
shell: "{{ item.shell | default('/bin/bash') }}"
create_home: "{{ item.home | default(false) }}"
loop: "{{ users }}"

5
workstation.yml Normal file
View File

@ -0,0 +1,5 @@
- name: Install Workstation
hosts: localhost
become: true
roles:
- common