Ansible Message Output based on task result
问题 Is it possible in Ansible to display different messages based on a result of the task? For example - name: check_prometheus_status_kafka shell: /usr/sbin/ss -lnt|awk '{ print $4}'|grep 9071 |sed 's/\*//'| sed 's/\://' register: prom_status tags: - check_prometheus_status_kafka - name: post_message_prom_kafka debug: msg="Prometheus for Kafka listening in {{ prom_status.stdout }}" when: prom_status.stdout == "9071" tags: - post_message_prom_kafka What I want is an additional message which would