Compare commits
No commits in common. "4b2158b03484ec6994ff910837c75204f4070e59" and "83522e7513a6c91b38999572e26283c6faf5c707" have entirely different histories.
4b2158b034
...
83522e7513
2 changed files with 4 additions and 6 deletions
|
|
@ -32,6 +32,3 @@
|
||||||
state: absent
|
state: absent
|
||||||
purge: true
|
purge: true
|
||||||
autoremove: true
|
autoremove: true
|
||||||
|
|
||||||
- name: Set VM permissions
|
|
||||||
ansible.builtin.command: chmod -R o+r /lmn/vm
|
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,8 @@ create_clone() {
|
||||||
|
|
||||||
create_printerlist() {
|
create_printerlist() {
|
||||||
## Prepare .printerlist.csv
|
## Prepare .printerlist.csv
|
||||||
|
mkdir -p "${VM_MEDIADIR}"
|
||||||
|
chgrp "$(id -g)" "${VM_MEDIADIR}"
|
||||||
echo "Name;IppURL" > "${VM_MEDIADIR}/.printerlist.csv"
|
echo "Name;IppURL" > "${VM_MEDIADIR}/.printerlist.csv"
|
||||||
for p in $(lpstat -v | cut -f 3 -d" " | sed 's/:$//'); do
|
for p in $(lpstat -v | cut -f 3 -d" " | sed 's/:$//'); do
|
||||||
echo "$p;ipp://192.168.122.1/printers/$p" >> "${VM_MEDIADIR}/.printerlist.csv"
|
echo "$p;ipp://192.168.122.1/printers/$p" >> "${VM_MEDIADIR}/.printerlist.csv"
|
||||||
|
|
@ -206,6 +208,7 @@ EOF
|
||||||
|
|
||||||
QEMU='qemu:///session'
|
QEMU='qemu:///session'
|
||||||
|
|
||||||
|
umask 077
|
||||||
|
|
||||||
NEWCLONE=0
|
NEWCLONE=0
|
||||||
PERSISTENT=0
|
PERSISTENT=0
|
||||||
|
|
@ -360,8 +363,6 @@ if ! virsh --connect="${QEMU}" list | grep "${VM_NAME}-clone"; then
|
||||||
else
|
else
|
||||||
VMINFO_DIR="/lmn/media/${USER}"
|
VMINFO_DIR="/lmn/media/${USER}"
|
||||||
fi
|
fi
|
||||||
mkdir -p "${VM_MEDIADIR}" -m 700
|
|
||||||
chgrp "$(id -g)" "${VM_MEDIADIR}"
|
|
||||||
create_printerlist
|
create_printerlist
|
||||||
create_mountlist
|
create_mountlist
|
||||||
|
|
||||||
|
|
@ -369,7 +370,7 @@ if ! virsh --connect="${QEMU}" list | grep "${VM_NAME}-clone"; then
|
||||||
[[ "${QEMU}" = 'qemu:///session' ]] && start_virtiofsd
|
[[ "${QEMU}" = 'qemu:///session' ]] && start_virtiofsd
|
||||||
|
|
||||||
# Create VMInfo Json file
|
# Create VMInfo Json file
|
||||||
#( umask 077; ./vm-create-vminfo > "${VMINFO_DIR}/.vminfo.json" )
|
#( umask 027; ./vm-create-vminfo > "${VMINFO_DIR}/.vminfo.json" )
|
||||||
# Start vminfo.timer
|
# Start vminfo.timer
|
||||||
systemctl --user restart vminfo.timer
|
systemctl --user restart vminfo.timer
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue