---
- name: Set selinux permissive
  selinux:
    policy=targeted
    state=permissive
---
- name: Detect /etc/selinux/config exists
  stat: path=/etc/selinux/config
  register: selinux_config

- name: Set selinux permissive
  selinux:
    policy=targeted
    state=permissive
  when: selinux_config.stat.exists

Change selinux policy only when /etc/selinux/config exists
Change selinux policy only when /etc/selinux/config exists
