--- - hosts: active_defence tasks: - name: "stop sapp service" service: name: sapp state: stopped ignore_errors: yes when: install_sapp | bool - name: "stop houyi service" service: name: houyi state: stopped ignore_errors: yes - name: "uninstall houyi" yum: name: "houyi" state: absent - name: "uninstall houyi-common-tools" yum: name: "houyi-common-tools" state: absent - name: "uninstall houyi-plug" yum: name: "houyi-plug" state: absent - name: "uninstall wire-graft" yum: name: "wire-graft" state: absent - name: "uninstall sapp" yum: name: "sapp" state: absent when: install_sapp | bool - name: "uninstall net_flood" yum: name: "net_flood" state: absent