--- - name: Remove temp become: yes file: path="{{ ansistrano_shared_path.stdout }}/temp" state=absent - name: Re-Create Temp Dir become: yes file: path="{{ ansistrano_shared_path.stdout }}/temp/{{ item.src }}" state=directory owner=www-data group=www-data with_items: - { src: 'cache' } - { src: 'files' } - { src: 'sessions' } - { src: 'wsdl' } - { src: 'pages/file/image/logo' } - { src: 'pages/file/image/cache' } - { src: 'pages/file/streetview/img' } - { src: 'pages/imgcache' } - name: Re-Create Symlink become: yes file: src={{ item.src }} dest={{ item.dest }} state=link force=yes with_items: - { src: "{{ ansistrano_shared_path.stdout }}/persist/logos", dest: "{{ ansistrano_shared_path.stdout }}/temp/pages/file/image/logo/q" } - { src: "{{ ansistrano_shared_path.stdout }}/temp/pages/imgcache", dest: "{{ ansistrano_shared_path.stdout }}/temp/pages/file/image/cache/q" } - { src: "{{ ansistrano_shared_path.stdout }}/persist/streetview", dest: "{{ ansistrano_shared_path.stdout }}/temp/pages/file/streetview/img/q" } - { src: "{{ ansistrano_release_path.stdout }}/public/themes", dest: "{{ ansistrano_shared_path.stdout }}/temp/pages/themes" } #- name: opcache reset # become: yes # command: "/usr/bin/php /home/deploy/cachetool.phar opcache:reset --fcgi=/var/run/php5-fpm.sock"