--- - name: Create the archive dir file: path={{ pim_root_dir }}/archives/{{ pim_current_version }} state=directory tags: pim - name: Archive current version synchronize: src: "{{ pim_root_dir }}/app" dest: "{{ pim_root_dir }}/archives/{{ pim_current_version }}/" compress: False delete: True delegate_to: "{{ inventory_hostname }}" tags: pim - name: Dump the database mysql_db: state: dump name: "{{ pim_db_name }}" target: "{{ pim_root_dir }}/archives/{{ pim_current_version }}/{{ pim_db_name }}.sql.xz" login_host: "{{ pim_db_server }}" login_user: "{{ pim_db_user }}" login_password: "{{ pim_db_pass }}" quick: True single_transaction: True environment: XZ_OPT: -T0 tags: pim