change permissions of data libvirt volume pool

This commit is contained in:
Pim Kunis 2023-04-11 17:09:24 +02:00
parent d706a80721
commit 82ce487559
3 changed files with 25 additions and 0 deletions

View file

@ -37,6 +37,10 @@ resource "libvirt_pool" "data" {
name = "data" name = "data"
type = "dir" type = "dir"
path = "/kvm/data" path = "/kvm/data"
xml {
xslt = file("set_volume_pool_mode_open.xsl")
}
} }
resource "libvirt_volume" "ubuntu_jammy" { resource "libvirt_volume" "ubuntu_jammy" {

View file

@ -0,0 +1,19 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="/pool/target">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
<permissions>
<mode>0755</mode>
</permissions>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

View file

@ -4,3 +4,5 @@ Match User lewis
AuthorizedPrincipalsFile /etc/ssh/lewis_principals AuthorizedPrincipalsFile /etc/ssh/lewis_principals
ChrootDirectory /kvm/data ChrootDirectory /kvm/data
ForceCommand internal-sftp ForceCommand internal-sftp
AllowTcpForwarding no
X11Forwarding no