become: true
- name: Checkout files to the destination directory
command: |
- git --work-tree={{ dest }} --git-dir={{ item }} checkout master --force
+ git --work-tree={{ dest }} --git-dir={{ item }} checkout main --force
become: yes
with_items: "{{ repos }}"
- name: Checkout configuration files
command: |
- git --work-tree=/tmp --git-dir=/srv/git/server_prod.git checkout master \
+ git --work-tree=/tmp --git-dir=/srv/git/server_prod.git checkout main \
--force
become: yes
- name: Ensure sites-available directory exists
become: yes
- name: Checkout to the destination directory
command: |
- git --work-tree={{ dest }} --git-dir={{ item }} checkout master --force
+ git --work-tree={{ dest }} --git-dir={{ item }} checkout main --force
become: yes
with_items: "{{ repos }}"
- name: Ensure correct ownership in the destination directory