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
.vagrant_settings .vagrant_settings
.vscode .vscode

2
Vagrantfile vendored
View File

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

View File

@ -21,12 +21,15 @@ users:
groups: groups:
- libvirt - libvirt
favorites: #manage_gui: true
- firefox-esr.desktop
- terminator.desktop
- org.kde.dolphin.desktop
- org.remmina.Remmina.desktop
pinned: #darkmode: true
- firefox-esr.desktop #favorites:
- terminator.desktop # - 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 }}" homedir: "/home/{{ item.name }}"
# Follows homelab package list: # 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: homelab_packages:
- apache2-utils - apache2-utils
- cryptsetup - cryptsetup
@ -19,5 +21,6 @@ homelab_packages:
- vim - vim
- wget - wget
manage_gui: false
packages: packages:
- "{{ homelab_packages }}" - "{{ homelab_packages }}"

View File

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

View File

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

View File

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

5
workstation.yml Normal file
View File

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