commit bf9aee20041c9569e392ffe4ef6189cebe47dd7d Author: Kris Lamoureux Date: Sat Nov 27 00:53:58 2021 -0500 Debian workstation project with guest additions diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8000dd9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vagrant diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7dc2ff9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,5 @@ +Copyright (C) 2021 by Kris Lamoureux + +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. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..c401e37 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# workstation +An Ansible project for provisioning and managing a Debian GNU/Linux productivity workstation + +- The vagrant user's password is: `password` + +#### Copyrights and Licenses +Copyright 2021 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. diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..84418c4 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,20 @@ +Vagrant.configure("2") do |config| + config.vm.box = "debian/bullseye64" + config.vm.network "private_network", type: "dhcp" + config.vm.synced_folder ".", "/vagrant", disabled: true + + # Boot with a GUI in VirtualBox + config.vm.provider "virtualbox" do |vbox| + vbox.customize ["modifyvm", :id, "--vram", "128"] + vbox.memory = 4096 + vbox.cpus = 2 + vbox.gui = true + end + + # Provision with Ansible + config.vm.provision "ansible" do |ansible| + ENV['ANSIBLE_ROLES_PATH'] = File.dirname(__FILE__) + "/roles" + ansible.compatibility_mode = "2.0" + ansible.playbook = "site-vagrant.yml" + end +end diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..5d514b6 --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,2 @@ +[defaults] +interpreter_python = /usr/bin/python3 diff --git a/inventory.yml b/inventory.yml new file mode 100644 index 0000000..d345575 --- /dev/null +++ b/inventory.yml @@ -0,0 +1,2 @@ +# Settings convenient for development in vagrant +development: true diff --git a/roles/common/tasks/development.yml b/roles/common/tasks/development.yml new file mode 100644 index 0000000..ca18c63 --- /dev/null +++ b/roles/common/tasks/development.yml @@ -0,0 +1,23 @@ +- name: Set vagrant user password + user: + name: vagrant + password: "$6$xu0I8bbf.Nva7uCo$OHz5/64u0SjHa1jn0EwCLSNw7Zoj5ejhL\ + 6NtaXYY6zlC0CQa0J4kZIxAp2Ls4lMdLmuo7oMQX/vlDucR9BbcA." + +- name: Install fasttrack archive keyring + apt: + name: fasttrack-archive-keyring + state: present + +- 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 diff --git a/roles/common/tasks/gui.yml b/roles/common/tasks/gui.yml new file mode 100644 index 0000000..dab65d4 --- /dev/null +++ b/roles/common/tasks/gui.yml @@ -0,0 +1,5 @@ +- name: Install KDE + apt: + name: kde-standard + state: present + update_cache: true diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml new file mode 100644 index 0000000..f6a1e29 --- /dev/null +++ b/roles/common/tasks/main.yml @@ -0,0 +1,6 @@ +- import_tasks: development.yml + tags: development + when: development + +- import_tasks: gui.yml + tags: gui diff --git a/site-vagrant.yml b/site-vagrant.yml new file mode 100644 index 0000000..59939f1 --- /dev/null +++ b/site-vagrant.yml @@ -0,0 +1,7 @@ +- name: Install Workstation + hosts: all + become: true + vars_files: + - inventory.yml + roles: + - common