Score:0

failing to switch selinux to permissive mode with ansible TASK

de flag
  • I fail with an Ansible playbook installing postgresql on a centos7 target due to some permission problem which seems to be rooted in selinunx in some way.
  • As I have no experience with selinx whatsoever and am in process to learn ansible atm I want to get around this first without touching the question whether this is ideal or not from a selinux perspective.

So, I try to set selinux to permissive on a centos7 target with this TASK (syntax almost 1:1 from the Ansible docs

- name: Put SELinux in permissive mode, logging actions that would be blocked.
  selinux:
    policy: targeted
    state: permissive
  become: yes

this fails however with a 'permission denied' error which I can not make much sense of.

  • libselinux-python (required for the selinux module) exists on the target, if anybody was wondering

can somebody kindly push me into the right direction on how to get this over with?


question on the side: references like File "/tmp/ansible_selinux_payload_BdFrwe/ansible_selinux_payload.zip/ansible/modules/system/selinux.py", line 266, in <module> from the error mesage refer to the target, not the Ansible controller, right?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.