- hosts: - adc_mcn1 - adc_mcn2 - adc_mcn3 remote_user: root tasks: - name: "uninstall tfe: stop tfe service" systemd: name: "{{ item }}" state: stopped enabled: no with_items: - tfe.service - name: "uninstall tfe: stop tfe-env service" systemd: name: "{{ item }}" state: stopped enabled: no with_items: - tfe-env.service - name: "uninstall tfe: delete memory.conf" file: path: "{{ item }}" state: absent with_items: - /etc/systemd/system/tfe.service.d/require-mrzcpd.conf - name: "uninstall tfe: uninstall tfe rpm package" yum: name: tfe state: absent