Commit 57bba7ab authored by PizZaKatZe's avatar PizZaKatZe
Browse files

Import skeleton from HaSi repo

parent c327f2dd
.vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "generic/debian10"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
machines = {
jitsi: "10.0.1.4",
}
config.vm.define "jitsi" do |machine|
# Provider-specific configuration
# https://www.vagrantup.com/docs/virtualbox/configuration.html
machine.vm.provider :virtualbox do |virtualbox|
virtualbox.name = "cmkritiss::jitsi"
end
machine.vm.network "public_network", bridge: "enp5s0", netmask: 8, ip: machines[:jitsi]
# Enable provisioning with Ansible.
# https://www.vagrantup.com/docs/provisioning/ansible.html
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "jitsi.yml"
ansible.limit = ["jitsi"]
ansible.skip_tags = ["acme"]
ansible.host_vars = {
jitsi: {
addr: machines[:jitsi],
},
}
end
end
end
# vim: et sw=2 ts=2
---
ansible_python_interpreter: /usr/bin/python3
addr: "{{ ansible_host }}"
fqdn: "{{ subdomain }}.{{ domain }}"
# vim: et sw=2 ts=2
---
domain: cyber4edu.org
hostname: jitsi
subdomain: meet
# vim: et sw=2 ts=2
---
- hosts: jitsi
become: yes
roles:
- common
# Role: Common
This role installs commonly used software, and performs basic system configuration:
* `apt distupgrade`
* `apt install neovim sudo`
* Sets the hostname and updates `/etc/hosts` accordingly (convenience for Vagrant boxes)
* Sets Digitalcourage's DNS server in `/etc/resolv.conf`
* Installs missing SSH public keys for `root`
## Requirements
* Debian machine
* SSH server
* readily configured `authorized_keys` for `root`
* `python-minimal` installed
---
# defaults file for common
\ No newline at end of file
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCvRX19vuhMhCoR4oy3guSh/0Ki4aEPCGdCTdye1hN8mJLq+62yqOL38XwxfDai/YFp8lQ5TQWrOHklKKvEurST/3wYUNgQyBBIjB6Y7P4yTT2uLkxVGRv0jEXmXFsiWF1JKX/oC9fSjZ/FLIDCYYQa8yz6I+jtFZaLtK1/RqisNTHRp+jyUbiek36Hvpruk/xbH57/9elf0EAV5706EOnJJQocawBG5Pp+oHNbvRFnYdUa6aAm7wiBMZP1boBA5ifYOAj33z3yNXOeCJ5E3vDNLmr/Hu5n1WiWrSCa7r3PFJjqEW1UkozvMFCy0K2tV4CF/M8U4MCTnHaAL90tGPex pizzakatze@desktop
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDlKZ4HnMQRFuUVlbp9kbPVgtsTDd0DAXmeRdNO6pfLFFOJeWf7QCwTDbvfqxc8Han+JwYPVNV0HiNuCGIo7fhiQk3CTIrjOm60+6ADivHaZ6uQ0gjZRtw5HUATC6tcrPDsyLbiaAtqbjlwpk1SmXxmCRhxz0yI56XPS45w+9uyJAGgR8VKqMpltfp35519phQyVdsPnMLOicYKfu3loRHWdM7tpcCMCShmXQ9iWOtP7+Sd/eyazOnBYXG+pKhy+xd3/ChwH3TQ8Hpv7E5rHyDo6KWSuLkoSFhwbX0q8eoZpWPMMAzsAIWlgtb2g+wJl9bg/sROG6AicIbAyOKke9Nt pizzakatze@laptop
nameserver 46.182.19.48
---
# handlers file for common
#- name: Reset connection
# meta: reset_connection
- name: Refresh facts
setup:
---
- name: Distupgrade
apt:
update_cache: yes
upgrade: dist
autoremove: yes
autoclean: yes
- name: Install common software
apt:
pkg:
- neovim
- sudo
- software-properties-common # Enables gathering ansible_lsb facts
notify: Refresh facts
- name: Set hostname
hostname:
name: '{{ hostname }}'
- name: Update /etc/hosts
replace:
path: /etc/hosts
regexp: '(\s+)debian$'
replace: '\1{{hostname}}'
- name: Configure DNS
copy:
src: resolv.conf
dest: /etc/resolv.conf
owner: root
group: root
mode: 0644
- name: Install SSH keys
authorized_key:
user: root
key: '{{ item }}'
with_file:
- files/id_rsa.pub-pizzakatze.desktop
- files/id_rsa.pub-pizzakatze.laptop
# Re-gather facts if software-properties-common was installed or updated
- meta: flush_handlers
---
# vars file for common
\ No newline at end of file
# vim: et sw=2 ts=2
---
- import_playbook: jitsi.yml
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment