title: How to re-execute a specific task in ansible playbook?
body: <p>I am writing a playbook to compile an Apache-2.4 from source. I would like to have the flow of playbook as follows:</p>
  
  <ol>
  <li>Download source package in /usr/src</li>
  <li>Extract it in the same folder.</li>
  <li>Now, start compiling it. Run configure, make and make install.</li>
  <li>In case, the last process fails due to dependency issues - like apr or apr-util. Call handler and download them, keep them in /usr/src/http-source/srclib/apr and /usr/src/http-source/srclib/apr-util. </li>
  </ol>
  
  <p>After 3rd step, i would like to retry or re-execute 3rd step. How we can do this without writing a new step again? Any ideas??</p>
  
  <p>This is what i have tried:-</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>[root@system1 myansible]# cat apache_compile_simple.yml.
  ---
  - hosts: system2*
    tasks:
     - name: Download the Apache source file
       get_url:
           url: http://www-us.apache.org/dist//httpd/httpd-2.4.29.tar.gz 
           dest: /usr/src/
       tags: download_source
     - name: Extract the source file 
       unarchive:
           src: /usr/src/httpd-2.4.29.tar.gz 
           dest: /usr/src/
           remote_src: yes
       tags: extract_source
     - name: Change the working directory
       command: chdir=/usr/src/httpd-2.4.29/ ./configure --prefix=/usr/local --with-included-apr
       register: proc_status
       ignore_errors: true
       changed_when: false
       tags: configure
     - name: check for depencies
       debug: msg=""
       notify:  
         - apr
         - apr-util
       changed_when: "proc_status.rc != 0"
       tags: check_dep
  
    handlers:  
     - name: Install_dependencies
       get_url: url={{ item }} dest=/usr/src/
       with_items:
        - http://www-eu.apache.org/dist//apr/apr-1.6.3.tar.gz  
        - http://www-eu.apache.org/dist//apr/apr-util-1.6.1.tar.gz
       listen: "apr" 
     - name: ex_apr_dir_exist
       file:
        path: /usr/src/httpd-2.4.29/srclib/apr
        mode: 755
        state: directory 
        listen: "apr"
     - name: Unarchive the apr build   
       unarchive:
          src: /usr/src/apr-1.6.3.tar.gz
          dest: /usr/src/httpd-2.4.29/srclib/apr
          remote_src: yes 
       listen: "apr" 
     - name: Make apr-util directory
       file:
        path: /usr/src/httpd-2.4.29/srclib/apr-util
        mode: 755
        state: directory
       listen: "apr-util"
     - name: Unarchive the apr-utils build
       unarchive:
         src: /usr/src/apr-util-1.6.1.tar.gz
         dest: /usr/src/httpd-2.4.29/srclib/apr-util
         remote_src: yes
       listen: "apr-util"</code></pre>
  </div>
  </div>
  </p>
  
  <p>I would like to get ideas on how to re-execute "configure apache" task, after the handler is done.</p>