--- - name: Verify hosts: all become: yes gather_facts: no tasks: - name: check that bogus options are in ansible.builtin.command: cmd: grep 'a=1' /etc/default/grub - name: check that selected option is in ansible.builtin.command: cmd: grep 'cgroup_enable=memory' /etc/default/grub