Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
58e2f5f850 | |||
8e28830c16 | |||
f34dd35d5c | |||
e21eb854d7 | |||
d9608d2d1b |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
|||||||
|
environments
|
||||||
|
inventories
|
||||||
.vagrant
|
.vagrant
|
||||||
.vagrant_settings
|
.vagrant_settings
|
||||||
.vscode
|
.vscode
|
||||||
|
3
Vagrantfile
vendored
3
Vagrantfile
vendored
@ -45,6 +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"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -9,20 +9,27 @@ packages:
|
|||||||
|
|
||||||
# Virtualization
|
# Virtualization
|
||||||
- qemu-system
|
- qemu-system
|
||||||
- vagrant-libvirt
|
|
||||||
- libvirt-daemon-system
|
- libvirt-daemon-system
|
||||||
|
- vagrant-libvirt
|
||||||
|
- virt-manager
|
||||||
|
|
||||||
|
# Configuration management
|
||||||
|
- ansible
|
||||||
|
|
||||||
users:
|
users:
|
||||||
- name: vagrant
|
- name: vagrant
|
||||||
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
|
@ -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 }}"
|
||||||
|
@ -3,4 +3,3 @@
|
|||||||
name: vagrant
|
name: vagrant
|
||||||
password: "$6$xu0I8bbf.Nva7uCo$OHz5/64u0SjHa1jn0EwCLSNw7Zoj5ejhL\
|
password: "$6$xu0I8bbf.Nva7uCo$OHz5/64u0SjHa1jn0EwCLSNw7Zoj5ejhL\
|
||||||
6NtaXYY6zlC0CQa0J4kZIxAp2Ls4lMdLmuo7oMQX/vlDucR9BbcA."
|
6NtaXYY6zlC0CQa0J4kZIxAp2Ls4lMdLmuo7oMQX/vlDucR9BbcA."
|
||||||
|
|
||||||
|
@ -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,11 +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
|
||||||
- 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 }}"
|
|
||||||
|
@ -9,15 +9,8 @@
|
|||||||
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 }}"
|
||||||
when: users is defined
|
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 }}"
|
|
5
workstation.yml
Normal file
5
workstation.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
- name: Install Workstation
|
||||||
|
hosts: localhost
|
||||||
|
become: true
|
||||||
|
roles:
|
||||||
|
- common
|
Loading…
Reference in New Issue
Block a user