--- - name: Stage Arke release tarball hosts: localhost gather_facts: false vars: archive_path: "{{rel_dir}}/arke_{{arke_rel}}.tar" arke_repo_dir: "{{repo_dir}}/arke" tasks: - name: Ensure release directory exists file: path: "{{rel_dir}}" state: directory mode: '755' - name: Fetch all remote branches and tags ansible.builtin.command: git fetch --all args: chdir: "{{arke_repo_dir}}" - name: Pull latest changes ansible.builtin.command: git pull args: chdir: "{{arke_repo_dir}}" - name: Create Arke archive for specified release ansible.builtin.command: git archive -o "{{archive_path}}" "{{arke_rel}}" args: chdir: "{{arke_repo_dir}}"