diff --git a/roles/set_semaphore_count/tasks/main.yml b/roles/set_semaphore_count/tasks/main.yml
index 625791e95112818fdc98a9b43d76b2e93c86ed32..1e2321d48254e1944813d6d7e56041d39ae85ac2 100644
--- a/roles/set_semaphore_count/tasks/main.yml
+++ b/roles/set_semaphore_count/tasks/main.yml
@@ -3,8 +3,10 @@
   set_fact:
        SEM_COUNT: "500\t256000\t64\t10240"
   when: SEM_COUNT is not defined
+  
 - name: test value
   debug: msg="Value of semaphores is {{ SEM_COUNT }} "  #"
+  
 - name: Place comment line in file
   lineinfile: 
      path: /etc/sysctl.d/88-setSemaphore.conf
@@ -45,6 +47,7 @@
   register: current_sem
   changed_when: current_sem.stdout not in "{{ SEM_COUNT }}"
   check_mode: no
+  when: ansible_os_family == 'RedHat'
 
 #- debug:
 #    var: current_sem