puppet-python
puppet-python copied to clipboard
Set SELinux options on the File (Folder) generated by pyvenv
trafficstars
I'd like to be able to set the SELinux type on my virtualenv, but if I declare a second file directive to do this, I get a redeclare error on the next puppet run.
For example:
file {'externalapi_venv':
recurse => true,
path => '/var/www/externalapi/venv',
seltype => 'httpd_sys_content_rw_t',
}
python::pyvenv { '/var/www/externalapi' :
ensure => present,
version => '38',
systempkgs => true,
venv_dir => '/var/www/externalapi/venv',
owner => 'jkirsop',
require => Vcsrepo['/var/www/externalapi/code'],
}
I'm not aware of a way of setting the seltype in a 'clean' way other than doing so through the file class, and so having the ability to do this within the pyvenv class (and then have it filter down to the file class) seems like the most obvious way to me.
@bastelfreak, does the above suggestion make sense?? I'm running into this limitation quite frequently now...