28 lines
961 B
YAML
28 lines
961 B
YAML
|
---
|
||
|
# Update code deployment step
|
||
|
- name: ANSISTRANO | Get release version
|
||
|
set_fact:
|
||
|
ansistrano_release_version: "{{ lookup('pipe', 'date -u +%Y%m%d%H%M%SZ') }}"
|
||
|
run_once: true
|
||
|
when: ansistrano_release_version is not defined
|
||
|
delegate_to: 127.0.0.1
|
||
|
|
||
|
- name: ANSISTRANO | Get release path
|
||
|
command: echo "{{ ansistrano_releases_path }}/{{ ansistrano_release_version }}"
|
||
|
check_mode: no
|
||
|
register: ansistrano_release_path
|
||
|
|
||
|
- include_tasks: "update-code/{{ ansistrano_deploy_via | default('rsync') }}.yml"
|
||
|
|
||
|
- name: ANSISTRANO | Copy release version into REVISION file
|
||
|
copy:
|
||
|
content: "{{ ansistrano_release_version }}"
|
||
|
dest: "{{ ansistrano_release_path.stdout }}/REVISION"
|
||
|
when: ansistrano_git_result is not defined
|
||
|
|
||
|
- name: ANSISTRANO | Copy git released version into REVISION file
|
||
|
copy:
|
||
|
content: "{{ ansistrano_git_result.after }}"
|
||
|
dest: "{{ ansistrano_release_path.stdout }}/REVISION"
|
||
|
when: ansistrano_git_result is defined
|