Skip to content

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

Description

@jameskirsop

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions