- name: coreos complex var
  hosts: all
  remote_user: cloud-user
  gather_facts: no
  vars:
    ansible_python_interpreter: /usr/bin/python3
  tasks:
    - name: check active result
      shell: systemctl status rpm-ostree-countme.timer |  grep 'active (waiting)'
      register: grep_result
      ignore_errors: yes
    - name: check enabled result
      shell: systemctl status rpm-ostree-countme.timer |  grep enabled
      register: grep_result2
      ignore_errors: yes
    - name: assert results
      assert:
        that:
            grep_result.rc == 0 and grep_result2.rc == 0
