- name: coreos complex var
  hosts: all
  remote_user: cloud-user
  gather_facts: no
  vars:
    ansible_python_interpreter: /usr/bin/python3
  tasks:
    - name: cat sysrq
      shell: cat /proc/sys/kernel/sysrq
      register: cat_result
      ignore_errors: yes
    - name: assert results
      assert:
        that:
            cat_result.stdout == '0'
    - name: reboot
      become: yes
      become_user: root
      become_method: sudo
      reboot:
    - name: cat sysrq
      shell: cat /proc/sys/kernel/sysrq
      register: cat_result
      ignore_errors: yes
    - name: assert results
      assert:
        that:
            cat_result.stdout == '0'
