- name: Install epel-release yum: name: epel-release # there is a bug (rhbz#1261747) where systemd can fail to enable # services due to selinux errors after upgrade. A work-around is # to install the latest version of selinux and systemd here and # restart the daemon for good measure after it is upgraded. - name: Install latest selinux-policy and systemd yum: name: "{{ package_item }}" state: latest loop: - selinux-policy - systemd loop_control: loop_var: package_item register: systemd_updated - name: Restart systemd systemd: daemon_reload: yes when: systemd_updated is changed