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

samba.setup: Run cephfs.vfs integration with SELinux booleans #80

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions playbooks/ansible/roles/samba.setup/tasks/cephfs/centos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
- name: Install python3-libsemanage. This is needed for the seboolean ansible command
yum: name=python3-libsemanage state=present
20 changes: 15 additions & 5 deletions playbooks/ansible/roles/samba.setup/tasks/cephfs/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,26 @@
- name: Prepare CephFS VFS support
when: config.be.variant == 'vfs'
block:
- name: Process OS specific tasks
include_tasks: "{{ include_file }}"
with_first_found:
- files: "{{ config.os[config.nodes[inventory_hostname].os].includes }}"
loop_control:
loop_var: include_file

- name: SELinux - Allow Samba to do tcp socket operations
seboolean:
# Name of the boolean is misleading in this context.
# https://github.com/samba-in-kubernetes/sit-environment/issues/79
name: samba_load_libgfapi
state: yes
persistent: yes

- name: Install CephFS VFS module
yum:
name: samba-vfs-cephfs
state: present

- name: Set selinux in permissive mode
selinux:
policy: targeted
state: permissive

- name: Skip check of share path
lineinfile:
path: "{{ config.paths.ctdb.etc }}/events/legacy/50.samba.options"
Expand Down
Loading