mount point for grail
This commit is contained in:
22
grail.tf
22
grail.tf
@@ -25,17 +25,27 @@ resource "proxmox_lxc" "grail" {
|
|||||||
mountpoint{
|
mountpoint{
|
||||||
key = "1"
|
key = "1"
|
||||||
slot = 1
|
slot = 1
|
||||||
storage = "watari"
|
# Dir on host
|
||||||
mp = "/data"
|
storage = "/omv/media"
|
||||||
size = "10T"
|
# volume is needed as a workaround for bug
|
||||||
|
volume = "/omv/media"
|
||||||
|
# mountpoint within container
|
||||||
|
mp = "/media"
|
||||||
|
# This is ignored as mount point is used. but must be defined
|
||||||
|
size = "10G"
|
||||||
}
|
}
|
||||||
|
|
||||||
mountpoint{
|
mountpoint{
|
||||||
key = "2"
|
key = "2"
|
||||||
slot = 2
|
slot = 2
|
||||||
storage = "watari"
|
# Dir on host
|
||||||
mp = "/downloads"
|
storage = "/omv/downloads"
|
||||||
size = "5T"
|
# volume is needed as a workaround for bug
|
||||||
|
volume = "/omv/downloads"
|
||||||
|
# mountpoint within container
|
||||||
|
mp = "/downloads"
|
||||||
|
# This is ignored as mount point is used. but must be defined
|
||||||
|
size = "10G"
|
||||||
}
|
}
|
||||||
|
|
||||||
network {
|
network {
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
# Enable and start OMV services
|
# Enable and start OMV services
|
||||||
- name: Enable OMV services
|
- name: Enable OMV services
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: openmediavault.service
|
name: openmediavault-engined.service
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
state: started
|
||||||
|
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Add tun device bind to container 218 on node1
|
|
||||||
hosts: 192.168.0.40
|
|
||||||
become: yes
|
|
||||||
vars:
|
|
||||||
config_file: "/etc/pve/lxc/218.conf"
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
- name: Ensure file exists
|
|
||||||
file:
|
|
||||||
path: "{{ config_file }}"
|
|
||||||
state: file
|
|
||||||
|
|
||||||
- name: Stop LXC container 218
|
|
||||||
shell: "pct stop 218"
|
|
||||||
register: stop_result
|
|
||||||
|
|
||||||
- name: Display stop result
|
|
||||||
debug:
|
|
||||||
var: stop_result
|
|
||||||
|
|
||||||
- name: Add idmap configurations
|
|
||||||
blockinfile:
|
|
||||||
path: "{{ config_file }}"
|
|
||||||
block: |
|
|
||||||
lxc.idmap: u 0 100000 1000
|
|
||||||
lxc.idmap: g 0 100000 1000
|
|
||||||
lxc.idmap: g 44 44 1
|
|
||||||
lxc.idmap: g 104 104 1
|
|
||||||
lxc.idmap: g 45 100045 57
|
|
||||||
lxc.idmap: g 104 100045 61
|
|
||||||
marker: "#{' ' * line_length}# ANSIBLE MANAGED BLOCK"
|
|
||||||
|
|
||||||
- name: Add mount entry for /dev/net
|
|
||||||
lineinfile:
|
|
||||||
path: "{{ config_file }}"
|
|
||||||
regexp: '^lxc\.mount\.entry:'
|
|
||||||
line: "lxc.mount.entry: /dev/net dev/net none bind,create=dir"
|
|
||||||
|
|
||||||
- name: Add cgroup2 devices allow
|
|
||||||
lineinfile:
|
|
||||||
path: "{{ config_file }}"
|
|
||||||
regexp: '^lxc\.cgroup2\.devices\.allow:'
|
|
||||||
line: "lxc.cgroup2.devices.allow: c 10:00 rwm"
|
|
||||||
|
|
||||||
- name: Add mount devices to allow gpu transcoding
|
|
||||||
lineinfile:
|
|
||||||
path: "{{ config_file }}"
|
|
||||||
regexp: '^lxc\.cgroup2\.devices\.allow:'
|
|
||||||
line: "lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir"
|
|
||||||
|
|
||||||
- name: Start LXC container 218
|
|
||||||
shell: "pct start 218"
|
|
||||||
register: start_result
|
|
||||||
|
|
||||||
- name: Display start result
|
|
||||||
debug:
|
|
||||||
var: start_result
|
|
||||||
Reference in New Issue
Block a user