reboot server during Ansible tasks I have 3 scripts that must be run on server one by one. for example:  

- name: find config
  shell: /data/scripts/config1
  become: yes
  become_user: root
  tags: find_config

- name: change config
  shell: /data/scripts/config2
  become: yes
  become_user: root
  tags: change_config

- name: confirm config
  shell: /data/scripts/config3
  become: yes
  become_user: dbusr1
  tags: confirm_config


in second script config2 there is a reboot command and then the rest of script will be run at start up. something like this:  

some variables
.
.
commands before reboot
.
.
reboot command
.
.
commands that run at start up


does this reboot affect ansible tasks? how i can write tasks that wait until commands that run at start up be run then execute config3? is this even possible in ansible? what modules should i use?
Use this source code for reboot your client machine

---
  - name: System Reboot
    hosts: debian
    become_method: sudo
    become_user: root
    become: true
    tasks:
      - name: reboot nodes     # Reboot client side debian machine 
        shell: sleep 2 &amp;&amp; shutdown -r now "Ansible reboot"
        async: 1
        poll: 0
        ignore_errors: true
      - name: wait for the server to come back  # when server timeout it through error. That error is handle by ignore_errors.
        local_action: wait_for
        args:
          host: "{{ inventory_hostname }}"
          port: 22
          state: started
          delay: 120
          timeout: 200
        ignore_errors: true