mirror of
https://github.com/luzifer-ansible/deploy-git.git
synced 2024-11-09 21:59:59 +00:00
26 lines
700 B
YAML
26 lines
700 B
YAML
---
|
|
|
|
- name: Execute pre-commands
|
|
command: '{{ item.pre_command.command }}'
|
|
args:
|
|
chdir: '{{ item.pre_command.chdir | default(omit) }}'
|
|
with_items: '{{ git_checkouts }}'
|
|
when: '{{ item.pre_command is defined }}'
|
|
|
|
- name: Checkout git repo
|
|
git:
|
|
repo: '{{ item.repo }}'
|
|
dest: '{{ item.dest }}'
|
|
force: 'yes'
|
|
key_file: '{{ item.key_file | default(omit) }}'
|
|
version: '{{ item.version | default("HEAD") }}'
|
|
with_items: '{{ git_checkouts }}'
|
|
|
|
- name: Execute post-commands
|
|
command: '{{ item.post_command.command }}'
|
|
args:
|
|
chdir: '{{ item.post_command.chdir | default(omit) }}'
|
|
with_items: '{{ git_checkouts }}'
|
|
when: '{{ item.post_command is defined }}'
|
|
|
|
...
|