initial commit
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
.vscode
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
[defaults]
|
||||||
|
roles_path = roles
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/zfs load-key zwembad/pandorica
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[cloudia]
|
||||||
|
192.168.122.117 ansible_user=juulk
|
||||||
|
158.101.219.42 ansible_user=juulk ansible_ssh_private_key_file="/home/juulk/.ssh/juulk@oracle"
|
||||||
|
|
||||||
|
[replica]
|
||||||
|
192.168.122.109 ansible_user=juulk
|
||||||
|
|
||||||
|
[debian]
|
||||||
|
192.168.122.4
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
- name: Initialize JuulFlixPlus
|
||||||
|
hosts: debian
|
||||||
|
become: yes
|
||||||
|
roles:
|
||||||
|
- apt-upgrade
|
||||||
|
- install-packages
|
||||||
|
- install-zfs
|
||||||
|
- install-docker
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
- name: setup zfs
|
||||||
|
hosts: debian
|
||||||
|
become: yes
|
||||||
|
roles:
|
||||||
|
- auto-mount-zfs
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
- name: Update apt cache
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
|
||||||
|
- name: Upgrade all packages
|
||||||
|
apt:
|
||||||
|
upgrade: dist
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
- name: Set keylocation for zfs
|
||||||
|
command: zfs set keylocation=file:///root/zfskey zwembad/pandorica
|
||||||
|
|
||||||
|
- name: Create service for loading key
|
||||||
|
copy:
|
||||||
|
src: ../files/load-zfs-key.service
|
||||||
|
dest: /etc/systemd/system/load-zfs-key.service
|
||||||
|
notify: reload systemd
|
||||||
|
|
||||||
|
- name: Enable and start service for key loading
|
||||||
|
systemd:
|
||||||
|
name: load-zfs-key.service
|
||||||
|
enabled: yes
|
||||||
|
state: started
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
- name: Adding Docker GPG apt Key
|
||||||
|
apt_key:
|
||||||
|
url: https://download.docker.com/linux/ubuntu/gpg
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Adding Docker Repository
|
||||||
|
apt_repository:
|
||||||
|
repo: deb https://download.docker.com/linux/ubuntu focal stable
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Updating apt and installing docker-ce
|
||||||
|
apt:
|
||||||
|
name: docker-ce
|
||||||
|
state: latest
|
||||||
|
update_cache: true
|
||||||
|
|
||||||
|
- name: Ensuring docker group exists
|
||||||
|
group:
|
||||||
|
name: docker
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Add user to docker group
|
||||||
|
user:
|
||||||
|
name: juulk
|
||||||
|
groups: docker
|
||||||
|
append: yes
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
- name: Installing all required software
|
||||||
|
apt:
|
||||||
|
pkg:
|
||||||
|
- curl
|
||||||
|
- gnupg
|
||||||
|
- htop
|
||||||
|
- less
|
||||||
|
- mktorrent
|
||||||
|
- p7zip-full
|
||||||
|
- powertop
|
||||||
|
- samba
|
||||||
|
- tree
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
- name: Enable contrib repo
|
||||||
|
command: sed -r -i'.BAK' 's/^deb(.*)$/deb\1 contrib/g' /etc/apt/sources.list
|
||||||
|
|
||||||
|
- name: Install zfs
|
||||||
|
apt:
|
||||||
|
pkg:
|
||||||
|
- zfsutils-linux
|
||||||
|
- zfs-dkms
|
||||||
|
- zfs-zed
|
||||||
|
update_cache: true
|
||||||
|
|
||||||
|
- name: Load zfs modules
|
||||||
|
modprobe:
|
||||||
|
name: zfs
|
||||||
|
state: present
|
||||||
Reference in New Issue
Block a user