Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set SELinux options on the File (Folder) generated by pyvenv #600

Open
jameskirsop opened this issue Mar 8, 2021 · 1 comment
Open

Set SELinux options on the File (Folder) generated by pyvenv #600

jameskirsop opened this issue Mar 8, 2021 · 1 comment

Comments

@jameskirsop
Copy link

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.

@jameskirsop
Copy link
Author

@bastelfreak, does the above suggestion make sense?? I'm running into this limitation quite frequently now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant