Templates and SELinux contect types

Hi,

I've got a bit of a problem using SELInux context types with Ansible.

When I use a template, the SELinux context type is not correctly
applied and i want to restore it to the context in the policy.
If I look at the documentation of the file module I see that you can
use "context" for this. I tried this with using both file and template
( i believe template can use the file module's options?)

But I get this error

"msg: unsupported parameter for module: context"

This is the part from the tasks yaml in the role

file: path="/etc/openldap/slapd.d/cn=config/olcDatabase={2}bdb.ldif"
context=default

Regards,
Vincent

Thanks for the heads up, if this is on Ansible 1.2, please file a bug with steps to reproduce and I’ll take a look at reproducing this.

Hi

I'm going to check again later on because I forgot to install
policycoreutils on the host so all SELinux related actions had no
result.
But I'm not sure this error is related.

Vincent

Yeah, it shouldn’t be that they had no result in that case, but rather that you should get an error when you try to use those options.

(Please file a ticket on that…)