---
- name: Update Packages
  yum:
    name: '*'
    state: latest

- name: Check for Reboot Required
  shell: needs-restarting -r
  register: needs_restarting
  failed_when: needs_restarting.rc not in [0,1]
  changed_when: needs_restarting.rc == 1
  notify:
    - Reboot
    - Wait for Reboot


---
- name: Update Packages
  yum:
    name: '*'
    state: latest
    exclude: 'freeswitch*,kamailio*'

- name: Check for Reboot Required
  shell: needs-restarting -r
  register: needs_restarting
  failed_when: needs_restarting.rc not in [0,1]
  changed_when: needs_restarting.rc == 1
  notify:
    - Reboot
    - Wait for Reboot


Remove Kamailio/Freeswitch from OS-level updates
Remove Kamailio/Freeswitch from OS-level updates
