--- - name: restart snmpd service: name : snmpd state: restarted when: - ansible_virtualization_type | regex_search("docker|podman|container")